Rearrange docs default tip
authorMyhailo Danylenko <isbear@ukrpost.net>
Mon, 20 Aug 2012 20:37:24 +0300
changeset 40 fbdae6975352
parent 39 46a3adff42b5
Rearrange docs
CMakeLists.txt
README
TODO
avatar.rc
docs/avatar.rc
docs/index.mdwn
docs/readme.mdwn
docs/todo.mdwn
--- a/CMakeLists.txt	Wed Aug 08 14:46:06 2012 +0300
+++ b/CMakeLists.txt	Mon Aug 20 20:37:24 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-avatar
 #
-# 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-avatar 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
@@ -26,9 +26,9 @@
 pkg_check_modules(LM REQUIRED loudmouth-1.0)
 pkg_check_modules(PNG REQUIRED libpng)
 pkg_check_modules(MCABBER REQUIRED mcabber)
-set(AALIB_LIBRARY_DIRS "/usr/lib" CACHE FILEPATH "Path, where AAlib is located")
-set(AALIB_INCLUDE_DIRS "/usr/include" CACHEĀ FILEPATH "Path to AAlib includes")
-set(AALIB_LIBRARIES "-laa" CACHE TEXT "Libraries, necessary to link with AAlib")
+set(AALIB_LIBRARY_DIRS "/usr/lib"     CACHE PATH   "Path, where AAlib is located")
+set(AALIB_INCLUDE_DIRS "/usr/include" CACHEĀ PATH   "Path to AAlib includes")
+set(AALIB_LIBRARIES    "-laa"         CACHE STRING "Libraries, necessary to link with AAlib")
 include(CheckIncludeFile)
 set(CMAKE_REQUIRED_INCLUDES ${MCABBER_INCLUDE_DIRS})
 check_include_file(mcabber/pep.h HAVE_MCABBER_PEP_H)
@@ -79,7 +79,7 @@
 if(DPKG_EXECUTABLE)
 	execute_process(COMMAND ${DPKG_EXECUTABLE} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
 else()
-	set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE TEXT "Architecture of package")
+	set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE STRING "Architecture of package")
 endif()
 set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
 set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so")
@@ -89,7 +89,7 @@
 
 ## Installation
 install(TARGETS avatar DESTINATION lib/mcabber) 
-install(FILES avatar.rc COPYING TODO README DESTINATION share/doc/${CPACK_PACKAGE_NAME})
+install(FILES docs/avatar.rc COPYING docs/todo.mdwn docs/readme.mdwn DESTINATION share/doc/${CPACK_PACKAGE_NAME})
 install(DIRECTORY help DESTINATION share/mcabber)
 install(FILES ${PROJECT_BINARY_DIR}/avatar.avv DESTINATION share/mcabber/avv/modules RENAME avatar)
 
--- a/README	Wed Aug 08 14:46:06 2012 +0300
+++ b/README	Mon Aug 20 20:37:24 2012 +0300
@@ -1,71 +1,1 @@
-
-This is a module, implementing avatar publishing/retrieving via pep/pubsub.
-This module informs you, when your buddies publish their avatars via pep
-and provides command '/avatar' to publish your own. But this is not all.
-It also will show you buddy's avatar! Yes, it is aalib :)
-
-This module depends on module 'pep'.
-
-For this module to actually do something you should set option
-avatars_directory - a place, where your buddy's avatars will be saved.
-
-Note, that currently only pubsub-publishing of avatars is supported
-(retrieving too works only for pubsub, but there you will be at least
-informed of url, that you can use to view avatar manually). Thus, as
-standard states, that pubsub-published data must be image/png, your
-avatar should be in png format.
-
-To receive notifications you need only to load it (better at startup, as
-I had some problems otherwise due to server's caching features). Then when
-your buddy will change avatar, you will receive notification and new
-avatar will be downloaded, saved and printed to buddy's window. To publish
-avatar you need your server to support both pep and pubsub (many public
-jabber servers offer only pubsub or neither, while for example prosody in
-default debian's complectation supports only pep).
-
-You can use AAOPTS environment variable to set aalib operation options, like
-contrast, brightness, etc (you can change mcabber environment at run-time
-with env module). For a list of options see aalib documentation:
-http://aa-project.sourceforge.net/aalib/aalib_9.html
-
-INSTALLATION
-
-To install it, you need:
-loudmouth
-glib
-aalib
-libpng
-mcabber's headers
-pep module's headers
-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-avatar*.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
--- a/TODO	Wed Aug 08 14:46:06 2012 +0300
+++ b/TODO	Mon Aug 20 20:37:24 2012 +0300
@@ -1,6 +1,1 @@
-
-Add avatar_aa_options?
-Handle url avatars? (needs common image loading library (sdl-image? imlib?) and web-retrieving library (curl?))
-Report no-avatar
-Add method to inform other software chunks about avatar change? (external command / custom hook)
-
+docs/todo.mdwn
\ No newline at end of file
--- a/avatar.rc	Wed Aug 08 14:46:06 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-
-# All options can be changed in runtime, so, feel free to experiment
-
-# Directory, where avatars will be saved. Note, that without saving
-# avatar current implementation cannot show it. Avatars are saved by
-# their id (sha1sum of png data), and symlinked by jids. I.e.
-# 12345...679.png contains png data
-# foo@bar.org is symlink to 12345...679.png
-set avatar_directory = ~/.mcabber/avatars
-
-# Set this to your terminal's font character dimensions in pixels.
-# This will allow to retain real png image proportions.
-set avatar_font_height = 16
-set avatar_font_width  = 8
-
-# Maximum width and height in characters. Can be omitted, then these
-# will be autodetected based on COLUMNS and LINES variables (they
-# must exist in mcabber's environment, i.e. you should export them
-# or you will be limited to 80x25). 
-#set avatar_max_width  = 110
-#set avatar_max_height = 40
-
-# Background color to use for transparent images.
-# In fact in range 0..65535, but looks like actually matter only
-# first 9 bits (what does 9th bit I do not know, but it definitely
-# changes resulting image a bit)
-set avatar_background = 255
-
-module load avatar
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/avatar.rc	Mon Aug 20 20:37:24 2012 +0300
@@ -0,0 +1,30 @@
+
+# All options can be changed in runtime, so, feel free to experiment
+
+# Directory, where avatars will be saved. Note, that without saving
+# avatar current implementation cannot show it. Avatars are saved by
+# their id (sha1sum of png data), and symlinked by jids. I.e.
+# 12345...679.png contains png data
+# foo@bar.org is symlink to 12345...679.png
+set avatar_directory = ~/.mcabber/avatars
+
+# Set this to your terminal's font character dimensions in pixels.
+# This will allow to retain real png image proportions.
+set avatar_font_height = 16
+set avatar_font_width  = 8
+
+# Maximum width and height in characters. Can be omitted, then these
+# will be autodetected based on COLUMNS and LINES variables (they
+# must exist in mcabber's environment, i.e. you should export them
+# or you will be limited to 80x25). 
+#set avatar_max_width  = 110
+#set avatar_max_height = 40
+
+# Background color to use for transparent images.
+# In fact in range 0..65535, but looks like actually matter only
+# first 9 bits (what does 9th bit I do not know, but it definitely
+# changes resulting image a bit)
+set avatar_background = 255
+
+module load avatar
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/index.mdwn	Mon Aug 20 20:37:24 2012 +0300
@@ -0,0 +1,10 @@
+
+[[!meta title="mcabber-avatar"]]
+<a name="mcabber-avatar"></a>
+# PEP avatars for MCabber
+
+Allows to publish, notify of update, retrieve and even view
+PEP avatars in MCabber (yes, it uses aalib).
+
+[ [[!hg mcabber-avatar desc="SOURCE"]] ] [ [[README|readme]] ] [ [[TODO|todo]] ] [ [[RC|avatar.rc]] ]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/readme.mdwn	Mon Aug 20 20:37:24 2012 +0300
@@ -0,0 +1,78 @@
+
+# PEP avatars for MCabber
+
+This is a module, implementing avatar publishing/retrieving via
+pep/pubsub. This module informs you, when your buddies publish their
+avatars via pep and provides command '/avatar' to publish your own.
+But this is not all. It also will show you buddy's avatar!
+Yes, it is aalib :)
+
+This module depends on module 'pep'.
+
+For this module to actually do something you should set the option
+'avatars_directory' - a place, where your buddy avatars will be saved.
+
+Note, that currently only pubsub-publishing of avatars is supported
+(retrieving too works only for pubsub, but there you will be at least
+informed of url, that you can use to view avatar manually). Thus, as
+standard states, that pubsub-published data must be image/png, your
+avatar should be in png format.
+
+To receive notifications you need only to load it (better at startup,
+as I had some problems otherwise due to server's caching features).
+Then when your buddy will change avatar, you will receive notification
+and new avatar will be downloaded, saved and printed to buddy's window.
+To publish avatar you need your server to support both pep and pubsub
+(many public jabber servers offer only pubsub or neither, while for
+example prosody in default debian's complectation supports only pep).
+
+You can use AAOPTS environment variable to set aalib operation options,
+like contrast, brightness, etc (you can change mcabber environment at
+run-time with 'env' module). For a list of options see aalib
+documentation: <http://aa-project.sourceforge.net/aalib/aalib_9.html>
+
+# Installation
+
+To install it, you need:
+
+ * mcabber headers
+ * mcabber-pep module headers
+ * libpng
+ * aalib
+ * glib
+ * loudmouth
+ * 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-avatar_*.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/todo.mdwn	Mon Aug 20 20:37:24 2012 +0300
@@ -0,0 +1,6 @@
+
+* Add avatar_aa_options?
+* Handle url avatars? (needs common image loading library (sdl-image? imlib?) and web-retrieving library (curl?))
+* Report no-avatar
+* Add method to inform other software chunks about avatar change? (external command / custom hook)
+