Redian新闻
>
Re: how to beautify a text file on unix?
avatar
Re: how to beautify a text file on unix?# Software - 软件世界
s*k
1

Depends on how you define "beautify"... if you have some C source code and
want to add in syntax color printing, font change, greyscale, or if you have
a plain text file which you want to print to a PS file, then you can try
enscript, mpage, a2ps, indent, txt2ps, psbook (the psutils package), on
windows you can try prettyprint, fineprint, printfile, etc. If you want your
text file to somehow have long legs, dancing eyelashes, big eyes plus
other certain desirable features, try dumping your comp
avatar
c*s
2
it is plain text, I wrote a perl script to do the beautifying.
result is not bad:
#! /usr/local/bin/perl
while(<>){

$_ =~ s/^ //;
$_ =~ s/^ //;
$_ =~ s/^ //;
$_ =~ s/^ {10}//;
$_ =~ s/^ {15}//;
$_ =~ s/^ //;
print "$_\n";
}
use it if u want. :P it is a bit hacky.

【在 s*******k 的大作中提到】
:
: Depends on how you define "beautify"... if you have some C source code and
: want to add in syntax color printing, font change, greyscale, or if you have
: a plain text file which you want to print to a PS file, then you can try
: enscript, mpage, a2ps, indent, txt2ps, psbook (the psutils package), on
: windows you can try prettyprint, fineprint, printfile, etc. If you want your
: text file to somehow have long legs, dancing eyelashes, big eyes plus
: other certain desirable features, try dumping your comp

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。