|
|
|
|
||||||
| linux.debian.user debian-user@lists.debian.org. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello all,
My niece sends some of her schoolwork to my wife (e.g. essays) for her to read. First she sent .doc files which I can't access properly (no, I do no run OO) although I could get the jist. I then suggested that she send plain text. I don't run any locales but have LANG=C. Her plain-text files are fine, except that apostrophies (singel-quote) (') are replaced with "\222", opening quotes (") with "\223", and closing quotes (") with "\224". Other than writing a python script, can someone give me a simple command to fix this so that it is not so distracting? Ideally, I'd put it into an executable file and pipe the file through it on it's way to lpr. e.g. $ cool-writing.txt | antiAJ | lpr -Pepson Thanks, Doug. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Use dos2unix.
//Megatron On 04/04/2008, Douglas A. Tutty <dtutty@porchlight.ca> wrote: > Hello all, > > My niece sends some of her schoolwork to my wife (e.g. essays) for her > to read. First she sent .doc files which I can't access properly (no, I > do no run OO) although I could get the jist. I then suggested that she > send plain text. > > I don't run any locales but have LANG=C. > > Her plain-text files are fine, except that apostrophies (singel-quote) > (') are replaced with "\222", opening quotes (") with "\223", and > closing quotes (") with "\224". > > Other than writing a python script, can someone give me a simple command > to fix this so that it is not so distracting? Ideally, I'd put it into > an executable file and pipe the file through it on it's way to lpr. > > e.g. > $ cool-writing.txt | antiAJ | lpr -Pepson > > Thanks, > > Doug. > > > > -- > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org > > -- Regards, //Megatron -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Fri, Apr 04, 2008 at 11:39:55AM -0400, Douglas A. Tutty wrote:
> My niece sends some of her schoolwork to my wife (e.g. essays) for her > to read. First she sent .doc files which I can't access properly (no, I > do no run OO) although I could get the jist. I then suggested that she > send plain text. > > I don't run any locales but have LANG=C. > > Her plain-text files are fine, except that apostrophies (singel-quote) > (') are replaced with "\222", opening quotes (") with "\223", and > closing quotes (") with "\224". > > Other than writing a python script, can someone give me a simple command > to fix this so that it is not so distracting? Ideally, I'd put it into > an executable file and pipe the file through it on it's way to lpr. > > e.g. > $ cool-writing.txt | antiAJ | lpr -Pepson Here is a sample line from one of the files: inside. I’m tired of the term “Best Friends” because what does it I see in vim that \222 is ~R, \223 is ~S, and \224 is ~T. It is on the printout (lpd/apsfilter/enscript) that the numbers come out. Thanks, Doug. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Fri, Apr 04, 2008 at 04:42:28PM +0100, Andr? C?sar de S? wrote:
> On 04/04/2008, Douglas A. Tutty <dtutty@porchlight.ca> wrote: > > Hello all, > > > > My niece sends some of her schoolwork to my wife (e.g. essays) for her > > to read. First she sent .doc files which I can't access properly (no, I > > do no run OO) although I could get the jist. I then suggested that she > > send plain text. > > > > I don't run any locales but have LANG=C. > > > > Her plain-text files are fine, except that apostrophies (singel-quote) > > (') are replaced with "\222", opening quotes (") with "\223", and > > closing quotes (") with "\224". > > > > Other than writing a python script, can someone give me a simple command > > to fix this so that it is not so distracting? Ideally, I'd put it into > > an executable file and pipe the file through it on it's way to lpr. > > > > e.g. > > $ cool-writing.txt | antiAJ | lpr -Pepson >> Use dos2unix. Doesn't that just change CR/LF? Doug. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
> Other than writing a python script, can someone give me a simple command
> to fix this so that it is not so distracting? Ideally, I'd put it into > an executable file and pipe the file through it on it's way to lpr. > > e.g. > $ cool-writing.txt | antiAJ | lpr -Pepson I use recode. cp cool-writing.txt tmp.txt recode dos..latin1 tmp.txt Check if it works. Recode is in the official Debian repository. N.- -- http://arhuaco.org -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Douglas writes:
> My niece sends some of her schoolwork to my wife (e.g. essays) for her to > read. First she sent .doc files which I can't access properly (no, I do > no run OO) Try Abiword. -- John Hasler -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On 2008-04-04 17:57 +0200, John Hasler wrote:
> Douglas writes: >> My niece sends some of her schoolwork to my wife (e.g. essays) for her to >> read. First she sent .doc files which I can't access properly (no, I do >> no run OO) > > Try Abiword. s/b/nt/ :-) No complex library dependencies, no X necessary, startup time close to zero, and the text from your M$ document is displayed just fine. Antiword can also generate Postscript or HTML output. Sven -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Douglas A. Tutty wrote:
> Hello all, > > My niece sends some of her schoolwork to my wife (e.g. essays) for her > to read. First she sent .doc files which I can't access properly (no, I > do no run OO) although I could get the jist. I then suggested that she > send plain text. > > I don't run any locales but have LANG=C. > > Her plain-text files are fine, except that apostrophies (singel-quote) > (') are replaced with "\222", opening quotes (") with "\223", and > closing quotes (") with "\224". > > Other than writing a python script, can someone give me a simple command > to fix this so that it is not so distracting? Ideally, I'd put it into > an executable file and pipe the file through it on it's way to lpr. > > e.g. > $ cool-writing.txt | antiAJ | lpr -Pepson Use tr? It's a very simple program meant for exactly this kind of task. The first argument is the list of characters to replace, and the second is the list of characters (in order) to replace them with. tr "\222\223\224" \'\"\" < cool-writing.txt | lpr -Pepson N.B. the ' and " characters need to be escaped from the shell in the second argument on the command line above. tr is even in "coreutils" so you don't have to install anything extra. best regards, -- Kevin B. McCarty <kmccarty@gmail.com> WWW: http://www.starplot.org/ WWW: http://people.debian.org/~kmccarty/ GPG: public key ID 4F83C751 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH9lw4fYxAIk+Dx1ERAuDMAKDCVigOsgyQaobAwdkXlI 8cdyiGFgCgulIc 16RLuWh7zgePqFdY8lPjmxo= =M11d -----END PGP SIGNATURE----- |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
On 04/04/2008 10:47 AM, Douglas A. Tutty wrote:
> On Fri, Apr 04, 2008 at 11:39:55AM -0400, Douglas A. Tutty wrote: >> My niece sends some of her schoolwork to my wife (e.g. essays) for her >> to read. First she sent .doc files which I can't access properly (no, I >> do no run OO) although I could get the jist. I then suggested that she >> send plain text. >> >> I don't run any locales but have LANG=C. >> >> Her plain-text files are fine, except that apostrophies (singel-quote) >> (') are replaced with "\222", opening quotes (") with "\223", and >> closing quotes (") with "\224". >> >> Other than writing a python script, can someone give me a simple command >> to fix this so that it is not so distracting? Ideally, I'd put it into >> an executable file and pipe the file through it on it's way to lpr. >> >> e.g. >> $ cool-writing.txt | antiAJ | lpr -Pepson > > Here is a sample line from one of the files: > > > inside. I’m tired of the term “Best Friends†because what does it > > I see in vim that \222 is ~R, \223 is ~S, and \224 is ~T. It is on the > printout (lpd/apsfilter/enscript) that the numbers come out. > > Thanks, > > Doug. > > That seems to be in Microsoft code page 1250 (cp1250). Install 'recode' and do this: recode cp1250..ascii < email.txt I hope that s! :-) -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
On Fri, Apr 04, 2008 at 06:33:27PM +0200, Sven Joachim wrote:
> On 2008-04-04 17:57 +0200, John Hasler wrote: > > > Douglas writes: > >> My niece sends some of her schoolwork to my wife (e.g. essays) for her to > >> read. First she sent .doc files which I can't access properly (no, I do > >> no run OO) > > > > Try Abiword. > > s/b/nt/ :-) > > No complex library dependencies, no X necessary, startup time close to > zero, and the text from your M$ document is displayed just fine. > Antiword can also generate Postscript or HTML output. I know about antiword and have it. It still misses some things which is why I asked her to send plain text. Doug. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
On Fri, Apr 04, 2008 at 12:29:44PM -0500, Mumia W.. wrote:
> On 04/04/2008 10:47 AM, Douglas A. Tutty wrote: > >On Fri, Apr 04, 2008 at 11:39:55AM -0400, Douglas A. Tutty wrote: > >>My niece sends some of her schoolwork to my wife (e.g. essays) for her > >>to read. First she sent .doc files which I can't access properly (no, I > >>do no run OO) although I could get the jist. I then suggested that she > >>send plain text. > That seems to be in Microsoft code page 1250 (cp1250). Install 'recode' > and do this: > > recode cp1250..ascii < email.txt Thanks, I had an "ambiguous" error re linefeeds and just tried the other cp's and found that cp1258 works fine. thanks. doug. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
![]() |
| Outils de la discussion | |
|
|