you can customise it yourself), and "template" config option to allow
the user to specify their own template.
+Added --dir option for people who want two lots of rawdog state (for two
+sets of feeds, for instance).
+
- rawdog 1.2
Updated feedparser to 2.5.2, which fixes a bug that was making rawdog
"--update" action, then the "--write" action. The actions supported are
as follows:
-"--help": Provide a brief summary of all the options rawdog supports.
-
"--update" (or "-u"): Fetch data from the feeds and store it. This could
take some time if you've got lots of feeds.
default" in your config file, and you'll get a copy of the default
template to edit.
+There are also the following options which may only be supplied once
+(they're read before any of the actions are performed):
+
+"--help": Provide a brief summary of all the options rawdog supports,
+and exit.
+
+"--dir DIR" (or "-d DIR"), where DIR is a directory: Use DIR instead of
+the $HOME/.rawdog directory. This is useful if you want to have two or
+more completely different rawdog setups with different sets of feeds;
+just create a directory for each.
+
You will want to run "rawdog -uw" periodically to fetch data and write
the output file. The easiest way to do this is to add a crontab entry
that looks something like this:
print """rawdog, version """ + VERSION + """
Usage: rawdog [OPTION]...
+General options (use only once):
+-d|--dir DIR Use DIR instead of ~/.rawdog
+--help Display this help and exit
+
+Actions (performed in order given):
-u, --update Fetch data from feeds and store it
-l, --list List feeds known at time of last update
-w, --write Write out HTML output
-f|--update-feed URL Force an update on the single feed URL
-c|--config FILE Read additional config file FILE
-t, --show-template Print the template currently in use
---help Display this help and exit
-
-Actions are taken in the order they are given on the command line.
Report bugs to <azz@us-lot.org>."""
"""The command-line interface to the aggregator."""
try:
- (optlist, args) = getopt.getopt(argv, "ulwf:c:t", ["update", "list", "write", "update-feed=", "help", "config=", "show-template"])
+ (optlist, args) = getopt.getopt(argv, "ulwf:c:td:", ["update", "list", "write", "update-feed=", "help", "config=", "show-template", "dir"])
except getopt.GetoptError, s:
print s
usage()
return 1
+ statedir = os.environ["HOME"] + "/.rawdog"
for o, a in optlist:
if o == "--help":
usage()
return 0
+ elif o in ("-d", "--dir"):
+ statedir = a
# Support old option syntax.
for action in args:
else:
optlist.append(("update-feed", action))
- statedir = os.environ["HOME"] + "/.rawdog"
try:
os.chdir(statedir)
except OSError: