Initial import.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Fri, 5 Jul 2013 13:45:59 +0000 (15:45 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Fri, 5 Jul 2013 13:45:59 +0000 (15:45 +0200)
.gitignore [new file with mode: 0644]
README.md [new file with mode: 0644]
acnl-outfit.js [new file with mode: 0644]
acnl-wearables-list.js [new file with mode: 0644]
index.html [new file with mode: 0644]
labelle.jpg [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..5236e1e
--- /dev/null
@@ -0,0 +1,2 @@
+*~
+
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..5388307
--- /dev/null
+++ b/README.md
@@ -0,0 +1,12 @@
+This is the source code for the [Labelle Litanizer]. You can use it to
+run your own litanizer, or learn how to program JavaScript poorly.
+
+http://creativecommons.org/publicdomain/zero/1.0/
+
+To the extent possible under law, I have waived all copyright and
+related or neighboring rights to this work.
+
+Labelle is some kind of copyright and trademark of Nintendo and no
+claim is made on her image.
+
+ [Labelle Litanizer]: http://yukkurigames.com/labelle/
diff --git a/acnl-outfit.js b/acnl-outfit.js
new file mode 100644 (file)
index 0000000..c09c3a2
--- /dev/null
@@ -0,0 +1,149 @@
+// http://creativecommons.org/publicdomain/zero/1.0/
+//
+// To the extent possible under law, the person who associated CC0
+// with this work has waived all copyright and related or neighboring
+// rights to this work.
+
+"use strict";
+
+Array.prototype.firstWhere = function (callback, thisArg) {
+    for (var i = 0; i < this.length; ++i)
+        if (callback.call(thisArg, this[i]))
+            return this[i];
+};
+
+Array.prototype.contains = function (o) {
+    return this.indexOf(o) >= 0;
+};
+
+Array.prototype.lacks = function (o) {
+    return !this.contains(o);
+};
+
+Array.prototype.containsSubset = function (o) {
+    return o.every(this.contains, this);
+};
+
+Array.prototype.pushUnique = function (o) {
+    if (this.lacks(o))
+        this.push(o);
+};
+
+var BLOCKS = {
+    helmets: ["hats", "accessories"],
+    wetsuits: ["tops", "bottoms", "socks", "dresses"],
+    dresses: ["tops", "bottoms"]
+};
+Object.keys(ACNL_WEARABLES).forEach(function (type) {
+    BLOCKS[type] = (BLOCKS[type] || []).concat(type);
+});
+Object.keys(BLOCKS).forEach(function (k) {
+    BLOCKS[k].forEach(function (v) {
+        BLOCKS[v].pushUnique(k);
+    });
+});
+
+function choice (os) {
+    return os[Math.floor(os.length * Math.random())];
+}
+
+function category (item) {
+    return Object.keys(ACNL_WEARABLES).firstWhere(function (type) {
+        return ACNL_WEARABLES[type].contains(item);
+    });
+}
+
+function notLewd (outfit) {
+    var categories = outfit.map(category);
+    return (categories.contains("wetsuits")
+            || categories.contains("dresses")
+            || categories.containsSubset(["tops", "bottoms"]));
+}
+
+function buildArray (a, l) {
+    return (a || []).concat(l);
+}
+
+function impossibilities (categories) {
+    return categories.map(function (c) { return BLOCKS[c]; }
+           ).reduce(buildArray, []);
+}
+
+function possibilities (outfit) {
+    return Object.keys(ACNL_WEARABLES
+           ).filter(Array.prototype.lacks, impossibilities(outfit.map(category))
+           ).map(function (k) { return ACNL_WEARABLES[k] }
+           ).reduce(buildArray, []);
+}
+
+function isFinished(outfit) {
+    return notLewd(outfit) && Math.random() > 0.5;
+}
+
+function nextItem (outfit) {
+    return !isFinished(outfit) && choice(possibilities(outfit));
+}
+
+function outfit () {
+    var ps = [];
+    var next;
+    while (next = nextItem(ps))
+        ps.push(next);
+    return ps;
+}
+
+function article (item) {
+    if (item[0].toUpperCase() === item[0] && item.indexOf("'s") >= 0)
+        return "";
+    else if (item.substr(-1) === "s" && item.substr(-2) !== "ss"
+            && item.substr(-6) !== "cosmos") // :(
+        return "";
+    else if ("aeiouAEIO".indexOf(item[0]) >= 0
+             || ("FHLMNRSX".indexOf(item[0]) >= 0
+                 && item.split(" ")[0].toUpperCase() == item.split(" ")[0]))
+        return "an ";
+    else
+        return "a ";
+}
+
+function dblink (name) {
+    return ["<a target=\"_blank\" href=\"http://moridb.com/items/search?q=",
+            encodeURIComponent(name),
+            "\">", name.replace("&", "&amp;"), "</a>"].join("");
+}
+
+function litanize (names, link) {
+    names = names.map(function (name) {
+        return article(name) + (link ? dblink(name) : name);
+    });
+    switch (names.length) {
+    case 1: break;
+    case 2:
+        names[names.length - 1] = (choice(["and ", "with "])
+                                   + names[names.length - 1]);
+        break;
+    default:
+        if (Math.random() > 0.5 && names.length >= 4) {
+            names[names.length - 2] = "and " + names[names.length - 2];
+            names[names.length - 1] = "with " + names[names.length - 1];
+        } else {
+            names[names.length - 1] = "and " + names[names.length - 1];
+        }
+        break;
+    }
+        
+    return names.join(names.length == 2 ? " " : ", ");        
+}
+
+function litanizeElement (eid, tid) {
+    var o = outfit();
+    document.getElementById(eid).innerHTML = litanize(o, true) + "?";
+    // TODO: This often generates > 140 characters. Do I care?
+    // Maybe pick shorter prefixes if it would help.
+    var t = document.getElementById(tid);
+    t.href = t.href.replace(
+            /&text=[^&]+/, "&text=" + encodeURIComponent(
+                choice(["Going out in ",
+                        "Labelle suggested ",
+                        "I'll wear "]) + litanize(o, false) + "."));
+}
diff --git a/acnl-wearables-list.js b/acnl-wearables-list.js
new file mode 100644 (file)
index 0000000..303233c
--- /dev/null
@@ -0,0 +1,1218 @@
+// http://creativecommons.org/publicdomain/zero/1.0/
+//
+// To the extent possible under law, the person who associated CC0
+// with this work has waived all copyright and related or neighboring
+// rights to this work.
+
+"use strict";
+
+var ACNL_WEARABLES = {
+    "accessories": [
+        "3D glasses",
+        "aviator shades",
+        "bad bro's stache",
+        "ballroom mask",
+        "bandage",
+        "beak",
+        "big bro's mustache",
+        "birthday shades",
+        "blue frames",
+        "brown glasses",
+        "cucumber pack",
+        "curly mustache",
+        "cyber shades",
+        "doctor's mask",
+        "doctor's mirror",
+        "eye mask",
+        "eye patch",
+        "facial mask",
+        "funky glasses",
+        "funny glasses",
+        "gas mask",
+        "goggles",
+        "Gracie glasses",
+        "green glasses",
+        "heart shades",
+        "HMD",
+        "hockey mask",
+        "huge shades",
+        "jester's mask",
+        "king's beard",
+        "ladder shades",
+        "leaf",
+        "lemon pack",
+        "masquerade mask",
+        "mint glasses",
+        "monocle",
+        "oval shades",
+        "pacifier",
+        "pilot shades",
+        "pink glasses",
+        "post-op patch",
+        "purple glasses",
+        "red glasses",
+        "red nose",
+        "rimmed glasses",
+        "round glasses",
+        "Santa beard",
+        "silver frames",
+        "snorkel mask",
+        "sporty shades",
+        "stache & glasses",
+        "star shades",
+        "steampunk glasses",
+        "superhero mask",
+        "thick glasses",
+        "tiny shades",
+        "tortoise specs",
+        "triangle shades",
+        "yellow glasses",
+
+        "black rose",
+        "blue rose",
+        "gold rose",
+        "orange rose",
+        "pink rose",
+        "purple rose",
+        "yellow rose"
+
+    ],
+    "bottoms": [
+        "acid-washed pants",
+        "aloha shorts",
+        "arctic-camo pants",
+        "armor pants",
+        "baseball pants",
+        "basketball shorts",
+        "bear-costume pants",
+        "black denim pants",
+        "black denim skirt",
+        "black formal pants",
+        "black formal skirt",
+        "black track pants",
+        "blue boxing shorts",
+        "blue-grid skirt",
+        "blue gym shorts",
+        "blue pj bottoms",
+        "blue polka shorts",
+        "blue-stripe pants",
+        "blue warm-up pants",
+        "blue-zap pants",
+        "bone pants",
+        "brown argyle skirt",
+        "brown formal pants",
+        "brown plaid shorts",
+        "cargo pants",
+        "caveman shorts",
+        "checkerboard skirt",
+        "chino pants",
+        "corseted skirt",
+        "cow pants",
+        "cuffed pants",
+        "dapper skirt",
+        "dark polka skirt",
+        "denim skirt",
+        "desert-camo pants",
+        "dogtooth pants",
+        "dragon leggings",
+        "dry denim pants",
+        "dry denim skirt",
+        "emerald polka skirt",
+        "explorer pants",
+        "festivale pants",
+        "firefighter pants",
+        "flame pants",
+        "frog-costume pants",
+        "funky dot skirt",
+        "genie pants",
+        "giraffe pants",
+        "grass skirt",
+        "gray formal pants",
+        "gray formal skirt",
+        "gray-stripe pants",
+        "gray sweatpants",
+        "gray tartan skirt",
+        "green gym shorts",
+        "green plaid shorts",
+        "green tartan pants",
+        "green warm-up pants",
+        "green-zap pants",
+        "hero's pants",
+        "hot spring skirt",
+        "imperial pants",
+        "jester pants",
+        "jinbei shorts",
+        "jungle-camo pants",
+        "jungle-camo shorts",
+        "kappa-costume pants",
+        "kilt",
+        "kung-fu pants",
+        "leopard pants",
+        "leopard skirt",
+        "lite polka skirt",
+        "matador's pants",
+        "military pants",
+        "mint gingham skirt",
+        "mummy pants",
+        "natty skirt",
+        "navy formal pants",
+        "navy formal skirt",
+        "new spring skirt",
+        "ninja pants",
+        "gold-armor pants",
+        "orange pants",
+        "pastel-check skirt",
+        "patched-knee pants",
+        "patched pants",
+        "pep-squad skirt",
+        "picnic skirt",
+        "pink argyle skirt",
+        "pink pj bottoms",
+        "pink sweatpants",
+        "pleather pants",
+        "racing pants",
+        "rainbow plaid shorts",
+        "red boxing shorts",
+        "red-grid skirt",
+        "red gym shorts",
+        "red plaid skirt",
+        "red polka skirt",
+        "red-stripe pants",
+        "red tartan pants",
+        "red warm-up pants",
+        "red-zap pants",
+        "relay shorts",
+        "royal shorts",
+        "running pants",
+        "sailor skirt",
+        "samurai pants",
+        "Santa pants",
+        "scale-armor pants",
+        "soccer shorts",
+        "space pants",
+        "tan dogtooth pants",
+        "tiger pants",
+        "two-tone pants",
+        "Varia Suit pants",
+        "western pants",
+        "white formal pants",
+        "white-lace skirt",
+        "worn-out jeans",
+        "wrestler pants",
+        "zebra pants"
+    ],
+    "dresses": [
+        "academy uniform",
+        "alpinist dress",
+        "ballet outfit",
+        "bathrobe",
+        "black velvet dress",
+        "blossom dress",
+        "blossoming dress",
+        "blue dotted dress",
+        "blue lace-up dress",
+        "blue party dress",
+        "blue retro dress",
+        "butterfly dress",
+        "cake dress",
+        "cake tank dress",
+        "casual outfit",
+        "cat dress",
+        "cat tank dress",
+        "caveman tank dress",
+        "chima jeogori dress",
+        "citrus gingham dress",
+        "classic dress",
+        "cool dress",
+        "dapper dress",
+        "dazed dress",
+        "dogtooth dress",
+        "dollhouse dress",
+        "dreamy tank dress",
+        "embroidered dress",
+        "fairy-tale dress",
+        "festivale tank dress",
+        "festive dress",
+        "festive-tree dress",
+        "fleece dress",
+        "floral knit dress",
+        "fluffy dress",
+        "fluffy tank dress",
+        "frock coat",
+        "gaudy dress",
+        "graduation gown",
+        "green dress",
+        "green lace-up dress",
+        "gumdrop dress",
+        "kimono",
+        "lime dress",
+        "lotus tank dress",
+        "loud bloom dress",
+        "lovely dress",
+        "maid dress",
+        "milkmaid dress",
+        "moldy dress",
+        "muumuu",
+        "natty dress",
+        "nurse's uniform",
+        "orange lace-up dress",
+        "orange retro dress",
+        "overall dress",
+        "palatial tank dress",
+        "pastel-stripe dress",
+        "pharaoh's outfit",
+        "pinafore",
+        "pink lace-up dress",
+        "pink party dress",
+        "pink polka dress",
+        "plaid cami dress",
+        "plum coat",
+        "polka-dot dress",
+        "poncho",
+        "pop bloom dress",
+        "prep-school uniform",
+        "prim outfit",
+        "princess dress",
+        "red dress",
+        "red riding dress",
+        "ribbon dress",
+        "rose-sky tank dress",
+        "rose tank dress",
+        "sea captain's coat",
+        "shirtdress",
+        "silk bloom dress",
+        "sky dress",
+        "spring kimono",
+        "star tank dress",
+        "sweater dress",
+        "tan dogtooth dress",
+        "tartan plaid outfit",
+        "toga",
+        "trench coat",
+        "turnip dress",
+        "twinkle tank dress",
+        "U-R-here dress",
+        "vogue dress",
+        "waitress dress",
+        "witch's robe",
+        "yellow dotted dress",
+        "yellow raincoat",
+        "yodel dress"
+    ],
+    "helmets": [
+        "Fi mask",
+        "Majora's mask",
+        "Makar's mask",
+        "Midna's mask",
+        "Samus mask",
+        "blue ogre mask",
+        "blue-zap helmet",
+        "bug mask",
+        "catcher's mask",
+        "diving mask",
+        "fencing mask",
+        "ghost mask",
+        "green-pumpkin head",
+        "green-zap helmet",
+        "King Tut mask",
+        "knight's helmet",
+        "lion-dance mask",
+        "monster mask",
+        "motocross helmet",
+        "mummy mask",
+        "pink-zap helmet",
+        "pumpkin head",
+        "purple-pumpkin head",
+        "racing helmet",
+        "red ogre mask",
+        "red-pumpkin head",
+        "red-zap helmet",
+        "retro helmet",
+        "ski mask",
+        "space helmet",
+        "wrestling mask",
+        "yellow-pumpkin head"
+    ],
+    "hats": [
+        "afro cap",
+        "afro wig",
+        "alpinist hat",
+        "baby's hat",
+        "badge hat",
+        "balloon hat",
+        "banana split hat",
+        "bandana",
+        "batter's helmet",
+        "bear cap",
+        "beret",
+        "bicycle helmet",
+        "big bro's hat",
+        "birthday hat",
+        "black veil",
+        "blue cap",
+        "blue headgear",
+        "blue new year's hat",
+        "blue nightcap",
+        "blue Pikmin",
+        "blue plaid fedora",
+        "blue pom-pom hat",
+        "blue ribbon",
+        "braided wig",
+        "bridal veil",
+        "bulb bopper",
+        "bun wig",
+        "bunny hood",
+        "captain's hat",
+        "cat cap",
+        "cavalier hat",
+        "celebration hat",
+        "chef's hat",
+        "cloche hat",
+        "coin headpiece",
+        "combat helmet",
+        "conical straw hat",
+        "cow bone",
+        "crown",
+        "dandy hat",
+        "detective hat",
+        "diver's hood",
+        "DJ cap",
+        "do-rag",
+        "elegant hat",
+        "emperor's cap",
+        "explorer's hat",
+        "festivale accessory",
+        "fireman's hat",
+        "flamenco hat",
+        "flashy hairpin",
+        "floppy hat",
+        "flower bopper",
+        "football helmet",
+        "frog cap",
+        "funky wig",
+        "geisha wig",
+        "girl's day updo",
+        "Gracie hat",
+        "grandpa hat",
+        "grape hat",
+        "green cap",
+        "green headgear",
+        "green knit hat",
+        "green new year's hat",
+        "hair-bow wig",
+        "halo",
+        "headband",
+        "headkerchief",
+        "heart bopper",
+        "heart hairpin",
+        "hero's cap",
+        "hibiscus hairpin",
+        "hot dog hat",
+        "hunter's cap",
+        "jester's cap",
+        "jockey's helmet",
+        "kaffiyeh",
+        "kappa cap",
+        "kintaro wig",
+        "kiwi hat",
+        "light blue cap",
+        "li'l bro's hat",
+        "mailman's hat",
+        "mandarin hat",
+        "matador's hat",
+        "matronly bun",
+        "melon hat",
+        "milkmaid hat",
+        "mohawk wig",
+        "moon hairpin",
+        "newsprint helmet",
+        "ninja hood",
+        "nurse's cap",
+        "ogre's wig",
+        "orange knit hat",
+        "outback hat",
+        "paperboy cap",
+        "pigtail",
+        "pilot's cap",
+        "pilot's hat",
+        "pink knit hat",
+        "pink nightcap",
+        "pirate's hat",
+        "plain black cap",
+        "police cap",
+        "powdered wig",
+        "puffy hat",
+        "purple cap",
+        "purple-imp hood",
+        "purple knit hat",
+        "red cap",
+        "red headgear",
+        "red hood",
+        "red horned hat",
+        "red new year's hat",
+        "red Pikmin",
+        "red pom-pom hat",
+        "red ribbon",
+        "red team cap",
+        "regent wig",
+        "ribboned straw hat",
+        "roman helmet",
+        "royal crown",
+        "safety helmet",
+        "sailor's hat",
+        "samurai helmet",
+        "samurai wig",
+        "Santa hat",
+        "scholar's hat",
+        "school cap",
+        "school hat",
+        "shamrock hat",
+        "shower cap",
+        "silk hat",
+        "skeleton hood",
+        "small silk hat",
+        "snowman head",
+        "sombrero",
+        "stagehand hat",
+        "star bopper",
+        "star cap",
+        "star hairpin",
+        "straw boater",
+        "straw hat",
+        "straw umbrella hat",
+        "strawberry hat",
+        "stripe knit cap",
+        "student cap",
+        "swimming cap",
+        "tam-o'-shanter",
+        "terry-cloth do-rag",
+        "tiara hair",
+        "tingle hood",
+        "Toad hat",
+        "top hat",
+        "topknot wig",
+        "tsunokakushi",
+        "tulip hat",
+        "turban",
+        "viking helmet",
+        "warbonnet",
+        "Wario hat",
+        "watermelon hat",
+        "werewolf hood",
+        "white cap",
+        "white police cap",
+        "white school cap",
+        "white team cap",
+        "witch's hat",
+        "wizard's cap",
+        "y. new year's hat",
+        "yellow cap",
+        "yellow Pikmin",
+        "yellow ribbon",
+        "black cosmos",
+        "black lily",
+        "black tulip",
+        "blue pansy",
+        "blue violet",
+        "orange cosmos",
+        "orange lily",
+        "orange pansy",
+        "orange tulip",
+        "pink carnation",
+        "pink cosmos",
+        "pink lily",
+        "pink tulip",
+        "purple pansy",
+        "purple tulip",
+        "purple violet",
+        "red carnation",
+        "red cosmos",
+        "red lily",
+        "red pansy",
+        "red rose",
+        "red tulip",
+        "white carnation",
+        "white cosmos",
+        "white lily",
+        "white pansy",
+        "white rose",
+        "white tulip",
+        "white violet",
+        "yellow cosmos",
+        "yellow lily",
+        "yellow pansy",
+        "yellow tulip",
+        "yellow violet",
+
+        "dandelions",
+        "lucky clovers"
+    ],
+    "shoes": [
+        "armor shoes",
+        "ballet slippers",
+        "basketball shoes",
+        "black loafers",
+        "black pumps",
+        "black rain boots",
+        "blue pumps",
+        "blue sneakers",
+        "blue wrestling shoes",
+        "brown loafers",
+        "brown pumps",
+        "brown slip-ons",
+        "cleats",
+        "climbing shoes",
+        "clogs",
+        "colorful sneakers",
+        "cowboy boots",
+        "flip-flops",
+        "flower loafers",
+        "gladiator sandals",
+        "gold-armor shoes",
+        "green buckled shoes",
+        "green polka pumps",
+        "green sandals",
+        "green-stripe shoes",
+        "hero's boots",
+        "hiking boots",
+        "jester's shoes",
+        "kimono sandals",
+        "lace-up boots",
+        "leopard pumps",
+        "Mary Janes",
+        "monochrome shoes",
+        "ninja sandals",
+        "orange sandals",
+        "orange shoes",
+        "pink slip-ons",
+        "pink sneakers",
+        "polka-dot rain boots",
+        "purple dot shoes",
+        "purple high-tops",
+        "purple pumps",
+        "red boat shoes",
+        "red shoes",
+        "red wrestling shoes",
+        "Santa boots",
+        "shearling boots",
+        "slippers",
+        "snow boots",
+        "steel-toed boots",
+        "stripe shoes",
+        "tasseled loafers",
+        "tropical sandals",
+        "Varia Suit shoes",
+        "white leather shoes",
+        "white patent shoes",
+        "wooden clogs",
+        "yellow buckled shoes",
+        "yellow rain boots",
+        "yellow sneakers",
+        "zap boots"
+    ],
+    "socks": [
+        "argyle socks",
+        "argyle tights",
+        "beige tights",
+        "black ankle socks",
+        "black leggings",
+        "black stockings",
+        "black tights",
+        "blue-stripe tights",
+        "bobby socks",
+        "brown socks",
+        "brown-stripe socks",
+        "checkered socks",
+        "colorful socks",
+        "dress socks",
+        "fishnet tights",
+        "gray leggings",
+        "gray socks",
+        "gray tights",
+        "green-stripe socks",
+        "green tights",
+        "heart-print tights",
+        "hiking gaiters",
+        "leg warmers",
+        "navy socks",
+        "polka-dot socks",
+        "purple star socks",
+        "purple-stripe tights",
+        "rainbow tights",
+        "red tights",
+        "soccer socks",
+        "star tights",
+        "tube socks",
+        "white ankle socks",
+        "white-lace socks",
+        "white socks",
+        "white stockings"
+    ],
+    "equips": [
+        "bat umbrella",
+        "beach umbrella",
+        "blue dot parasol",
+        "blue umbrella",
+        "busted umbrella",
+        "camo umbrella",
+        "candy umbrella",
+        "daisy umbrella",
+        "eggy parasol",
+        "elegant umbrella",
+        "flame umbrella",
+        "forest umbrella",
+        "gelato umbrella",
+        "ghost umbrella",
+        "Gracie umbrella",
+        "green umbrella",
+        "lacy parasol",
+        "leaf umbrella",
+        "lemon umbrella",
+        "leopard umbrella",
+        "maple umbrella",
+        "melon umbrella",
+        "mint umbrella",
+        "modern umbrella",
+        "paper parasol",
+        "paw umbrella",
+        "Peach's parasol",
+        "petal parasol",
+        "picnic umbrella",
+        "red umbrella",
+        "ribbon umbrella",
+        "spider umbrella",
+        "sunny parasol",
+        "toad parasol",
+        "yellow umbrella",
+        "zebra umbrella",
+        "blue balloon",
+        "blue pinwheel",
+        "bunny b. balloon",
+        "bunny c. balloon",
+        "bunny g. balloon",
+        "bunny i. balloon",
+        "bunny o. balloon",
+        "bunny p. balloon",
+        "bunny r. balloon",
+        "bunny y. balloon",
+        "cyan balloon",
+        "cyan pinwheel",
+        "green balloon",
+        "green pinwheel",
+        "heart b. balloon",
+        "heart c. balloon",
+        "heart g. balloon",
+        "heart i. balloon",
+        "heart o. balloon",
+        "heart p. balloon",
+        "heart r. balloon",
+        "heart y. balloon",
+        "indigo balloon",
+        "indigo pinwheel",
+        "orange balloon",
+        "orange pinwheel",
+        "pink balloon",
+        "pink pinwheel",
+        "red balloon",
+        "red pinwheel",
+        "yellow balloon",
+        "yellow pinwheel",
+        "axe",
+        "fishing rod",
+        "golden axe",
+        "golden can",
+        "golden net",
+        "golden rod",
+        "golden shovel",
+        "golden slingshot",
+        "megaphone",
+        "net",
+        "shovel",
+        "silver axe",
+        "silver can",
+        "silver net",
+        "silver rod",
+        "silver shovel",
+        "silver slingshot",
+        "slingshot",
+        "timer",
+        "toy hammer",
+        "watering can",
+        "party popper",
+        "tweeter",
+        "bubble wand",
+        "sparkler",
+        "matcha soft-serve",
+        "choco soft-serve",
+        "swirl soft-serve",
+        "vanilla soft-serve",
+        "strawberry ice cream",
+        "vanilla ice cream",
+        "lemon double scoop",
+        "mint double scoop",
+        "dandelion puff"
+    ],
+    "tops": [
+        "24-hour-shop uniform",
+        "A tee",
+        "acid-washed jacket",
+        "after-school jacket",
+        "airy tee",
+        "amethyst shirt",
+        "amethyst tee",
+        "aqua polka tank",
+        "aqua polka tee",
+        "arctic-camo shirt",
+        "arctic-camo tee",
+        "argyle knit shirt",
+        "armor suit",
+        "aurora knit shirt",
+        "bad plaid shirt",
+        "bad plaid tee",
+        "barber tee",
+        "baseball shirt",
+        "basketball tank",
+        "BB tee",
+        "beaded shirt",
+        "beaded tank",
+        "bear costume",
+        "bear shirt",
+        "bear tee",
+        "beatnik shirt",
+        "beatnik tank",
+        "beatnik tee",
+        "beige emblem blazer",
+        "beige knit shirt",
+        "big bro's tee",
+        "big dot tank",
+        "big dot tee",
+        "big star tee",
+        "black denim jacket",
+        "black flannel shirt",
+        "black letter jacket",
+        "black track jacket",
+        "blossom tee",
+        "blue aloha tee",
+        "blue argyle shirt",
+        "blue argyle tank",
+        "blue argyle tee",
+        "blue-bar shirt",
+        "blue-bar tee",
+        "blue-check shirt",
+        "blue-check tee",
+        "blue diamond shirt",
+        "blue diamond tee",
+        "blue down jacket",
+        "blue flannel shirt",
+        "blue-grid shirt",
+        "blue-grid tee",
+        "blue gym tee",
+        "blue jacket",
+        "blue letter jacket",
+        "blue pj shirt",
+        "blue plaid shirt",
+        "blue plaid tee",
+        "blue ringmaster coat",
+        "blue-stripe shirt",
+        "blue-stripe tee",
+        "blue tartan shirt",
+        "blue tartan tee",
+        "blue tie-dye tank",
+        "blue tie-dye tee",
+        "blue track jacket",
+        "blue-zap suit",
+        "bold-check tee",
+        "bone shirt",
+        "bright tee",
+        "brown-bar shirt",
+        "brown-bar tee",
+        "bubble gum shirt",
+        "bubble gum tee",
+        "bubble tank",
+        "bubble tee",
+        "bunny shirt",
+        "bunny tee",
+        "cafe tee",
+        "cafe uniform",
+        "camel shirt",
+        "canary shirt",
+        "candy gingham shirt",
+        "candy gingham tee",
+        "captain's jacket",
+        "caterpillar tank",
+        "cavalier shirt",
+        "caveman tank",
+        "chain-gang shirt",
+        "chain-gang tee",
+        "checkerboard shirt",
+        "checkerboard tee",
+        "checkered tee",
+        "chef's outfit",
+        "cherry tee",
+        "chevron shirt",
+        "chichi-print tee",
+        "chick tee",
+        "chocomint tee",
+        "circuit tank",
+        "citrus tank",
+        "citrus tee",
+        "clerk's shirt",
+        "cloudy tee",
+        "club tee",
+        "comfy sweater",
+        "concierge shirt",
+        "cool tank",
+        "coral tank",
+        "coral tee",
+        "corseted shirt",
+        "cow tank",
+        "cow tee",
+        "crewel tee",
+        "crossing shirt",
+        "cyan argyle shirt",
+        "cyan argyle tank",
+        "cyan argyle tee",
+        "cycling shirt",
+        "cycling tee",
+        "daisy tee",
+        "danger tee",
+        "dapper shirt",
+        "dapper tee",
+        "dark polka shirt",
+        "dark polka tee",
+        "dawn tank",
+        "dawn tee",
+        "dazed shirt",
+        "dazed tee",
+        "deep blue tank",
+        "deep blue tee",
+        "deer shirt",
+        "denim jacket",
+        "denim vest",
+        "desert-camo shirt",
+        "desert-camo tee",
+        "detective outfit",
+        "diamond tee",
+        "dice tank",
+        "doctor's coat",
+        "dogtooth shirt",
+        "dogtooth tee",
+        "Dr. Shrunk's jacket",
+        "dragon jacket",
+        "dragon suit",
+        "dreamy tee",
+        "earthy knit shirt",
+        "eight-ball tee",
+        "elephant shirt",
+        "elephant tee",
+        "explorer tee",
+        "fall leaf shirt",
+        "fall leaf tee",
+        "fall plaid shirt",
+        "fall plaid tee",
+        "fern shirt",
+        "fern tee",
+        "festivale tank",
+        "fiendish shirt",
+        "firefighter shirt",
+        "fish tee",
+        "fishing vest",
+        "five-ball tee",
+        "flame shirt",
+        "flame tee",
+        "flan tank",
+        "flight crew shirt",
+        "floral knit tee",
+        "flowery tee",
+        "folk shirt",
+        "folk tunic",
+        "four-ball tee",
+        "fresh tank",
+        "fresh tee",
+        "frog costume",
+        "frog shirt",
+        "frog tee",
+        "funky-dot tank",
+        "funky-dot tee",
+        "future tank",
+        "garden tank",
+        "gelato shirt",
+        "gelato tee",
+        "genie shirt",
+        "genie vest",
+        "giraffe tank",
+        "giraffe tee",
+        "go go shirt",
+        "gold-armor suit",
+        "gold-bar shirt",
+        "gold-bar tee",
+        "Gracie tank",
+        "grape-stripe shirt",
+        "grape-stripe tee",
+        "grape tank",
+        "grape tee",
+        "grass tee",
+        "gray parka",
+        "gray tank",
+        "gray tartan shirt",
+        "gray tartan tee",
+        "green-bar shirt",
+        "green-bar tee",
+        "green emblem blazer",
+        "green gym tee",
+        "green-stripe tank",
+        "green tie-dye tank",
+        "green tie-dye tee",
+        "green warm-up jacket",
+        "green-zap suit",
+        "groovy tank",
+        "groovy tee",
+        "gumdrop tee",
+        "hanten shirt",
+        "happi tee",
+        "heart tee",
+        "hero's clothes",
+        "HHA jacket",
+        "HHA tee",
+        "hot dog tank",
+        "hot spring tee",
+        "icy shirt",
+        "imperial shirt",
+        "jade plaid shirt",
+        "jade plaid tee",
+        "jagged tank",
+        "jagged tee",
+        "jester shirt",
+        "jester tank",
+        "jinbei top",
+        "jockey shirt",
+        "jungle-camo shirt",
+        "jungle-camo tee",
+        "kanji tee",
+        "kappa costume",
+        "kiddie tee",
+        "kid's smock",
+        "kiwi tank",
+        "kiwi tee",
+        "kung-fu shirt",
+        "kung-fu tee",
+        "lacy white tank",
+        "ladybug tank",
+        "leaf tee",
+        "lemon gingham shirt",
+        "lemon gingham tee",
+        "leopard tank",
+        "leopard tee",
+        "lightning tee",
+        "li'l bro's tee",
+        "lite polka shirt",
+        "lite polka tee",
+        "lotus tee",
+        "loud bloom tee",
+        "lovely tee",
+        "matador's jacket",
+        "melon gingham shirt",
+        "melon gingham tee",
+        "melon shirt",
+        "melon tee",
+        "military uniform",
+        "mint gingham shirt",
+        "mint gingham tee",
+        "mint shirt",
+        "misty tank",
+        "misty tee",
+        "mod shirt",
+        "moldy shirt",
+        "monkey shirt",
+        "mummy shirt",
+        "MVP shirt",
+        "MVP tee",
+        "natty shirt",
+        "natty tee",
+        "nebula shirt",
+        "nebula tee",
+        "new spring tee",
+        "night sky tee",
+        "nine-ball tee",
+        "ninja shirt",
+        "no. 1 shirt",
+        "no. 2 shirt",
+        "no. 23 shirt",
+        "no. 3 shirt",
+        "no. 4 shirt",
+        "no. 5 shirt",
+        "no. 67 shirt",
+        "noble shirt",
+        "noodle tee",
+        "one-ball tee",
+        "optical shirt",
+        "optical tank",
+        "orange jacket",
+        "orange tie-dye tank",
+        "orange tie-dye tee",
+        "painter's shirt",
+        "painter's tee",
+        "pastel-stripe tee",
+        "paw tee",
+        "peachy tank",
+        "peachy tee",
+        "peacoat",
+        "pep-squad tank",
+        "pep-squad tee",
+        "periwinkle tee",
+        "picnic shirt",
+        "picnic tee",
+        "pink argyle shirt",
+        "pink argyle tank",
+        "pink argyle tee",
+        "pink bud tank",
+        "pink parka",
+        "pink pj shirt",
+        "pink tank",
+        "pink tartan shirt",
+        "pink tartan tee",
+        "pink wave tank",
+        "pink-zap suit",
+        "pleather vest",
+        "pop bloom tee",
+        "preppy shirt",
+        "prism tee",
+        "pulse shirt",
+        "pulse tank",
+        "purple tie-dye tank",
+        "purple tie-dye tee",
+        "racer 6 tee",
+        "racer tee",
+        "racing shirt",
+        "raglan shirt",
+        "raglan tee",
+        "rainbow tank",
+        "rainbow tee",
+        "rally tank",
+        "rally tee",
+        "red aloha tee",
+        "red argyle shirt",
+        "red argyle tee",
+        "red-bar shirt",
+        "red-bar tee",
+        "red-check shirt",
+        "red-check tee",
+        "red down jacket",
+        "red flannel shirt",
+        "red-grid shirt",
+        "red-grid tee",
+        "red gym tee",
+        "red jacket",
+        "red letter jacket",
+        "red ringmaster coat",
+        "red tie-dye tank",
+        "red tie-dye tee",
+        "red warm-up suit",
+        "red-zap suit",
+        "reggae tank",
+        "reggae tee",
+        "relay tank",
+        "rose-sky tee",
+        "rose tee",
+        "royal shirt",
+        "rugby shirt",
+        "rugby tee",
+        "sailor's shirt",
+        "sailor's tee",
+        "samurai shirt",
+        "sandwich tank",
+        "Santa coat",
+        "scale-armor suit",
+        "scale-print tee",
+        "school jacket",
+        "security tee",
+        "seven-ball tee",
+        "sharp outfit",
+        "shearling coat",
+        "silk bloom tee",
+        "six-ball tee",
+        "skull tee",
+        "sno-cone tank",
+        "sno-cone tee",
+        "snow shirt",
+        "snowy sweater",
+        "soccer shirt",
+        "soccer tee",
+        "space suit",
+        "spade tee",
+        "speedway tee",
+        "spiderweb tee",
+        "splendid tee",
+        "spring shirt",
+        "spunky knit shirt",
+        "star tee",
+        "straw shirt",
+        "strawberry tank",
+        "strawberry tee",
+        "striking outfit",
+        "subdued-print tee",
+        "sundae tank",
+        "sunflower tee",
+        "sunset tank",
+        "sunset tee",
+        "sweater vest",
+        "swell shirt",
+        "swell tee",
+        "tacky sweater",
+        "tan dogtooth shirt",
+        "tan dogtooth tee",
+        "tan puffy vest",
+        "team NTDO tee",
+        "three-ball tee",
+        "tiger jacket",
+        "tiger tank",
+        "tiger tee",
+        "tin shirt",
+        "toad shirt",
+        "toad tee",
+        "tropical tank",
+        "tropical tee",
+        "tulip tee",
+        "tuxedo",
+        "twinkle tank",
+        "twinkle tee",
+        "two-ball tee",
+        "U-R-here tee",
+        "uncommon shirt",
+        "Varia Suit",
+        "vegetarian shirt",
+        "vegetarian tee",
+        "vertigo shirt",
+        "vertigo tee",
+        "waffle shirt",
+        "waffle tee",
+        "waistcoat",
+        "watermelon shirt",
+        "watermelon tee",
+        "western shirt",
+        "white tuxedo jacket",
+        "winter sweater",
+        "work shirt",
+        "wrap shirt",
+        "wrestler tank",
+        "yellow aloha tee",
+        "yellow-bar shirt",
+        "yellow-bar tee",
+        "yellow tartan shirt",
+        "yellow tartan tee",
+        "zebra tank",
+        "zebra tee",
+        "zipper shirt",
+        "zipper tank"
+    ],
+    "wetsuits": [
+        "black wet suit",
+        "blue wet suit",
+        "green wet suit",
+        "orange wet suit",
+        "pink wet suit",
+        "red wet suit",
+        "striped wet suit",
+        "white wet suit"
+    ]
+};
diff --git a/index.html b/index.html
new file mode 100644 (file)
index 0000000..dc48254
--- /dev/null
@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Labelle Litanizer - Outfit-Oriented Ontology - Animal Crossing: New Leaf</title>
+    <meta charset="utf-8" />
+    <script type="text/javascript" src="acnl-wearables-list.js"></script>
+    <script type="text/javascript" src="acnl-outfit.js"></script>
+    <style>
+      body { font-family: sans-serif; }
+
+      div.main { min-height: 480px; margin-top: 2em; }
+      div#haveyou {
+          font-size: 1.5em;
+          font-style: italic;
+          margin-bottom: 0.5em;
+      }
+      div#wearing { font-size: 2em; }
+
+      dt { margin-top: 0.5em }
+      dd { font-size: 0.9em }
+
+      #faq { color: gray; margin: 3em 10%; }
+      #buttons { text-align: center; margin-bottom: 2em }
+
+      .button {
+          font-size: 2em;
+          text-decoration: none;
+          background-color: #eee;
+          color: #333;
+          padding: 3px 6px 3px 6px;
+          border-top: 1px solid #ccc;
+          border-right: 1px solid #333;
+          border-bottom: 1px solid #333;
+          border-left: 1px solid #ccc;
+          margin: 0.5em;
+      }
+
+      #twitter-share-button {
+      padding: 2px 5px 2px 0.9em;
+      background: url('https://twitter.com/favicons/favicon.png') 0.2em center no-repeat #EEEEEE;
+      }
+  }
+    </style>
+  </head>
+  <body onload='litanizeElement("wearing", "twitter-share-button");'>
+    <div class="main">
+      <div style="float: left; max-width: 30%; padding-left: 1em;">
+        <img src="labelle.jpg" style="max-width: 100%;"/>
+      </div>
+      <div style="float: right; width: 60%; margin-right: 5%; margin-top: 10%;">
+        <div id="haveyou">Have you considered...</div>
+        <div id="wearing">...</div>
+      </div>
+    </div>
+    <div id="buttons">
+      <a onclick='litanizeElement("wearing", "twitter-share-button");' class="button" href="#">How gauche.</a>
+      <a id="twitter-share-button" target="_blank" class="button"
+         href="https://twitter.com/share?url=http%3A%2F%2Fyukkurigames.com%2Flabelle%2F&hashtags=ACNL&text=Loading...">Great idea!</a>
+    </div>
+    <hr />
+    <dl id="faq">
+      <dt>What is this?</dt>
+      <dd>
+        The Labelle Litanizer generates random <em>Animal Crossing:
+        New Leaf</em> outfits. Ignoring the realities of the period
+        and distribution of your random number generator, all possible
+        outfits should have some chance of appearing.
+      </dd>
+      <dt>What's with the name?</dt>
+      <dd>
+        It's inspired by Ian
+        Bogost's <a href="http://www.bogost.com/blog/latour_litanizer.shtml">Latour
+        Litanizer</a>, and his writings about objects and carpentry
+        more generally.
+      </dd>
+      <dt>Why?</dt>
+      <dd>
+        Latour litanies confront us with objects in a way that defies
+        our usual methods of grouping or reduction. In a similar way
+        the Labelle Litanizer asks us to consider the possible rather
+        than merely the desirable or expected. <em>New Leaf</em>
+        contains a huge number of objects you can wear (or otherwise
+        visibly present with, if you are uncomfortable saying you are
+        "wearing" an ice cream cone). But that scale and diversity is
+        obscured due to its grouping algorithms, the small number
+        presented at any one time, and our cultural norms about dress.
+      </dd>
+      <dt>
+        Can I restrict it to my / catalogable / easily-accessible items (no
+        DLC / region-exclusives)?
+      </dt>
+      <dd>
+        No. Instead, consider how the true <em>Daseine</em> of the
+        objects you think you have are also inaccessible to you.
+      </dd>
+      <dt>Can you add images?</dt>
+      <dd>
+        I would like to, but a full set of wearable object images
+        doesn't exist, and if it did I probably couldn't host it here
+        due to its size (estimated ~150MB). If you have one and want
+        to host it, let me know.
+      </dd>
+      
+      <dt>It generated an invalid outfit / sentence / MoriDB link.<br/>
+        It can't generate some valid outfit.<br/>
+      You're missing my favorite item.</dt>
+      <dd>
+        Email (joe.wreschnig at gmail) or tweet
+        (<a href="https://twitter.com/jwreschnig">@jwreschnig</a>)
+        with the details, please. I'm certain there's still
+        miscategorized caps/hats vs. masks/helmets, and plenty of
+        items I forgot.
+      </dd>
+    </dl>
+  </body>
+</html>
diff --git a/labelle.jpg b/labelle.jpg
new file mode 100644 (file)
index 0000000..b49746d
Binary files /dev/null and b/labelle.jpg differ