tinycm annotate README @ rev 72

Add a link to blog archives for logged users
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 28 00:49:29 2014 +0200 (2014-04-28)
parents aff0e20fbd3e
children
rev   line source
pankso@0 1 TinyCM - A micro CGI/SHell Content Manager!
pankso@0 2 ================================================================================
pankso@0 3
pankso@0 4
paul@8 5 * CGI/Shell powered, small Wiki syntax and HTML JS editor helper
paul@33 6 * Tiny, fast, elegant and easy to install and customize
pankso@0 7 * No database, flat file storage with diff and log
pankso@0 8 * Plugins support for any kind of functions such as a blog
paul@33 9 * Help file with formatting rules, macro and HTML example code
paul@8 10 * Gettext support and languages support for documents
pankso@24 11 * Mercurial integration with web and cmdline commits
paul@33 12 * Shared and secure authentication system
paul@33 13 * Easily themable and fine desktop integration
pankso@0 14
pankso@0 15
pankso@0 16 Installation
pankso@0 17 ------------
pankso@0 18 You must first get TinyCM source code via a tarball on SliTaz mirrors or Hg
pankso@0 19 repository. You can extract or clone the CM under a web server directory,
paul@8 20 for security reasons the config file has a .cgi extension and users data are
paul@8 21 stored outside the web server in the directory /var/lib/slitaz. The user
pankso@0 22 files paths can be changed via the configuration file.
pankso@0 23
paul@8 24 When you have your copy of TinyCM you can then install a web interface under a
pankso@0 25 CGI/SHell enabled web server such as Busybox HTTPd, LightTPD or Apache. Gettext
paul@8 26 must be installed for localisation support. So, let's download the Content Manager:
pankso@0 27
pankso@19 28 $ wget http://hg.slitaz.org/tinycm/archive/tip.tar.gz
pankso@19 29 $ tar xzf tinycm-*.tar.gz
pankso@0 30
pankso@0 31 Or clone the Mercurial repo:
pankso@0 32
pankso@0 33 $ hg clone http://hg.slitaz.org/tinycm
pankso@0 34
pankso@0 35
paul@8 36 Change directory to the CM, check and edit the configuration file config.cgi,
pankso@0 37 and use make to install:
pankso@0 38
pankso@0 39 $ cd tinycm*
pankso@0 40 $ editor config.cgi
pankso@0 41 $ make install
pankso@0 42
paul@47 43 If you want to install the web interface and auth DB in another directory
paul@47 44 other than /var/www and /var/lib/slitaz you can use the following command:
pankso@45 45
pankso@45 46 $ make install WEB=/path/to/domain/vhost AUTH=/path/to/domain
pankso@45 47
paul@47 48 If you already have a users DB and want to share auth system you can install
pankso@45 49 TinyCM with:
pankso@45 50
pankso@45 51 $ make install-web WEB=/path/to/domain/vhost
pankso@0 52
pankso@29 53 Plugins
pankso@29 54 -------
pankso@29 55 All plugins are located in plugins/* and consist of a SHell script, a config
paul@33 56 file and an optional help.txt file. To start a new plugin simply copy and
pankso@29 57 rename the skel directory and files. Then edit the configuration file and
pankso@29 58 start coding.
pankso@29 59
pankso@29 60
pankso@0 61 Standalone Server
pankso@0 62 -----------------
paul@8 63 On SliTaz you can install a copy of TinyCM anywhere under your $HOME directory
pankso@0 64 and start the stand alone web server powered by Busybox HTTPd applet. This also
paul@8 65 helps to debug TazCM since error messages are displayed in the terminal. To
pankso@0 66 start the server, cd to TinyCM dir and execute:
pankso@0 67
pankso@12 68 $ ./tools/serv.sh
pankso@0 69
pankso@0 70
pankso@0 71 Mercurial integration
pankso@0 72 ---------------------
paul@8 73 TinyCM can be integrated smoothly with Mercurial, each new document and edit
paul@61 74 will be committed. You must first edit your config.cgi configuration to
paul@8 75 enable Hg with HG="yes" then login to your TinyCM, follow the link to init the
pankso@0 76 repo or do it manually: cd content && hg init && hg add && hg commit -m "Message"
pankso@0 77
paul@8 78 Then all content will be under Hg and people can commit as usual. To make sure
paul@8 79 we use the latest files on the web interface we use a Hook to update the repo on
pankso@0 80 each commit. To have the mercurial web interface for the repo you can setup
paul@8 81 a vhost, TinyCM provides a small web interface to display a Hg log but it can
paul@33 82 be extended via a plugin. Hook for $content/.hg/hgrc:
pankso@0 83
pankso@0 84 [hooks]
pankso@0 85 incoming = hg update
pankso@0 86
pankso@0 87
pankso@38 88 Translation
pankso@38 89 -----------
pankso@38 90 To start a new translation please use msginit from the pot file directory.
pankso@38 91 Example for French/France locale (fr_FR):
pankso@38 92
pankso@38 93 $ msginit -l fr_FR -o fr.po -i tinycm.pot
pankso@38 94
pankso@38 95 To update all pot files when some new strings have been added (mainly for
pankso@38 96 developers before commit):
pankso@38 97
pankso@38 98 $ make pot
pankso@38 99
pankso@38 100 To update all translations from the pot file:
pankso@38 101
pankso@38 102 $ make msgmerge
pankso@38 103
pankso@38 104 To compile po files for testing purposes you can use 'make msgfmt' or manually
pankso@38 105 compile your translation. Example for french locale, note that the file must
pankso@38 106 be copied into /usr/share/locale/fr/LC_MESSAGES so gettext can find it:
pankso@38 107
pankso@38 108 $ msgfmt -o tinycm.mo fr.po
pankso@38 109
pankso@38 110
pankso@0 111 ================================================================================