Rearrange docs
authorMyhailo Danylenko <isbear@ukrpost.net>
Mon, 20 Aug 2012 17:13:45 +0300
changeset 15 6222baf5dccc
parent 14 3f6d549befa8
child 16 faec1018028d
Rearrange docs
CMakeLists.txt
README
docs/index.mdwn
docs/readme.mdwn
docs/uptime.rc
uptime.c
uptime.rc
--- a/CMakeLists.txt	Sun Jul 22 15:59:37 2012 +0300
+++ b/CMakeLists.txt	Mon Aug 20 17:13:45 2012 +0300
@@ -1,10 +1,10 @@
-## Copyright 2009 Myhailo Danylenko
-# This file is part of mcabber module writing howto examples.
+## Copyright 2009-2012 Myhailo Danylenko
+# This file is part of mcabber-uptime
 #
-# Examples are free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
+# mcabber-uptime is a free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 2 of the
+# License, or (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -64,7 +64,7 @@
 
 ## Installation
 install(TARGETS uptime DESTINATION lib/mcabber) 
-install(FILES uptime.rc COPYING README DESTINATION share/doc/${CPACK_PACKAGE_NAME})
+install(FILES docs/uptime.rc COPYING docs/readme.mdwn DESTINATION share/doc/${CPACK_PACKAGE_NAME})
 install(DIRECTORY help DESTINATION share/mcabber)
 install(FILES ${PROJECT_BINARY_DIR}/uptime.avv DESTINATION share/mcabber/avv/modules RENAME uptime)
 
--- a/README	Sun Jul 22 15:59:37 2012 +0300
+++ b/README	Mon Aug 20 17:13:45 2012 +0300
@@ -1,41 +1,1 @@
-
-This is a mcabber module to show mcabber uptime. It is probably linux-specific,
-and will not work on other systems.
-
-INSTALLATION
-
-To install it, you need:
-glib
-mcabber
-cmake
-make
-gcc
-
-Then do
-$ mkdir build
-$ cd build
-$ cmake ..
-$ make edit_cache
-$ make
-# make install
-
-Debian users can instead of make install do
-$ fakeroot make package
-# dpkg -i libmcabber-uptime*.deb
-
-Users of other distributions can select appropriate package
-generator, using cache editor.
-
-LICENSE
-
-This code underlies terms of GNU GPL v2 or later. You can find it in file COPYING
-from this distribution or on a GNU web-site <http://www.gnu.org/licenses/>.
-
-CONTACTS
-
-I will be happy to get feedback, patches, suggestions, etc.
-You can send me email or contact via jabber <isbear@unixzone.org.ua>.
-
-  -- Myhailo Danylenko <isbear@ukrpost.net>
-
-
+docs/readme.mdwn
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/index.mdwn	Mon Aug 20 17:13:45 2012 +0300
@@ -0,0 +1,10 @@
+
+[[!meta title="mcabber-uptime"]]
+<a name="mcabber-uptime"></a>
+# Uptime tracking for MCabber
+
+Tracks uptime starting from module load time or from
+mcabber start time, detected via '/proc'.
+
+[ [[!hg mcabber-uptime desc="SOURCE"]] ] [ [[README|readme]] ] [ [[RC|uptime.rc]] ]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/readme.mdwn	Mon Aug 20 17:13:45 2012 +0300
@@ -0,0 +1,49 @@
+
+# Uptime tracking for MCabber
+
+This is a mcabber module to track mcabber uptime. To do so you need
+either to have '/proc/self/stat', '/proc/uptime' and 'sysconf()'
+(probably, linux-specific) or load it at mcabber initialization time.
+
+To use first variant, set the 'uptime_use_proc' option.
+
+# Installation
+
+To install it, you need:
+
+ * mcabber headers
+ * glib
+ * cmake
+ * make
+ * c compiler (gcc)
+ * linker (binutils)
+
+Then do:
+
+    $ mkdir build
+    $ cd build
+    $ cmake ..
+    $ make edit_cache
+    $ make
+    # make install
+
+Debian users can instead of make install do:
+
+    $ make package
+    # dpkg -i libmcabber-uptime_*.deb
+
+Users of other distributions can select appropriate package generator,
+using cache editor.
+
+# License
+
+This code underlies terms of GNU GPL v2 or later. You can find it in
+file COPYING from this distribution or on a GNU web-site
+<http://www.gnu.org/licenses/>.
+
+# Contact
+
+I will be happy to get feedback, patches, suggestions, etc.
+You can send me email or contact via jabber <isbear@unixzone.org.ua>.
+
+  -- Myhailo Danylenko <isbear@ukrpost.net>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/uptime.rc	Mon Aug 20 17:13:45 2012 +0300
@@ -0,0 +1,8 @@
+
+# Use /proc filesystem information to determine mcabber
+# startup time. If not set, module load time will be starting
+# point for uptime calculations.
+set uptime_use_proc = 1
+
+module load uptime
+
--- a/uptime.c	Sun Jul 22 15:59:37 2012 +0300
+++ b/uptime.c	Mon Aug 20 17:13:45 2012 +0300
@@ -88,7 +88,7 @@
 	return (sec * hz) + (ssec * hz)/100;
 }
 
-void do_uptime (char *arg)
+static void do_uptime (char *arg)
 {
 	GString *line = g_string_new (NULL);
 	gchar strstartdate[256];
--- a/uptime.rc	Sun Jul 22 15:59:37 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-
-# Use /proc filesystem information to determine mcabber
-# startup time. If not set, module load time will be starting
-# point for uptime calculations.
-set uptime_use_proc = 1
-
-module load uptime
-