[
    {
        "created": "20160502222600496",
        "text": "/*\\\ntitle: $:/MAS/list2bullets.js\ntype: application/javascript\nmodule-type: a\nTurn string text containing  a TW5 list into separate bulleted items \n\\*/\n(function(){\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n/*\nInformation about this macro\n*/\nexports.name = \"list2bullets\";\nexports.params = [{name:\"lst2\",default:\"\"}]; \n/*\nRun the macro\n*/\nexports.run = function() {\n/* alert(\"curstart is running - size was \" + size) ; */\n/* var size=this.getVariable(\"size\") ; */\nvar lst=this.getVariable(\"MAS_list\") ; \n/* alert(\"Lst: \" + lst) ; */\n    lst = lst.replace(/\\]\\] \\[\\[/g,\"]]_@@1_[[\") ;\n    lst = lst.replace(/\\]\\] /g,\"]]_@@1_\") ;\n    lst = lst.replace(/ \\[\\[/g,\"_@@1_[[\") ;\n    var pattern = new RegExp(\"(\\\\[\\\\[.*?) (.*?\\\\]\\\\])\" ,\"gi\") ;\n    while(lst.search(pattern) > -1) { \n\tlst = lst.replace(pattern, \"$1_@@2_$2\") ;\n    } \n\n    lst = lst.replace(/ /gi,\"_@@1_\") ;\n    lst = lst.replace(/_@@2_/gi,\" \") ;\n    return \"* \" + lst.replace(/_@@1_/gi,\"\\n* \") ;\nreturn lst ;\n};\n})();\n",
        "modified": "20160503040247466",
        "module-type": "macro",
        "tags": "Current Project_Snapshot",
        "title": "MAS/list2bullets.js",
        "type": "application/javascript"
    },
    {
        "created": "20160428000728976",
        "text": "\\define saveSnapshot()\n<$set name=\"MAS_list\" filter=\"[list[$:/StoryList]!tag[excludeStory]]\" >\n<$button> Save Snapshot\n<$action-setfield $tiddler=\"$(snapshot)$\" $field=\"text\" $value=<<list2bullets>> tags=\"Snapshot\" list=<<MAS_list>> >\n\n</$button>\n</$set>\n\\end\n\n\\define showSnapshot()\n<$button set=\"$:/StoryList!!list\" setTo={{$(snap)$!!list}}>Show Snapshot</$button>\n\\end\n\n;Show Snapshot\n\n<span title=\"Select a Snapshot\"><$select tiddler=\"$:/_snapshots\" field=\"story-name\" default='(none)'>\n<$list filter=\"[tag[Snapshot]]\" variable=\"currentIndex\">\n<option value=<<currentIndex>>><<currentIndex>></option>\n</$list>\n</$select></span>\n<$set name=\"snap\" value={{$:/_snapshots!!story-name}}>\n<<showSnapshot>>\n</$set>\n\n;Save Snapshot\n\n<span title=\"Enter a Name\"><$edit-text tiddler=\"$:/_snapshots\" field=\"story-name\"/></span>\n<$set name=\"snapshot\" value={{$:/_snapshots!!story-name}}>\n<<saveSnapshot >>\n</$set>",
        "modified": "20160503040403929",
        "tags": "Project_Snapshot excludeStory Current",
        "title": "Story Saver with Mods"
    }
]