# HG changeset patch # User Paul Issott # Date 1335088163 -3600 # Node ID 9d0f7be1238498a944bc2216bbff9a407683b400 # Parent 4067b670d4ee4a9f524f4938ba8dd8781b34dd47 Tiny edits diff -r 4067b670d4ee -r 9d0f7be12384 README --- a/README Wed Apr 11 16:18:59 2012 +0200 +++ b/README Sun Apr 22 10:49:23 2012 +0100 @@ -2,25 +2,25 @@ ================================================================================ - * CGI/Shell powered, small Wiki syntaxe and HTML JS editor helper + * CGI/Shell powered, small Wiki syntax and HTML JS editor helper * Tiny, fast, elegent and easy to install and customize * No database, flat file storage with diff and log * Plugins support for any kind of functions such as a blog * Help file with formating rules, macro and HTML example code - * Gettexte support and languages support for documents + * Gettext support and languages support for documents Installation ------------ You must first get TinyCM source code via a tarball on SliTaz mirrors or Hg repository. You can extract or clone the CM under a web server directory, -for security reason the config file have a .cgi extension and users data are -stored outsite the web server in the directory /var/lib/slitaz. The user +for security reasons the config file has a .cgi extension and users data are +stored outside the web server in the directory /var/lib/slitaz. The user files paths can be changed via the configuration file. -When you have your copy of TinyCM you can then install web interface under a +When you have your copy of TinyCM you can then install a web interface under a CGI/SHell enabled web server such as Busybox HTTPd, LightTPD or Apache. Gettext -must be installed for localisation support. So, let download Content Manager: +must be installed for localisation support. So, let's download the Content Manager: $ wget http://mirror.slitaz.org/sources/tinycm/tinycm-VERSION.tar.gz $ tar xzf tinycm-VERSION.tar.gz @@ -30,7 +30,7 @@ $ hg clone http://hg.slitaz.org/tinycm -Change directory to the CM, check and edit the configuration file config.cgi +Change directory to the CM, check and edit the configuration file config.cgi, and use make to install: $ cd tinycm* @@ -40,9 +40,9 @@ Standalone Server ----------------- -On SliTaz you can install a copy of TinyCM somewhere under you $HOME directory +On SliTaz you can install a copy of TinyCM anywhere under your $HOME directory and start the stand alone web server powered by Busybox HTTPd applet. This also -help to debug TazCM since error messages are displayed in the terminal. To +helps to debug TazCM since error messages are displayed in the terminal. To start the server, cd to TinyCM dir and execute: $ ./tinycm serv @@ -50,15 +50,15 @@ Mercurial integration --------------------- -TinyCM can smothily be integrated with Mercurial, each new document and edit +TinyCM can be integrated smoothly with Mercurial, each new document and edit will be committed. You must first edit you config.cgi configuration to -enable Hg with HG="yes" then login to your TinyCM follow the link to init the +enable Hg with HG="yes" then login to your TinyCM, follow the link to init the repo or do it manually: cd content && hg init && hg add && hg commit -m "Message" -Then all content will be under Hg and people can commit as usual, to make sure -we use the last files on the web interface we use a Hook to update the repo on +Then all content will be under Hg and people can commit as usual. To make sure +we use the latest files on the web interface we use a Hook to update the repo on each commit. To have the mercurial web interface for the repo you can setup -a vhost, TinyCM provide a small web interface to display Hg log but it can +a vhost, TinyCM provides a small web interface to display a Hg log but it can be extented via a plugin. Hook for $content/.hg/hgrc: [hooks] diff -r 4067b670d4ee -r 9d0f7be12384 index.cgi --- a/index.cgi Wed Apr 11 16:18:59 2012 +0200 +++ b/index.cgi Sun Apr 22 10:49:23 2012 +0100 @@ -6,7 +6,7 @@ # . /usr/lib/slitaz/httphelper -# Let have a peer site config file with a .cgi extension so content +# Let's have a peer site config file with a .cgi extension so content # is secure even if left in a web server directory. . config.cgi @@ -43,7 +43,7 @@ # Functions # -# Used by edit to display language name and the language box. this is +# Used by edit to display language name and the language box. This is # for CM content not gettext support. get_lang() { lang=$(echo $d | cut -d "/" -f 1) @@ -107,7 +107,7 @@ cat > $wiki/$index.txt << EOT ==== Welcome ==== -This is the default index page of your CM, you can edit to start adding +This is the default index page of your CM, you can start to edit adding some content to your TinyCM. EOT @@ -181,7 +181,7 @@

$(gettext "Login")

-$(gettext "Not yet and account or trouble with you account? Please send +$(gettext "No account yet or trouble with you account? Please send a request to $ADMIN_MAIL with your real name, user name, mail and password.") $(online_signup)
@@ -258,8 +258,8 @@ EOT } -# The CM style parser. Just title, simple text formating and internal -# link, as well as images and use HTML for other stuff. Keep it fast! +# The CM style parser. Just a title, simple text formating and internal +# links, as well as images and use HTML for other stuff. Keep it fast! # To make TinyCM as easy as possible we have a small HTML editor/helper # written in Javascript wiki_parser() { @@ -386,7 +386,7 @@ header html_header user_box - echo "

gettext "User already exist: $user"

" + echo "

gettext "User already exists: $user"

" html_footer fi ;; esac @@ -429,7 +429,7 @@ EOT else - gettext "You must be logged to edit pages" + gettext "You must be logged in to edit pages" fi html_footer ;; *\ save\ *) @@ -499,7 +499,7 @@ if [ "$ONLINE_SIGNUP" == "yes" ]; then signup_page else - gettext "Online registration is disable" + gettext "Online registration is disabled" fi html_footer ;; *\ logout\ *) @@ -548,7 +548,7 @@ done echo '' else - gettext "You must be logged to view the dashboard." + gettext "You must be logged in to view the dashboard." fi html_footer ;; *\ hg\ *) @@ -568,7 +568,7 @@ cd $content/ && hg init echo '[hooks]' > .hg/hgrc echo 'incoming = hg update' >> .hg/hgrc - gettext "Adding current content and commiting"; echo + gettext "Adding current content and committing"; echo [ ! -f "$wiki/index.txt" ] && touch $wiki/$index.txt hg add && hg commit -u "$NAME <$MAIL>" \ -m "Initial commit with curent content" diff -r 4067b670d4ee -r 9d0f7be12384 lib/functions.js --- a/lib/functions.js Wed Apr 11 16:18:59 2012 +0200 +++ b/lib/functions.js Sun Apr 22 10:49:23 2012 +0100 @@ -1,5 +1,5 @@ -// Insert HTML code into editor textarea. +// Insert HTML code into editor text area. function addCode(code) { document.forms["editor"]["content"].value = document.forms["editor"]["content"].value += code; diff -r 4067b670d4ee -r 9d0f7be12384 plugins/export/export.cgi --- a/plugins/export/export.cgi Wed Apr 11 16:18:59 2012 +0200 +++ b/plugins/export/export.cgi Sun Apr 22 10:49:23 2012 +0100 @@ -14,7 +14,7 @@ cat << EOT

Export

-$(gettext "Export to HTML and ceate a tarball of your text content or +$(gettext "Export to HTML and create a tarball of your text content or uploaded files.")

diff -r 4067b670d4ee -r 9d0f7be12384 plugins/skel/skel.cgi --- a/plugins/skel/skel.cgi Wed Apr 11 16:18:59 2012 +0200 +++ b/plugins/skel/skel.cgi Sun Apr 22 10:49:23 2012 +0100 @@ -14,7 +14,7 @@ # Say we use files in $DATA/skel, sort them by date and simply cat # the files, this will create a simple blog :-) We may add post via - # uploads or an HTML form. + # uploads or a HTML form. html_footer exit 0 diff -r 4067b670d4ee -r 9d0f7be12384 tools/serv.sh --- a/tools/serv.sh Wed Apr 11 16:18:59 2012 +0200 +++ b/tools/serv.sh Sun Apr 22 10:49:23 2012 +0100 @@ -1,6 +1,6 @@ #!/bin/sh # -# Serv TinyCM via Busybox HTTPd +# Serve TinyCM via Busybox HTTPd # port=8084