To help with TagFest, I’m releasing a beta version of the IFDB Tag Manipulator®* - a small Python script I wrote that interfaces with the IFDB APIs to allow you to quickly assign tags to large classes of games. The most likely use case is adding implied tags to all games that feature a given tag. For instance, I used it to add “nonhuman protagonist” and “animal protagonist” to games featuring “bird protagonist”.
The program has a simple command line interface. Furthermore, users with some knowledge of Python may be able to sort through my messy code and build new procedures of their own.
Warning!
Do not operate machinery, including the IFDB Tag Manipulator®*, while intoxicated or under the influence of any substances. Read the “How to Operate” instructions below before using the IFDB Tag Manipulator®*. FLACRabbit is not liable in whole or in part for damages caused or accrued as a direct or indirect result of the use of the IFDB Tag Manipulator®*.
(More seriously, the use of heavy automation comes with a certain level of responsibility and awareness. If you use the Manipulator through your main IFDB account and something goes horribly wrong, you may be left with only bad options. For example, the admins might have to delete your account and with it all previous tags you had assigned. If you don’t want to take the risk, you can suggest tag implications to me via PMs or on this thread and I’ll handle it.)
Instructions
Setup
You’ll need a working Python 3 installation, urllib (which should already be included), and an IFDB account.
Download the included tm.zip file and extract it into a directory. Open tm.py in a text editor or code editor and enter your user details in the first two lines, inside the quotes. Note: Your “username” is your email address, not your screen name.
You’ll have to run tm.py from the command line, supplying arguments in a typical fashion. If you’re not familiar with command line conventions, you may wish to look it up online.
How to Operate
The Manipulator first selects a number of games, which you supply via the -sg
(select game) and -st
(select tag) arguments, followed by a tag or game name. Multiple games and/or tags can be selected at once. It then applies one or more actions to each selected game. For instance, the -at
action (add tag) adds the specified tag to each selected game, and the -rt
action removes it (only if you’ve previously assigned it). As an example, the command
python3 tm.py -st "Le Grand Guignol" -st "La Petite Mort" -at "Ectocomp game"
selects all games tagged with either Ectocomp category and adds the Ectocomp game tag to them all. This change could be undone via the command
python3 tm.py -st "Le Grand Guignol" -st "La Petite Mort" -rt "Ectocomp game"
It’s worth mentioning that this will erase the Ectocomp game tag regardless of whether you had manually applied it or whether the Manipulator did. The program can’t distinguish between manually and automatically assigned tags.
You can specify -u
- or unsafe mode - to get rid of the confirmation prompt for each game.
If you don’t specify any actions the Manipulator will print a table of selected games.
It may be advisable to create a new folder to hold the Python files, as tm.py creates large numbers of tag backup files in its working directory. These can be safely deleted if you like, as the program in its current state can’t process them.
Download link:
(This version is no longer up to date. See the latest download link further down in this thread.)
What will you do with this tool? Tell everyone about the sweeping changes you’ve effected right here on this thread! Questions about how to set it up or use it are also welcome. If you find any bugs or errors, please alert me via PM and I’ll update it as soon as possible.
*The use of the terms ‘IFDB’ and ‘Tag’ is not sanctioned or endorsed by IFDB or the Interactive Fiction Technology Foundation. FLACRabbit is not affiliated or associated with IFDB or the Interactive Fiction Technology Foundation.