Page 2 of 2

Re: I need sugestion terminal based word procesor like nano but can save file as RTF usind UTF8 code page for latin II

Posted: Sun Feb 28, 2021 11:03 am
by puppy_apprentice

I don't want to convince you to my style of writing, but you can write for dialogs this:

Code: Select all

- Hello, my name is Zuzia.
- Hello, my name is puppy_apprentice, nice to meet you.

And before you convert text to HTML you can replace all '-' to '\-', every editor have replace function ;). Some editors have possibility to make macros that will do some stuff automatically.


Re: I need sugestion terminal based word procesor like nano but can save file as RTF usind UTF8 code page for latin II

Posted: Mon Mar 01, 2021 6:09 pm
by williwaw

when using a text editor such as joe for composing, what is the easiest way to save or convert a file to..

1. rtf?
2. html?


Re: I need sugestion terminal based word procesor like nano but can save file as RTF usind UTF8 code page for latin II

Posted: Mon Mar 01, 2021 9:15 pm
by puppy_apprentice

HTML
a) plain text you can write directly in editor using this template:

Code: Select all

<html>
<meta charset="UTF-8">
<title>You title</title>
<body>
<pre>
Your text
</pre>
</body>
</html>

b) for more complex text you have to use markdown:

Code: Select all

# First Level Headline

Another First Level Headline
=========================

## Second Level Headline

Another Second Level Headline
--------------------------

Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.

## Something in Polish
Pójdźże, kiń tę chmurność w głąb flaszy!
Żółty słoń nie ma jak usiąść na tępych gwoździach.
Zażółć gęślą jaźń.

### Third Level Headline

> Citation Block.
>
> Second acapite in Citation Block
>
> ## Second Level Headline in Citation Block

Now to convert this into HTML you have to use some converter. It could be offline eg. Pandoc or Writeup, or online eg. Pandoc or MD-2-HTML
Paste converted text into *** position in this template:

Code: Select all

<html>
<meta charset="UTF-8">
<title>Markdown to HTML</title>
<body>
***
</body>
</html>

RTF
Use Pandoc or online converters to convert above markdown example.
Add this as a first line to converted text:

Code: Select all

{\rtf

Try to open file with .rtf extension in AbiWord.


Re: I need sugestion terminal based word procesor like nano but can save file as RTF usind UTF8 code page for latin II

Posted: Tue Mar 02, 2021 4:26 am
by 6502coder

I have taken puppy_apprentice's nice template and expanded it into a script that automates the process of converting a Jstar document into an HTML document.

Download the attached script "star2html.gz" and place it in your ~/my-applications/bin folder.

Remove the fake ".gz" extension and make sure that the script is executable. To do this, open a terminal session in the folder where you placed the script, and give the commands:

Code: Select all

# mv  star2html.gz  star2html
# chmod  gou+x  star2html

Full instructions are in the script itself, but the basic usage is

Code: Select all

# star2html  "Casino Royale"  jamesbond1.txt

where the first argument is for the HTML document title, and the second argument is the Jstar document. The output file will be "jamesbond1.txt.html"

Let me know of any bugs or desired improvements.