This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Basic way to load a recipe at /<name>. | |
Add 'friendlywiki' to system_plugins in tiddlywebconfig.py: | |
config = { | |
'system_plugins': ['tiddlywebwiki','friendlywiki'], | |
'secret': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', | |
'twanager_plugins': ['tiddlywebwiki'], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target_server:http://cdent-t10.tiddyspace.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/WikiTextRules.js b/js/WikiTextRules.js | |
index 4b16afd..987cced 100755 | |
--- a/js/WikiTextRules.js | |
+++ b/js/WikiTextRules.js | |
@@ -46,6 +46,10 @@ textPrimitives.tiddlerAnyLinkRegExp = new RegExp("("+ textPrimitives.wikiLink + | |
textPrimitives.brackettedLink + ")|(?:" + | |
textPrimitives.urlPattern + ")","mg"); | |
+textPrimitives.spaceName = "[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]"; | |
+textPrimitives.spaceNameStrict = "[a-z][a-z0-9-]*"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a stub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tiddlyweb import control | |
from tiddlywebplugins.utils import get_store | |
from tiddlyweb.store import Store, NoBagError,NoTiddlerError | |
from tiddlyweb.model.bag import Bag | |
from tiddlyweb.model.recipe import Recipe | |
from tiddlyweb.model.tiddler import Tiddler | |
def mytest(environ, start_response): | |
start_response('200 OK', [ | |
('Content-Type', 'text/html; charset=utf-8') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
PUT a tiddler. | |
""" | |
import httplib2 | |
def put(server, bag, tiddler, body): | |
http = httplib2.Http() | |
url = '%s/bags/%s/tiddlers/%s' % (server, bag, tiddler) | |
response, content = http.request(url, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tiddlyweb.util import merge_config | |
from tiddlyweb.config import config as global_config | |
from tiddlywebconfig import config as custom_config | |
print "BEFORE: custom", custom_config["instance_tiddlers"] | |
print "BEFORE: global", global_config["instance_tiddlers"] | |
merge_config(global_config, custom_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
quick plugin for dynamic recipe. | |
""" | |
from tiddlywebplugins.utils import replace_handler | |
from tiddlywebp.web.handler.recipe import get_tiddlers | |
def init(config): | |
replace_handler(config['selector'], '/', dict(GET=front)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import random | |
from math import sqrt | |
import sys | |
WORDS = 'web2' | |
LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
INDEX = {} | |
FOUND = [] |