From c3248e395661c790e05991282bc5cb77991caa21 Mon Sep 17 00:00:00 2001 From: octo Date: Thu, 21 Apr 2005 08:12:59 +0000 Subject: [PATCH] Added some more text to the manpage. Changed default storage_dir to ~/.onis/data --- lib/Onis/Data/Persistent/Dbm.pm | 12 ++++++++++-- lib/Onis/Data/Persistent/Storable.pm | 11 +++++++++-- onis | 17 ++++++++++------- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/lib/Onis/Data/Persistent/Dbm.pm b/lib/Onis/Data/Persistent/Dbm.pm index 2e1cac6..402d0ee 100644 --- a/lib/Onis/Data/Persistent/Dbm.pm +++ b/lib/Onis/Data/Persistent/Dbm.pm @@ -35,8 +35,16 @@ onis' main directory.. =cut -our $DBMDirectory = get_config ('storage_dir') || 'var'; -$DBMDirectory =~ s#/$##g; +our $DBMDirectory = 'var'; +if (get_config ('storage_dir')) +{ + $DBMDirectory = get_config ('storage_dir'); +} +elsif ($ENV{'HOME'}) +{ + $DBMDirectory = $ENV{'HOME'} . '/.onis/data'; +} +$DBMDirectory =~ s#/+$##g; if (!$DBMDirectory or !-d $DBMDirectory) { diff --git a/lib/Onis/Data/Persistent/Storable.pm b/lib/Onis/Data/Persistent/Storable.pm index 704cd65..f85953b 100644 --- a/lib/Onis/Data/Persistent/Storable.pm +++ b/lib/Onis/Data/Persistent/Storable.pm @@ -39,8 +39,15 @@ Sets the directory in which B can be found. =cut our $StorageFile = get_config ('storage_file') || 'storage.dat'; -our $StorageDir = get_config ('storage_dir') || 'var'; - +our $StorageDir = 'var'; +if (get_config ('storage_dir')) +{ + $StorageDir = get_config ('storage_dir'); +} +elsif ($ENV{'HOME'}) +{ + $StorageDir = $ENV{'HOME'} . '/.onis/data'; +} $StorageDir =~ s#/+$##; if (!-d $StorageDir) diff --git a/onis b/onis index 6e2e860..fc2cf58 100755 --- a/onis +++ b/onis @@ -89,7 +89,6 @@ foreach ('Core', get_config ('plugin')) if (!get_config ('input')) { - # TODO: Make a complete (!) lsit.. print STDERR < [logfile logfile ..] @@ -103,7 +102,7 @@ Options: See 'config' for a complete list. --user Define's the generator's name. -For a full list of all options please read the ``config'' file. +For a full list of all options please read the onis(1) manpage. EOF exit (1); } @@ -406,7 +405,8 @@ parsed. =item B: I; -Sets the user generating the stats if it's not detected right. +Sets the user that created the page. Defaults to the environment variable +B or "onis", if it is not set. =item B: I; @@ -429,11 +429,14 @@ Theme file to load. =item B: I; -Sets the stylesheet (.css file) to use. This should be set in a theme file. +Sets the stylesheet to use. This is included in the HTML-file as-is, so you +have to take care of absolute/relative paths yourself.. =item B: I; -Wether to print mIRC color-codes or filter them. +Wether or not to print the color codes (introduced by mIRC, used by idiots and +ignored by the rest) in the generated HTML-file. Of course this defaults to not +print the codes.. =item B: I; @@ -475,8 +478,8 @@ the theme-file. =item B: I; -Sets the encoding for the output file. This is merely the string that will be -included in the generated HTML file. +Sets the encoding to include in the HTML-file. If you don't know what this is, +don't change it.. =item B: I; -- 2.11.0