* Piki -- a command line WIKI
[Japanese ../ja/]
{right
Kazu Yamamoto\
Created: 2010.3.10\
Modified: 2011.2.7
}
Piki is yet another WIKI. Like other WIKI systems, Piki provides
simple notations to express document structures. But unlike them,
it does not use Web servers.
"piki" is a command line program to convert a Piki text file to
an HTML file.
"Piki" is written in
[Parsec http://research.microsoft.com/en-us/um/people/daan/parsec.html],
a functional parser of [Haskell http://www.haskell.org].
You can download ["Piki" http://hackage.haskell.org/package/piki] from Hackage.
["Git repository" http://github.com/kazu-yamamoto/piki] is on github.
** The "piki" command
"piki" takes an HTML template file (say "template.html") and a Piki
text file (say "index.piki") as arguments and produces an HTML file
(say "index.html"):
>|
% piki template.html index.piki > index.html
|<
"template.html" should contain HTML meta information. "piki" converts
"$body" with the contents produced with the Piki file. And it
replaces "$title" of the contents of the first
) should be enclosed with ">|" and "|<" >| >| (define (fib n) (cond ((= n 0) 0) ((= n 1) 1) (else (+ (fib (- n 1)) (fib (- n 2)))))) |< |< ***Division The lines between "{" and "}" will be a division (). If upper letters are contained the string which follows "{", they will be the value of "id". Otherwise, they will be the valude of "class". >| {center Any Piki text } |< This is convenient if used with CSS. >| .center { margin: 0px auto; text-align: center; } |< ***Paragraph Lines which do not start with the Piki notations organizes a paragraph(). Paragraph separator is an empty line. >| Paragraph 1: was it a cat I saw? Yes, it was. Paragraph 2: The quick brown fox jumped over the vary lazy dog. |< ***Link To express a link, use the "\[title url\]" notation. If the title contains spaces, it should be quoted with double quote. Of course, this does not need to be placed in the beginning of lines. >| My favorite computer language is [Haskell http://www.haskell.org/]. |< ***Table To create a table, enumerates elements separated by "|". >| |System|Type| |[Hugs http://www.haskell.org/hugs/]|Interpreter| |[GHC http://www.haskell.org/ghc/]|Compiler\|Interpreter| |< ***Escape character Escape character is '\\'. To express "\[\]", use "\\\[\\\]". In normal cases, the HTML special characters are converted to the character references. For example, '<' is converted to "<". If the special characters are escaped, they are not converted to the character references. Here is an interesting example: >| {right Kazu Yamamoto\
2009.4.6 } |< >| .right { text-align: right; padding-right: 16px; } |<