paperlined.org
apps > mozilla > projects > slogger > 0.6.20061221_patched > chrome > jar > content
document updated 18 years ago, on Apr 11, 2006
Slogger Documentation
-- About
-- Getting Started
-- Settings
-- Slogger Profiles
---- General Tab
---- Save Pages Tab
---- Log File Tab
---- Filters Tab
---- Services Tab
---- Custom Script Tab
---- Confirmation Tab
-- Variables
-- Profiles
-- FAQ
-- Contributors
-- Source Code and Downloads
 
Slogger Documentation

This is the documentation packaged with Slogger version 0.6.20060410. Check the web for updated versions of this document.

 
About
top

Slogger is an Extension for Mozilla Firefox web browser. It is a very flexible tool for creating a complete log of your browsing history (thus the name: Slogger <=> "browse logger"). It can save pages you visit to your hard drive, and create custom-format history logs about pages visited (included are templates for plain text, HTML RDF, and XML). You can use style sheets (CSS-HTML, XSLT-XML, XUL-RDF) to view logs, or use external programs to parse the data for your needs.

Almost everything in slogger is customizable, so it's best to try and see how you can change it. Settings are stored in different "profiles", making it easy to switch between different uses. Several profiles will come installed with Slogger to provide some examples of how it can be used.

But, here's a few random possible uses:

 
Getting Started
top

If you are first trying Slogger, you may want to initially keep the default settings, just to see what it does. Once you do, browsing the settings should give you a good idea of what the different options do. (If you are upgrading from a previous version, you might want to reset all settings back to the defaults in case any names have changed).

 
Settings
top

You can set Slogger to do something when certain actions occur in the main setting dialog: Firefox toolbar->Slogger->Settings... The actions you can set are:

If you right-click on the Firefox toolbar, and select "Customize...", you can find the six buttons associated with slogger. You can drag any number of these to the toolbar to use and set to perform certain actions.

 
Slogger Profiles
top

When some action (such as a page loading or a Slogger button clicked) occurs, some set of Slogger "profiles" is executed (not to be confused with Firefox profiles). When you click "Edit Profile", you'll see a dialog with a bunch of tabs and a whole bunch of options. Hopefully most are self explainatory, but some explainations will be below.

 
General Tab
top
 
Save Pages Tab
top
Saved Page

(this applies to old version). Note that default filename for the saved page has the complete date/time stamp, down to the millisecond. Including date/time info in the filename not only provides that information, but this also ensures that the filename is unique. If the filenames are not unique, it should choose something that is (such as appending numbers to the end). Note that the files and their data are stored in a subfolder "data" of the main slogger folder. This was done so you can view the Slogger folder in Firefox and see the logs without wading thru a bunch of other files.

 
Log File Tab
top
Log File

On the other hand, you probably do not want the log file to be unique for each log since the log file is appended to each time. If you keep the default setting containing date/time info up to the day, then a new log file will be started each day. Likewise, you could do $year.log, slogger.log (a constant), etc. Or using $host.log will create a separate log file for each host visited (e.g. www.amazon.com, etc.).

The Log File textarea contains the text that will be appended to the log file every time a page is logged. Later in the help file, there are some examples of how you might use this.

 
Filters Tab
top

Delay to prevent duplicates

In testing, I noticed that visiting some pages the window load function was called several times within a second or two for reasons I do not know. The option to skip logging a page within x seconds avoids this. Also, you can put a very large value in there to avoid logging the same page twice in a row at all.

Blacklist and Whitelist

Each line is these lists should be a javascript boolean expression - it is evaluated to be true or false. Variables are repaced with simple string substitution, so quotes are required in some places you might not think.

Here's a few you might want to have in a blacklist... (When you click "Add...", you'd enter the bold part below into the message box)

 
Services Tab
top
 
Custom Script Tab
top

You can enter arbitrary javascript code that will be evaluated.

Creating custom menu items

In the Slogger menu on the menubar, you can add entries to open pages. You can do this with this custom script setting. Entries can be added with a call to the javascript function, sloggerAddMenu(label,url);. For example, if your profile creates the log file, you can include something in the custom script like,


sloggerAddMenu("View html log","/home/user/slogger/$year-$month-$day.html");

or,


sloggerAddMenu("View XML log","$sloggerDir/$logfile");

This function won't add entries that are already there, so you don't have to worry about continually adding the same thing.

 
Confirmation Tab
top

You can use this options to alter filenames or log entries each time a page is logged. For example, have something like <note><\note> in your log entry which you can quickly adda note to each page if you want.

 
Variables
top

In all your settings you can use the "$VARNAME" to insert the string value of the

Here are all the variables. This table is generated from the code.

NameTypefiledefaultdescription$profNameChar1  
$profDescrChar1  
$savepageTypeInt100=Web page, complete. 1=Web page, HTML. 0=text
$localfileDirChar1  
$localfileChar1  
$logfileDirChar1  
$logfileNameChar1  
$logfileContentChar1  
$text_logfile_menuitemChar1View logfileCaption for logfile link in custom menu
$logfileHeaderChar1  
$logfileFooterChar1  
$styleNameChar1  
$styleContentChar1  
$repeatDelayInt110 
$blacklistChar1  
$whitelistChar1  
$customScriptChar1  
$confirmStringChar1  
$urlChar0 URL of page being saved
$filenameChar0 Original file name of page being saved (from url)
$titleChar0 Title of original page, if exists (ie html title)
$hostChar0 host server (e.g. www.google.com)
$hostinvChar0 com.google.www
$pathChar0 portion of url
$filebaseChar0 filename before last period
$fileextChar0 filename after last period
$typeextChar0 'html' if content-type is text/html, otherwise save as $fileext
$typeChar0 content-type from HTTP header (MIME type)
$keywordsChar0 user-defined keywords (only writable from confirm window). reset to blank on each log.
$descChar0 description (only from confirm window). reset to blank on each log.
$clipChar0 text selected on page being saved
$datetimeChar0 string like: Thu Jun 10 2004 09:07:23 GMT-0400 (Eastern Daylight Time)
$yearChar0 Year, YYYY
$monthChar0 Month, MM (01-12)
$dayChar0 Day, DD (01-31)
$hourChar0 Hour, HH (00-23)
$minuteChar0 Minute, MM (00-59)
$secondChar0 Second, SS (00-59)
$millisecondChar0 Millisecond, mmm (000-999)
$lastURLChar0  
$lastTimeChar0  
$lastLogFileFolderChar0  
$lastLogFileChar0  
$execAction0Char0 list of profile files to execute on every page load (joined by '|')
$execAction1Char0 list of profile files to execute on (joined by '|')
$execAction2Char0 list of profile files to execute on (joined by '|')
$execAction3Char0 list of profile files to execute on (joined by '|')
$execAction4Char0 list of profile files to execute on (joined by '|')
$execAction5Char0 list of profile files to execute on (joined by '|')
$execAction6Char0 list of profile files to execute on (joined by '|')
$customMenuChar0 builds menu. format: label|uri|label|uri...
$versionChar0 slogger version number
$FFProfDirChar0 firefox profile directory (eg ~/.mozilla/firefox/---). set on install. you shouldn't change it.
$sloggerDirChar0 dir where slogger info is installed. on install, set to $FFProfDir/slogger
$sloggerProfDirChar0 this is where Slogger searches for Slogger profile files. on install set to $sloggerDir/profiles
$flipDirSlashBool00If set, '/' is replaced with '' in directories

Notes:

 
Profiles
top

When you install Slogger, there should be some included default profiles already there. Here's a brief description, but the best thing to do is just try them out and see what they do and how you can customize it.

Included with Slogger: (ver 0.6.20060410)

 
FAQ
top
(1) Does Slogger work with Mac OS X?
(2) How do I completely uninstall Slogger?
(3) What folders does Slogger use to store profiles?
(4) What happen to my Slogger profiles? Nothing appears under "Available Profiles".
(5) When I upgrade Slogger, why are there two versions appearing in the extension manager?

(1) Does Slogger work with Mac OS X?

There are some known bugs for Mac OS X. Let me know if you know what they are or why they might be happening...

(2) How do I completely uninstall Slogger?

You can use the Firefox Extension manager to uninstall Slogger. But, some preferences are still stored. If these are possibly corrupted, you might want to remove them as well if you are trying to get a fresh install of Slogger. Find the pref.js file in your Firefox Profile Folder. After you uninstall Slogger, make sure Firefox is not running, and open that prefs.js file (with some text editor) and remove all lines with "slogger." in them.

(3) What folders does Slogger use to store profiles?

Slogger checks the variable $sloggerProfDir to see what folder to look for slogger profiles. On install, this variable is set to "slogger/profiles" within your Firefox Profile Folder. If you want to move your profiles, you can change $sloggerProfDir using about:config.

(4) What happen to my Slogger profiles? Nothing appears under "Available Profiles".

(5) When I upgrade Slogger, why are there two versions appearing in the extension manager?

There was a temporary version that used a different GUID, so if installing a newer version installs a second instance of Slogger instead of upgrading. Just delete the old one. (careful if you were storing the slogger data in the extension folder - this is removed when you delete an extension).

 
Contributors
top

Joe Walp contributed the service providers integration.

 
Source Code and Downloads
top

All older versions (XPI install files) can be found found on the web here.

source code