File: README

package info (click to toggle)
nanoblogger 3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 640 kB
  • ctags: 133
  • sloc: sh: 2,958; xml: 98; makefile: 33
file content (130 lines) | stat: -rw-r--r-- 4,881 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Last modified: 2007-01-13T17:21:50-05:00

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:
   http://nanoblogger.sourceforge.net/downloads/nanoblogger-xx.tar.gz
2. decompress gzipped tarball: tar xzfv nanoblogger-xx.tar.gz

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 3.1 or greater)
------------------------------------

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.

WARNING: For those using the default permanent link method
(ENTRY_ARCHIVES="0"), your URL's will changed!

1. Templates and Style sheets:
  * rename "templates" and "styles" directories from your weblog's
     directory (e.g. mv templates old.templates).
  * copy new "templates" and "styles" directories into your weblog's
     directory (e.g. cp -r [nb-basedir]/default/templates [weblog-dir]).
  * 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
  * keep using the old format
     METADATA_CLOSETAG must be set to "-----" in your blog.conf.
  * 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 must match actual suffix used for data files
suffix=htm
# $new_suffix must match NB_DATATYPE directive
new_suffix=txt
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

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!!

If you've changed the suffix of the entry data files, you will also have
to modify the category database files. With GNU sed, a simple:
sed -i -e 's/[\.]old_suffix/\.new_suffix/' cat_*.db

from inside the "data" directory, should do the job.

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

Upgrade your blog.conf
  * backup old blog.conf (e.g. cp blog.conf old.blog.conf)
  * compare differences between default/blog.conf and weblog's blog.conf
  * adjust/add/remove config variable settings as needed.
  * adjust maximum number of entries before pagination occurs, see
    nanoblogger.html for details.
  * save new blog.conf and update weblog (e.g. nb -u all)

4. Articles (plugin):
You have two options
  * use the articles_text.sh plugin
  * 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, you'll have to take into account any
changes to variables, settings, etc., 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.

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