1. Marc-Alexandre Chan
  2. DailyPromptBot


DailyPromptBot / minibot / README

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

== 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

== 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