tinycm rev 13

Add English help file and some tiny improvments
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jan 04 05:46:42 2014 +0100 (2014-01-04)
parents b37aa11da7df
children 81cc9819e295
files .hgignore content/wiki/en/help.txt index.cgi
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.hgignore	Sat Jan 04 05:46:42 2014 +0100
     1.3 @@ -0,0 +1,2 @@
     1.4 +cache/
     1.5 +content/wiki/index.txt
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/content/wiki/en/help.txt	Sat Jan 04 05:46:42 2014 +0100
     2.3 @@ -0,0 +1,45 @@
     2.4 +NOWIKI
     2.5 +
     2.6 +<h2>Help</h2>
     2.7 +
     2.8 +<p>
     2.9 +TinyCM let you easely create nice web content. Clean, fast and CGI SHell powered!
    2.10 +TinyCM provide a simple Wiki syntax, JavaScript code helper, diff interface, a dashboard, Hg integration and a plugin system. It can be also multi-user and a greate collaboration tool.
    2.11 +</p>
    2.12 +
    2.13 +<h3>Titles</h3>
    2.14 +<pre>
    2.15 +==== Title 1 ====
    2.16 +=== Title 2 ===
    2.17 +== title 3 ==
    2.18 +</pre>
    2.19 +
    2.20 +<h3>Text formating</h3>
    2.21 +<p>
    2.22 +This how to make <strong>bold</strong>, <em>emphasis</em> and <u>underline</u> text:
    2.23 +</p>
    2.24 +<pre>
    2.25 +**bold** ''emphasis'' __underline__
    2.26 +</pre>
    2.27 +
    2.28 +<h3>Page link and URL</h3>
    2.29 +<p>
    2.30 +To create a new page you have to create a new link to it. Then you can edit and add content to your new page. First the link title then the path to a new or an existing page:
    2.31 +</p>
    2.32 +<pre>
    2.33 +[Help|en/help]
    2.34 +</pre>
    2.35 +<p>
    2.36 +You can also copy/past a full URL such as:
    2.37 +</p>
    2.38 +<pre>
    2.39 +http://www.slitaz.org/
    2.40 +</pre>
    2.41 +
    2.42 +<h3>Images</h3>
    2.43 +<p>
    2.44 +You can have some images in your content folder or use on from the web. Just paste the URL to the PNG image:
    2.45 +</p>
    2.46 +<pre>
    2.47 +http://site.com/path/image.png
    2.48 +</pre>
     3.1 --- a/index.cgi	Sat Jan 04 00:59:43 2014 +0100
     3.2 +++ b/index.cgi	Sat Jan 04 05:46:42 2014 +0100
     3.3 @@ -268,7 +268,7 @@
     3.4  		-e s"#====\([^']*\)====#<h2>\1</h2>#"g \
     3.5  		-e s"#===\([^']*\)===#<h3>\1</h3>#"g \
     3.6  		-e s"#==\([^']*\)==#<h4>\1</h4>#"g \
     3.7 -		-e s"#\*\*\([^']*\)\*\*#<strong>\1</strong>#"g \
     3.8 +		-e s"#\*\*\([^']*\)\*\*#<b>\1</b>#"g \
     3.9  		-e s"#''\([^']*\)''#<em>\1</em>#"g \
    3.10  		-e s"#__\([^']*\)__#<u>\1</u>#"g \
    3.11  		-e s"#\[\([^]]*\)|\($doc\)\]#<a href='$script?d=\2'>\1</a>#"g \
    3.12 @@ -539,6 +539,7 @@
    3.13  		if check_auth; then
    3.14  			echo "<p>$(gettext "Users:") $users</p>"
    3.15  			echo "<p>$(gettext "Documents:") $docs ($size)</p>"
    3.16 +			[ "$HG" != "yes" ] && echo $(gettext "Hg is disabled")
    3.17  			echo "<h3>$(gettext "Plugins")</h3>"
    3.18  			echo '<pre>'
    3.19  			for p in $(ls -1 $plugins)
    3.20 @@ -591,10 +592,10 @@
    3.21  		if [ ! -f "$wiki/$d.txt" ]; then
    3.22  			echo "<h2>$d</h2>"
    3.23  			gettext "The document does not exist. You can create it or read the"
    3.24 -			echo " <a href='?d=help'>help</a>"
    3.25 +			echo " <a href='?d=en/help'>help</a>"
    3.26  		else
    3.27 -			if fgrep NOWIKI $wiki/$d.txt; then
    3.28 -				cat $wiki/$d.txt
    3.29 +			if fgrep -q NOWIKI $wiki/$d.txt; then
    3.30 +				cat $wiki/$d.txt | sed '/NOWIKI/'d
    3.31  			else
    3.32  				cat $wiki/$d.txt | wiki_parser
    3.33  			fi