NAME

bloglet - keep a weblog with as little work as possible


SYNOPSIS

bloglet [ rcfile ]


DESCRIPTION

bloglet is a simple program to let you keep a simple weblog (or `bloglet'). When configured properly, it simply prompts you for a new log entry, and then adds the entry to the log, quietly taking care of details like creating the log the first time you use it, identifying and hyperlinking any URLs that you enter, archiving it when it gets too full, and backing it up every time you edit it. When configured improperly it coughs and sputters, and then creates a mildly deformed weblog.


Configuration

The configuration for your bloglet is stored in the .blogletrc file in your home directory. In this file, you can set ten configuration variables, and four pieces of html to control the look of the bloglet. The variables are set, one per line, in a simple name::value format. The html snippets can extend over several lines, and are delimited by the variable name on a line by itself, to begin, and the word 'end' on a line by itself, to end the snippet. You can also use an alternate configuration file, by supplying its filename as the argument to bloglet. This is useful if you keep multiple bloglets.


Configuration Variables

archive_after - This is the number of log entries per page. When the total number of log entries exceeds archive_after, the log is moved off to an archive file, and a new log is created containing only the current entry. Defaults to 60

archive_now - If this is set to 1, it forces bloglet to archive the log. This is useful if you have changed the html formatting and need to avoid contaminating the page with entries in the earlier format. Ordinarily it should be set to 0, or left unset. Defaults to 0

archive_head, archive_tail - These are the two user defined parts of the archive filename. When creating an archive, bloglet chooses its filename by concatenating archive_head, an identification number based on the date and time, and archive_tail. archive_head defaults to bloglet-archive- and archive_tail defaults to .html

archive_url_prefix - Sometimes your bloglet may be accessed from a different location than your bloglet archive. If this is the case, you can set the archive_url_prefix, and it will be automatically prefixed onto all html links to your bloglet archives.

bloglet_path - This is the directory in which your bloglet is stored. Defaults to ~/public_html/

bloglet_location - This is the filename of your bloglet. If it begins with a slash, it is assumed to be an absolute pathname, otherwise it is assumed to be a file in the directory specified by bloglet_path. Defaults to bloglet.html

backup_location - This is the filename of the backup copy of your bloglet, which will always contain a copy of the bloglet as it was before the last addition. As with bloglet_location, it is assumed to be in bloglet_path unless an absolute pathname is given. Defaults to bloglet.html.bak

allow_html - If set to 1, html tags will be allowed in log entries, but not checked for correctness. If set to 0, < and > characters will be quietly converted to &lt; and &gt;, the html codes for < and >, leaving html tags useless but harmless. Defaults to 1

prompt - This is the prompt with which bloglet asks you for a new entry. Defaults (really!) to Enter your words of wisdom, O bold blogledyte:

self_link_text - Each log entry can contain a link to itself. If you include this self-link, self_link_text will be used as the text for this link. Defaults to an underscore (_)

multi_line - If this is set to 1, bloglet will accept multi-line input, terminating on the first blank line.

kernify - If this is set to 1, bloglet will ``kernify'' your entries, by replacing the self_link_text with the last character of each entry. It's how Kerne does his bloglet, hence the name.


HTML Snippets

The html snippets are header_html, entry_html, footer_html, and blank_html. Every bloglet file will consist of the header, a long string of entries, and the footer. Within these snippets, %entry will be replaced by the current log entry, %anchor by an html anchor to the current entry, %self by a link to the current entry (see self_link_text, in the previous subsection), %date by the date, %time by the time, %id by the unique id number of the %current entry, and %archive by the name of the most recent archive file. blank_html is something of an exception: it is used only once, when you first create your bloglet, as the html source for the page to display when no more archive pages are available. % variable substitutions are not made within blank_html, for obvious reasons.


Editing Your Bloglet Directly

If you want to change old log entries, you can open edit your bloglet directly, but remember two things: First, you must be careful not to change or move the two comments that bloglet inserts into the html code, the first of which looks something like <!-- BLOGLET entry:1 archive:archive.html --> and the second of which looks like <!-- FOOTER -->. Second, any code above the BLOGLET comment or below the FOOTER comment will be replaced next time a log entry is added. For these sections, you are better off editing the header_html and footer_html in .blogletrc.

If you want to edit the last archive page after it has been created, you should do so not by editing blank_html, but by editing the file directly. It's name is bloglet-0.html.


FILES

bloglet will look for preferences in the .blogletrc file in your home directory. It will also create an html file for your bloglet, a backup of this file, and a growing set of archive files as your bloglet fills up and is archived, all in the places you specify.


CAVEATS

bloglet expects everything to be properly configured, and may make some trouble for you if it is not. In particular, if the BLOGLET comment in your bloglet is missing, running bloglet will destroy your old log entries.

Occasionally, if you punctuate too perversely, bloglet will either fail to notice a URL you have entered, or mistakenly treat something as part of a URL. This is inevitable: there's only so much that can be done with regular expressions. If this happens, you can just open up your bloglet and hand-edit the html to fix it. If you have a situation that you fear will confuse bloglet, you can enter the html code for the link yourself, when you type in your entry--bloglet won't do anything to URLs that are already in links. Note, however, that bloglet is good enough to understand that, if a URL comes at the end of a sentence, the period is not part of the URL.

Also keep in mind that the backup file only lasts for one log entry. If you destroy your bloglet somehow, and then run bloglet again before recovering it, the backup will be lost.


BUGS

They're bound to be there, but I don't know what they are. Email me about them if they come up.


AUTHOR

The author, Moss Collum, may be reached by email at <bloglet-dev@m14m.net>, or by snail-mail at Moss Collum 504 Matheson St. #11 Healdsburg, CA 95448


HISTORY

5 - 7 July 2000: Wrote version 2, adding customization, auto-backups, and archiving. Complete rewrite


COPYRIGHT

This software is in the public domain. Do with it as you will. If you use it somewhere, it would be nice to give me credit for it.