AUTOMOME

From Penguin Development
Jump to navigationJump to search

AUTOMOME is a random internet meme generator based on snowclone templates. It is a black-box reimplementation and extension of AUTOMEME (now defunct), based on the English dialect known as OTTish, spoken in the xkcd forums thread of the Time comic, better known as the One True Thread or OTC. The canonical web version is available at http://automome.penguindevelopment.org/.

Dependencies

  • Python 3, tested versions 3.2.3 and 3.4.1
  • Unicode-compatible system
  • Apache web sever or compatible (hosted web version only)
  • Modern graphical web browser (web client only)
  • Qt 4 and PySide 1.2.x (qautomome only)

Obtaining and installing AUTOMOME

AUTOMOME can be obtained from http://proj.penguindevelopment.org/automome/. Direct link to the latest version.

AUTOMOME is designed to run from its own directory; cding to the directory and calling automome.py directly should work. Likewise, the web version should work out of the box if the AUTOMOME directory is in a location served by Apache.

If a setup is desired where the dictionary files (*.dict.txt) are placed in a different directory from the script files, the AUTOMOME_PATH environment variable may be set to the path to the dictionary files. automome-web.py may be placed in a different directory from automome.py, so long as automome.py is in the module search path; see [1].

The client-side web interface automome.html by default attempts to get its data from automome-web.py at the same base URL as automome.html: e.g. if you host a web version of AUTOMOME at http://example.com/molpy/grapevine/automome.html, it will try to fetch data from http://example.com/molpy/grapevine/automome-web.py. Likewise, it will try to locate cuegan.svg in the same directory.

Using AUTOMOME

There are several ways to use AUTOMOME: as of version 4.0, it can be used as a text-only command-line version (automome.py), on the web using a fancy AJAX interface that gives nice formatting (automome.html, and the canonical version at http://automome.penguindevelopment.org/), as a text-only web version (automome-web.py), or using the graphical qautomome (qautomome.py).

Using the command-line version

The plaintext command-line version can be used on any system with Python 3.x, and is perhaps the simplest way to use AUTOMOME. At present, it supports only two significant options: picking the categories and the number of memes displayed. automome.py --help should provide an adequate explanation:

$ automome.py --help
Usage: automome.py [option] [num]
[option] may be one of the following:
    -h, --help                      show this message and exit
    -V, --version                   show version and exit
    -c [cats], --categories=[cats]  generate memes from the categories [cats]
                                    (see below); the default is aom

[cats] may be any combination of the following letters:
    a       molpish memes from the original AUTOMEME (possibly OTTified)
    o       molpish other memes, i.e. non-AUTOMEME memes
    m       molpish meta-memes, i.e. memes originating in the OTT
    A       unmolpish AUTOMEME memes
    O       unmolpish other memes
    t       OTToMeme memes (xkcd memes by azule)

[num] is the number of memes to generate; if it is missing or invalid, it is
assumed to be 1.

As an example, the following code produces 10 memes from the "Molpish other" and "Meta-memes" categories:

automome.py -c om 10

Using the web GUI

The web GUI offers more advanced features, including formatted text and the ability to filter memes. A quick run-through of features:

Main layout

From the main layout, clicking the image of Cuegan produces a single meme. There is not much more to be said.

Meme categories

Clicking the Meme categories link allows you to change the categories of memes that will be displayed; the categories are the same as those used in the text-only version.

Filter settings

The Filter settings tab is slightly more complicated. First and foremost is the Filter expression box. This allows you to enter any JavaScript regular expression, and only memes matching that expression will be displayed. Keep in mind that the regular expression is case sensitive; almost all words are uppercase. The regular expression is applied to the text-only version of the meme, so italicised words will be surrounded by underscores, and so on. If you wish to match all memes, leave the box blank or enter .*.

The Lock meme checkbox allows you to lock the template of the current meme: if it is active, clicking the Cuegan image will only produce memes using the same template as the currently shown meme.

Copyable formats

The Copyable formats tab provides three easy-to-copy output styles: plaintext (the same as automome.py itself would produce), BBCode (used on most forums) and (X)HTML, which can be used on your own websites.

Using the text-only web version

The text-only web version is a lightweight wrapper around the command-line version. In fact, if it is at all possible, you should use the command-line version directly. Nevertheless, if you still wish to use the text-only web version, simply point a browser at automome-web.py, either at your site or the canonical version. Categories can be passed using the c= GET-parameter, and the number of memes can be passed using the n= GET-parameter. The categories are the same as the ones used in the text-only version, and the number of memes is limited to at most 100 at a time.

As an example, http://automome.penguindevelopment.org/automome-web.py?n=10&c=om produces 10 memes from the "Molpish other" and "Meta-memes" categories.

Using qautomome

qautomome is essentially a stand-alone version of the web client; most of the web client's feature descriptions transfer directly to qautomome and therefore aren't listed separately in this section. One notable capability of qautomome is the export function: qautomome can export the full history of memes to a file (or it can generate a set amount of new memes to export); the currently supported formats are CSV (which has plaintext, BBCode and (X)HTML fields) and fortune. You can find this feature in the Copy/export tab.

In qautomome, there is no separate back-button; you can instead right-click Cuegan to view the previous meme. Keyboard-based operation is also possible; use the space bar, enter key or right arrow key for the next meme and backspace or the left arrow key for the previous one. Holding shift inverts the function.

Bugs and feedback

Report bugs via email at bugs[at]proj[dot]penguindevelopment[dot]org.

Send your feedback to feedback[at]proj[dot]penguindevelopment[dot]org.