⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 68237

📁 神经网络昆斯林的新闻组分类2006
💻
字号:
Xref: cantaloupe.srv.cs.cmu.edu comp.lang.postscript:18555 comp.windows.x:68237 comp.windows.x.apps:2749 comp.text:11348 comp.text.interleaf:1481 comp.text.frame:5317Newsgroups: comp.lang.postscript,comp.windows.x,comp.windows.x.apps,comp.text,comp.text.interleaf,comp.text.framePath: cantaloupe.srv.cs.cmu.edu!rochester!cornell!batcomputer!caen!malgudi.oar.net!zaphod.mps.ohio-state.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!csn!att!princeton!phoenix.Princeton.EDU!dawagnerFrom: dawagner@phoenix.Princeton.EDU (David A. Wagner)Subject: Re: viewing postscript files under X windowsMessage-ID: <1993May18.031843.26820@Princeton.EDU>Originator: news@nimasterSender: news@Princeton.EDU (USENET News System)Nntp-Posting-Host: phoenix.princeton.eduOrganization: Princeton UniversityReferences: <1sk97rINNptb@polaris.isi.com>Date: Tue, 18 May 1993 03:18:43 GMTLines: 54In article <1sk97rINNptb@polaris.isi.com> kin@isi.com (Kin Cho) writes:>>I can also live with a utility that converts postscript to plain>text, perferably retaining page counts so that I know how many pages>the original document contains.>	Well, I know of one hack to sort of do this conversion.  Firstget ghostscript and check out the gs_2asc.ps file that comes with it.It prints out some information about where each text string goes on thepage, and maintains page counts.  I've written a little C program tomassage the output of gs -dNODISPLAY gs_2asc.ps somewhat, so that youcan get all the ascii strings in the document.  No guarantees that itwon't break up words/sentences, though - I've used it with varyingdegrees of success.  Anyways, try this out, it may do what you want./* * massager: a filter for use with gs; does crude Postscript->ASCII conversion * * Usage: *	cat file.ps | gs -dNODISPLAY gs_2asc.ps - | massager * * I print a <Ctrl-L> after each new page. * * Put the following source into massager.c and compile it: */#include <stdio.h>#include <string.h>main(){	char	line[1000], *p;	while (fgets(line, sizeof(line), stdin) != NULL)		if (line[0] == 'P')			printf("\f\n");		else if (line[0] == 'S' && line[1] == ' ') {			if ((p = strrchr(line, ')')) == NULL)				continue;			*p = '\0';			if ((p = strchr(line, '(')) == NULL)				continue;			for (p++; *p; p++)				if (*p != '\\' || (p[1] != ')' && p[1] != '('))					putchar(*p);			putchar('\n');		}	return(0);}--------------------------------------------------------------------------------David Wagner                                              dawagner@princeton.edu

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -