NanoBlogger is a small weblog engine written in Bash for the command
line. It uses common UNIX tools such as cat, grep, and sed to create
static HTML content. Copyright (C) 2003-2006 Kevin Wood

Installing NanoBlogger
----------------------
1. download gzipped tarball from:
   http://nanoblogger.sourceforge.net/downloads/
2. tar xzvf nanoblogger-xx.tar.gz to [install-dir] (e.g.
   install-dir = $HOME)

Generic Upgrade Instructions
----------------------------

This is the classic three step upgrade process that's guarenteed to work
99.9% of the time.

1. create a new weblog directory using nanoblogger (skip the
   configuration):
	nb -b [new-blog-dir] -a

2. copy the old data directory over to the new weblog directory:
	cp -r [old-blog-dir]/data [new-blog-dir]

3. edit the new blog.conf to your likings and rebuild
   the weblog:
	nb -b [new-blog-dir] --configure -u all

Upgrading to 3.3 (from at least 3.1)
------------------------------------

Typically there shouldn't be much involved in an upgrade, but not only
did 3.3 include a complete rewrite of the templates, it also introduces
some major feature enhancements. Some of the changes include new
configuration variables, new template variables, and alterations to the
format of an entry. Basically all the changes that one arguably
shouldn't make between releases has been done.

The following notes were created from the process of converting a weblog
from version 3.1 to 3.3.

1. Templates and Style sheets:
  1. rename "templates" and "styles" directories from your weblog's
     directory (e.g. mv templates old.templates).
  2. copy new "templates" and "styles" directories into your weblog's
     directory (e.g. cp -r [nb-basedir]/default/templates [weblog-dir]).
  3. optionally transition the old templates, paying close attention to
     changes in the template's variables.

NOTE: many of the template variables were changed to a shorter naming
convention, so for example "$NB_Recent_Entries" was reduced to
"$NB_RecentEntries". You can see a list of common template variables in
nanoblogger.html.

2. Data (entries):
You have two format options
  1. keep using the old format
     METADATA_CLOSETAG must be set to "-----" in your blog.conf.
  2. modify entries to use new format (recommended)
     METADATA_CLOSETAG should be set to "END-----" in your
     blog.conf.

If you choose to modify all your entries to the new format remember to
backup your weblog first. Once you're sure you have a backup stored
safely away we can begin the process of converting the entries.

Here's a quick example script that may be copied and saved to an
executable file and executed from your weblog's "data" directory.
#!/bin/sh
# converts 3.1-3.2 entries to 3.3
suffix=txt
# $new_suffix must match NB_DATATYPE
new_suffix=htm
for entry in *.$suffix; do
	sed -e '5!{ /^[\-][\-][\-][\-][\-]/ s//END-----/; }' $entry > \
		$entry.new
	# help changing .$suffix to .$new_suffix
	# entry_base=`basename $entry .$suffix`
	# mv $entry.new $entry_base.$new_suffix
 	# else just use this
	mv $entry.new $entry
done
#eof

NOTE: "5!" tells sed to ignore the fifth line where the first seperator
occurs. This only works for the old entries, in other words *don't* add
new entries with 3.3 until you've finished this step!!

3. Configuration files:
There are many additional configuration directives that you may wish to
take advantage of.

Upgrade your blog.conf
  1. backup old blog.conf (e.g. cp blog.conf old.blog.conf)
  2. compare differences between default/blog.conf and weblog's blog.conf
  3. adjust/add/remove config variable settings as needed.
  4. save new blog.conf and update weblog (e.g. nb -u all)

4. Articles (plugin):
You have two options
  1. use the articles_text.sh plugin
  2. use the articles_meta.sh plugin and modify all your articles
     to use the new format (recommended). You can use the new template,
     file.metadata for general reference.

5. Plugins:
If you created your own plugins, then you'll have to take into account
any changes to variables that your plugins may depend on.

Final Notes
-----------

For more in depth documentation please see nanoblogger.html which
should've been included with your copy of NanoBlogger.

SF.net Project Page: http://nanoblogger.sourceforge.net
Yahoo! Mailing List: http://groups.yahoo.com/group/nanoblogger
