mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-16 15:28:24 +00:00
Added preliminary support for generating RSS feeds
Which also included adding the shadow shadow tiddlers that are built into TiddlyWiki's source code, and are not handled by cook.rb and ginsu.rb
This commit is contained in:
@@ -47,6 +47,40 @@ var switches = parseOptions(Array.prototype.slice.call(process.argv,2),"dummy"),
|
||||
lastRecipeFilepath = null,
|
||||
currSwitch = 0;
|
||||
|
||||
// Add the shadow tiddlers that are built into TiddlyWiki
|
||||
var shadowShadowStore = new WikiStore(null),
|
||||
shadowShadows = [
|
||||
{title: "StyleSheet", text: ""},
|
||||
{title: "MarkupPreHead", text: ""},
|
||||
{title: "MarkupPostHead", text: ""},
|
||||
{title: "MarkupPreBody", text: ""},
|
||||
{title: "MarkupPostBody", text: ""},
|
||||
{title: "TabTimeline", text: "<<timeline>>"},
|
||||
{title: "TabAll", text: "<<list all>>"},
|
||||
{title: "TabTags", text: "<<allTags excludeLists>>"},
|
||||
{title: "TabMoreMissing", text: "<<list missing>>"},
|
||||
{title: "TabMoreOrphans", text: "<<list orphans>>"},
|
||||
{title: "TabMoreShadowed", text: "<<list shadowed>>"},
|
||||
{title: "AdvancedOptions", text: "<<options>>"},
|
||||
{title: "PluginManager", text: "<<plugins>>"},
|
||||
{title: "SystemSettings", text: ""},
|
||||
{title: "ToolbarCommands", text: "|~ViewToolbar|closeTiddler closeOthers +editTiddler > fields syncing permalink references jump|\n|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|"},
|
||||
{title: "WindowTitle", text: "<<tiddler SiteTitle>> - <<tiddler SiteSubtitle>>"},
|
||||
{title: "DefaultTiddlers", text: "[[GettingStarted]]"},
|
||||
{title: "MainMenu", text: "[[GettingStarted]]"},
|
||||
{title: "SiteTitle", text: "My TiddlyWiki"},
|
||||
{title: "SiteSubtitle", text: "a reusable non-linear personal web notebook"},
|
||||
{title: "SiteUrl", text: ""},
|
||||
{title: "SideBarOptions", text: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options \u00bb" "Change TiddlyWiki advanced options">>'},
|
||||
{title: "SideBarTabs", text: '<<tabs txtMainTab "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "Tags" "All tags" TabTags "More" "More lists" TabMore>>'},
|
||||
{title: "TabMore", text: '<<tabs txtMoreTab "Missing" "Missing tiddlers" TabMoreMissing "Orphans" "Orphaned tiddlers" TabMoreOrphans "Shadowed" "Shadowed tiddlers" TabMoreShadowed>>'}
|
||||
];
|
||||
store.shadows.shadows = shadowShadowStore;
|
||||
for(var t=0; t<shadowShadows.length; t++) {
|
||||
shadowShadowStore.addTiddler(new Tiddler(shadowShadows[t]));
|
||||
}
|
||||
|
||||
|
||||
var processNextSwitch = function() {
|
||||
if(currSwitch < switches.length) {
|
||||
var s = switches[currSwitch++],
|
||||
@@ -119,8 +153,14 @@ var commandLineSwitches = {
|
||||
if(!recipe) {
|
||||
callback("--savewiki requires a recipe to be loaded first");
|
||||
}
|
||||
fs.writeFile(args[0],recipe.cook(),"utf8",function(err) {
|
||||
callback(err);
|
||||
fs.writeFile(path.resolve(args[0],"index.html"),recipe.cook(),"utf8",function(err) {
|
||||
if(err) {
|
||||
callback(err);
|
||||
} else {
|
||||
fs.writeFile(path.resolve(args[0],"index.xml"),recipe.cookRss(),"utf8",function(err) {
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user