Tags:
create new tag
view all tags

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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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 | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-09-08 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.