r3 - 08 Sep 2005 - 08:18:33 - CrawfordCurrieYou are here: TWiki >  Support Web > UsingTwikiWithoutWebServer
Tags:
, create new tag

Question

Wiki is a great tool, but it is also a great text formatter.

I want to use just the text formatter. is it possible to have it from command line.

e.g.:

cat mytext | twikiformatter > output.html

possible usage: pretty-format reports (its easier to generate twiki text than HTML...)

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: unix
Web server: none
Perl version: 5.8
Client OS: none
Web Browser: none
Categories: Missing functionality
-- DrorTirosh - 06 Sep 2005

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

Have you check good old troff. It is an utility for text processing under most unix (and linux). It might do the trick for your needs.

-- AntonioVega - 08 Sep 2005

Interesting. There are, of course, many different text formatting packages out there already, as Antonio highlights. To use the TWiki rendering engine as a formatter, you need the context of a TWiki installation. However that installation wouldn't actually need a web server, it would just sit on your disk. You could simply run the view script in the bin directory from the command line to render a TWiki topic, providing the appropriate CGI parameters interactively, and it would print to STDOUT. A script to provide a friendlier interface to the renderer could be knocked up in a few minutes (with DakarRelease, anyway. It would be a bit more complicated with Cairo (the current release) but could still be done). Look at the view script, and the DakarRelease unit tests, for ideas.

-- CrawfordCurrie - 08 Sep 2005

 
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo