TinyCM - A micro CGI/SHell Content Manager!
================================================================================


	* CGI/Shell powered, small Wiki syntax and HTML JS editor helper
	* Tiny, fast, elegant 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 formatting rules, macro and HTML example code
	* Gettext support and languages support for documents
	* Mercurial integration with web and cmdline commits
	* Shared and secure authentication system
	* Easily themable and fine desktop integration


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 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 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's download the Content Manager:

	$ wget http://hg.slitaz.org/tinycm/archive/tip.tar.gz
	$ tar xzf tinycm-*.tar.gz
	
Or clone the Mercurial repo:
	
	$ hg clone http://hg.slitaz.org/tinycm


Change directory to the CM, check and edit the configuration file config.cgi,
and use make to install:

	$ cd tinycm*
	$ editor config.cgi
	$ make install

If you want to install the web interface and auth DB in another directory
other than /var/www and /var/lib/slitaz you can use the following command:

	$ make install WEB=/path/to/domain/vhost AUTH=/path/to/domain

If you already have a users DB and want to share auth system you can install
TinyCM with:

	$ make install-web WEB=/path/to/domain/vhost

Plugins
-------
All plugins are located in plugins/* and consist of a SHell script, a config
file and an optional help.txt file. To start a new plugin simply copy and
rename the skel directory and files. Then edit the configuration file and
start coding. 


Standalone Server
-----------------
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
helps to debug TazCM since error messages are displayed in the terminal. To
start the server, cd to TinyCM dir and execute:

$ ./tools/serv.sh


Mercurial integration
---------------------
TinyCM can be integrated smoothly with Mercurial, each new document and edit
will be committed. You must first edit your config.cgi configuration to 
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 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 provides a small web interface to display a Hg log but it can
be extended via a plugin. Hook for $content/.hg/hgrc:

[hooks]
incoming = hg update


Translation
-----------
To start a new translation please use msginit from the pot file directory.
Example for French/France locale (fr_FR):

	$ msginit -l fr_FR -o fr.po -i tinycm.pot

To update all pot files when some new strings have been added (mainly for
developers before commit):

	$ make pot

To update all translations from the pot file:

	$ make msgmerge

To compile po files for testing purposes you can use 'make msgfmt' or manually
compile your translation. Example for french locale, note that the file must
be copied into /usr/share/locale/fr/LC_MESSAGES so gettext can find it:

	$ msgfmt -o tinycm.mo fr.po


================================================================================
