JP Vossen via plug on 21 Sep 2020 12:56:12 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] DESQview (was ... Byobu) |
That or just cut the Perl down to a one-liner was my guess, but I hadn't bothered. I just tried these and the output was identical on the screen: perl -pe 'tr [\200-\377] [\000-\177];' .../guide/about-me cat .../guide/about-me There are trivial and non-display affecting changes in a `hexdump -C` for both. *Access to the raw text was never a problem, it's just that the formatting was lost,* though it's annoying because a) it just is and b) the header is this, so it seems like *something* should be able to read "properly" but nothing I've tried will: ``` 00000000 1d 7d 00 00 60 50 4f 53 54 53 43 52 49 00 00 00 |.}..`POSTSCRI...| ``` It's the usual computer age archive problem, it's not just the media that matters, it's the ability to read the format. There are certain things I've saved as plain old text, PDF, and ODT, just in case. RTF was mentioned before, but that is an M$ format that was originally ill-defined and unstable (but it seems better defined these days) so I'd rather not use it. On 9/21/20 2:27 PM, Walt Mankowski via plug wrote:
Seems like you could replace that script with tr(1) and redirection. I confess I don't know tr very well, but maybe something like this? $ tr '\200-\377' '\000-\177' <in.ws >out.txt On Mon, Sep 21, 2020 at 01:31:03PM -0400, JP Vossen via plug wrote:Yeah there is at least one (very verbose!) Perl script floating around out there: http://justsolve.archiveteam.org/wiki/WordStar https://ataridogdaze.com/tech/wordstar-convert.html ``` open OUTFILE, ">out.txt"; open INFILE, "<in.ws"; while (<INFILE>) { tr [\200-\377] [\000-\177]; print OUTFILE $_; } close INFILE; close OUTFILE; ``` I didn't bother because my `LESSOPEN=|/opt/bin/settings/lesspipe.sh %s` handled it well enough. On 9/20/20 8:19 PM, Walt Mankowski via plug wrote:Thanks, that brought back memories. Even if it would be about a 3 line Perl script these days... :) Walt On Sun, Sep 20, 2020 at 06:13:46PM -0400, Steve Litt via plug wrote:On Sun, 20 Sep 2020 15:19:57 -0400 JP Vossen via plug <plug@lists.phillylinux.org> wrote:Sigh, OK, I went down the rabbit hole looking for the batch files that ran that stuff. I didn't find them, but I did find an "about me" from that time (1991-1992) in a _PC Buyers Guide_ I wrote (pretty sure in Wordstar, and I can't find a good converter for that,I discovered the following Turbo Pascal program that I created in the mid 1980s and last modified September 1990, to turn a wordstar doc into plain text. I'm not sure whether it respects hard paragraphs or not. Try it with today's Freepascal. =============================================================== program unws; var inname: string[40]; c: char; i: integer; inf, ouf: file of char; begin...
Later, JP -- ------------------------------------------------------------------- JP Vossen, CISSP | http://www.jpsdomain.org/ | http://bashcookbook.com/ ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug