AbiWord, Text and HTML??
Greetings: A problem importing a previously composed ascii text file with jstar (joe) or, probably, any standard Linux text editor:
I had a single need to convert this to html and found that AbiWord was quite easy:
$ abiword --to=html filename.txt > filename.html.
The trouble is; viewing filename.html with lynx or links it's double spaced.. I thought 'no problem,' we have the standard end of line thingy so I'll just edit filename.html substituting a space for the </p> entries... Oh yeah--grin--lynx and links still view it double spaced.. I tried several other 'fixes' to no avail.. Some crash and burn..
Retyping the entire ascii text file into AbiWord and saving as a html file is fine, but I much prefer composing all files with a CLI editor.. Call me old fashioned?? Whatever.. I used WordStar for too many years I guess... (Failing eyes doesn't help) <grin>
Any suggestions? TIA.
Signature · 7 lines
Hal - in Terra Alta, WV/US - Slackware GNU/Linux 10.1 (2.4.29) . - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 15 lines · Hal MacArgle
Greetings: A problem importing a previously composed ascii text file with jstar (joe) or, probably, any standard Linux text editor:
I had a single need to convert this to html and found that AbiWord was quite easy:
$ abiword --to=html filename.txt > filename.html.The trouble is; viewing filename.html with lynx or links it's double spaced.. I thought 'no problem,' we have the standard end of line thingy so I'll just edit filename.html substituting a space for the </p> entries... Oh yeah--grin--lynx and links still view it double spaced.. I tried several other 'fixes' to no avail.. Some crash and burn..
Quoted 6 lines
Retyping the entire ascii text file into AbiWord and saving as a html file is fine, but I much prefer composing all files with a CLI editor.. Call me old fashioned?? Whatever.. I used WordStar for too many years I guess... (Failing eyes doesn't help) <grin>
Any suggestions? TIA.
This sounds like a famirly conventional EoL (Cr vs LF) problem to me. You should look at the problem file in some hex editor (e.g., hexer, hexedit) and see what actual characters are at the ends of the lines.
Or, if you like, send me (off-list) a short sample (filename.txt and the corresponding filename.html) and I'll take a look at it.
Yeah, I used Wordstar too. These days it's vi on Linux and WordPad on Windows. Occasionally OpenOffice, but only when I must.
Guess us fogies have to stick together.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 27 lines · Ray Olszewski
Quoted 15 lines · Hal MacArgle
Greetings: A problem importing a previously composed ascii text file with jstar (joe) or, probably, any standard Linux text editor:
I had a single need to convert this to html and found that AbiWord was quite easy:
$ abiword --to=html filename.txt > filename.html.The trouble is; viewing filename.html with lynx or links it's double spaced.. I thought 'no problem,' we have the standard end of line thingy so I'll just edit filename.html substituting a space for the </p> entries... Oh yeah--grin--lynx and links still view it double spaced.. I tried several other 'fixes' to no avail.. Some crash and burn..
Quoted 6 lines
Retyping the entire ascii text file into AbiWord and saving as a html file is fine, but I much prefer composing all files with a CLI editor.. Call me old fashioned?? Whatever.. I used WordStar for too many years I guess... (Failing eyes doesn't help) <grin>
Any suggestions? TIA.
This sounds like a famirly conventional EoL (Cr vs LF) problem to me. You should look at the problem file in some hex editor (e.g., hexer, hexedit) and see what actual characters are at the ends of the lines.
Quoted 7 lines
Or, if you like, send me (off-list) a short sample (filename.txt and the corresponding filename.html) and I'll take a look at it.
Yeah, I used Wordstar too. These days it's vi on Linux and WordPad on Windows. Occasionally OpenOffice, but only when I must.
Guess us fogies have to stick together.
We're outnumbered... <grin> This is a _real_ education..
Slackware bundles 'hexdump' but, using it, I long for the old Norton hex editor from Dos, that screen printed ascii as well as hex.. To make matters worse; hexdump lists in groups of four characters in _little endian_ notation.. That was a head scratcher... Worst of all; where I expected an 0x0a/0x0d combination, it was a mere 0x20??? Too much automation for this cat.. If I replaced all the SP's, I'd really be in the soup... There has to be some shenanigans in the way I did it.. BTW; Jstar (Joe) uses WordStar commands as does 'E3.' IIRC though there was a problem with the .deb version I tried on a Woody machine.. Forget now..
Cracking the HTML book I decided to bite the bullet and
prepare a html template with the minimum entries and go from there, even though it means many <p> </p> combinations.. Meanwhile Peter suggested txt2html that I fetched, but it's PERL and linuxpackages has no Slackware .tgz that I could find.. The README with txt2html.tar.gz means I, now, have to crack the PERL books...
Appreciate!! The learning curve is alive and well..
Signature · 7 lines
Hal - in Terra Alta, WV/US - Slackware GNU/Linux 10.1 (2.4.29) . - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 30 lines · Peter Garrett
Quoted 6 lines · On Sun, 12 Feb 2006 13:15:36 -0500 Hal MacArgle <[email protected]> wrote:
Greetings: A problem importing a previously composed ascii text file with jstar (joe) or, probably, any standard Linux text editor:
I had a single need to convert this to html and found that AbiWord was quite easy:
[snip]
Quoted 1 line
Any suggestions? TIA.
What about "txt2html" ? I imagine it's available for Slackware... The Debian/Ubuntu description from "apt-cache show txt2html" is:
Description: Text to HTML converter
txt2html is a Perl program that converts plain text to HTML. .
It supports headings, lists, simple character markup, and hyperlinking,
and is highly customizable. It recognizes some of the apparent structure of the source document (mostly whitespace and typographic layout), and attempts to mark that structure explicitly using HTML.
.
the purpose for this tool is to provide an easier way of converting
existing text documents to HTML format. txt2html can also be used to aid in writing new HTML documents, but there are probably better ways of doing that.
Quoted 1 line
Peter
Greetings and thanks for your input.. I have fetched txt2html
and will try it once I get a hands on with PERL.. As mentioned to Ray, there is no .tgz package on w3.linuxpackages, that I could find.. I tried Slack 10.1; maybe I should have spent more time, eh??
Meanwhile we have a work around but an easier way would be
nice... Thanks again..
Signature · 7 lines
Hal - in Terra Alta, WV/US - Slackware GNU/Linux 10.1 (2.4.29) . - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 8 lines
Quoted 4 lines · On Sun, 12 Feb 2006 13:15:36 -0500 Hal MacArgle <[email protected]> wrote:
Greetings: A problem importing a previously composed ascii text file with jstar (joe) or, probably, any standard Linux text editor:
Quoted 7 lines
Quoted 2 lines
I had a single need to convert this to html and found that AbiWord was quite easy: ((Note: But not completely satisfactory.))
[snip]
What about "txt2html" ? I imagine it's available for Slackware...
I couldn't find it at w3.linuxpackages.net, but fetched the
strange, to me, tarball and flailed away not knowing a thing about PERL and CPAN, modules..
I, honestly, don't know what I did but I ended up with two
files: txt2html and TextToHTML.pm, both 0644, that worked perfectly as long as I had the paths right... The latter file wants to be in /HTML/ up from the current working directory..
Invoking 'perl txt2html filename.txt > filename.html' does
the job flawlessly.. It even created a link when it saw "http://............" And the html file size was realistic; only 4X compared to 10X for the Abiword conversion..
I'm happy.. Thanks Ray and Peter.. Now on to the next crisis,
eh??
Signature · 7 lines
Hal - in Terra Alta, WV/US - Slackware GNU/Linux 10.1 (2.4.29) . - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs