« The Last Lorwyn-Morningtide Sealed 2X of 2.5 | Main | links for 2008-04-11 »

Magic Assistant 0.1

Yesterday afternoon, while I was writing up my entry on the Lorwyn-Morningtide Tournament, I realized that I didn't have an easy way of posting decklists to the blog with links to the appropriate card in Gatherer.

For a normal 60-card deck, this isn't too bad, as there are usually between 12 to 15 unique cards, which is quite doable by hand; however for sealed deck, with a card pool of 90 cards (not including basic lands), there will be few, if any duplicates, and linking it all would be a major undertaking.

The first thing that occurred to me was to write a MT text filter plugin to translate the card names into links. The very first iteration used curly-braces, but about 5 lines into adding curly-braces into the decklist, I decided that square brackets would be better since I didn't have to hold down shift. Using square-bracket based markup made it much quicker to go through a decklist, and further examples can be seen below:


[Mutavault] becomes Mutavault
[Shadowmage Infiltrator] becomes Shadowmage Infiltrator


[B] becomes
[U] becomes
[R] becomes
[G] becomes
[W] becomes

For numbers, [1] through [12] generates through and [X] becomes .


Hybrids and other symbols are also available:
[ub] for symbol
[ur] for symbol
[gu] for symbol
[gw] for symbol
[rg] for symbol
[rw] for symbol
[br] for symbol
[bg] for symbol
[wb] for symbol
[wu] for symbol
[2B] for symbol
[T] for the symbol
[Q] for the symbol


In order to use square brackets, [S1] is the left bracket [, and [S2] is the right bracket ].


Installation Instructions:


Put MagicAssistant.pl into the plugins directory of Movable Type Installation.
The images should be copied to mt-static/plugins/MagicAssistant directory of the Movable Type installation, so that the complete path to the images looks like mt-static/plugins/MagicAssistant/images/.


When you go to the Entry Editor, under the Formatting dropdown, there should now be an option for Magic Assistant. Magic Assistant will also automatically convert line breaks.


Download: MagicAssistant.0.11.zip

TrackBack

TrackBack URL for this entry:
http://www.mikehuang.com/cgi-bin/mt/mt-tb.cgi/3632

Comments (2)

kwc:

Cool idea for a plugin. FYI: the img src tags need to use absolute URLs in order to work in your RSS feed.

Mike:

Ah, nice catch. I'll fix that soon.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on April 10, 2008 1:04 PM.

The previous post in this blog was The Last Lorwyn-Morningtide Sealed 2X of 2.5.

The next post in this blog is links for 2008-04-11.

Many more can be found on the main index page or by looking through the archives.