Source

DailyPromptBot / minibot /

Filename Size Date modified Message
..
config/localtest
test
34.3 KB
5.9 KB
2.4 KB
9.9 KB
6.8 KB
14.9 KB
20.2 KB
3.5 KB
68.0 KB
5.2 KB
23.9 KB
2.7 KB
15.6 KB
The Daily Prompt Mini-Bot - A Shut Up and Write Project
Version 0.8.0-beta

Author: Marc-Alexandre Chan <laogeodritt at arenthil.net>

Copyright (c) 2012 Marc-Alexandre Chan. Licensed under the GNU General Public
License version 3.0 or, at your option, any later version. See the COPYING file
included with this program.

For The Daily Prompt <http://reddit.com/r/thedailyprompt>
        A Shut Up and Write Project <http://reddit.com/r/shutupandwrite>

== Introduction ==

This application is the first step to automation of daily fiction-writing
prompts on The Daily Prompt reddit. It serves to check a reddit account's
private (generally a dedicated bot account), messages collect writing prompts
sent to it by authorized users (mods of a subreddit), queue them according to
the specified date, and post queued writing prompts at midnight on the specified
date.

== Running ==

Two scripts are provided in the root directory of this archive (NOT in the
minibot directory) to execute this application.

The minibotd.py script will run the bot as a daemon on UNIX-like systems. The
minibot.py script will run it as a general application.

minibotd.py takes one argument with the value "start", "stop" or "restart". For
example, to start the Mini-Bot as a daemon, while in the root directory,
type "./minibotd start" at the terminal.

Windows users must use the minibot.py script (execute without arguments). The
application may be safely stopped by typing Ctrl+C into the command-line or
terminal window on both UNIX-like and Windows systems. It is possible to use
pythonw.exe instead of python.exe to avoid spawning a command line window, but
no method for stopping the process is provided (aside killing the process via
`taskkill` or the Task Manager).

== Stopping ==

To stop a bot running as a daemon (minibotd.py), simply call `minibotd.py stop`.

To stop a bot on UNIX running normally (minibot.py), you can issue an INT signal
(Ctrl+C), HUP (close the terminal), or signal 15 (non-forced kill).

On Windows, it is strongly recommended that you _only_ exit the bot using
Ctrl+C. Note that `taskkill` (without `/f`) and closing the console window do
NOT shut down the bot gracefully (I haven't figured out how to intercept those
signals).

== Dependencies ==
- Python 2.6 or 2.7 (recent older versions may work, but no guarantees;
  Python 3.x is not supported due to lack of dependency support)
- Python Reddit API Wrapper (PRAW)
- SQLAlchemy
- passlib