Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import os
- # extend module search path for access to tiddlywebconfig.py
- sys.path.insert(0, os.getcwd())
- from tiddlyweb.config import config
- from tiddlywebplugins.instancer import Instance
- INSTANCE_PATH = "myInstance"
- store_structure = {
- "bags": {
- "alpha": {},
- "bravo": {}
- },
- "recipes": {
- "default": {
- "recipe": [
- ("alpha", "select=tag:foo"),
- ("bravo", "limit=20")
- ]
- }
- }
- }
- config["instance_tiddlers"] = [
- ("alpha", ["/path/to/foo.tid", "/path/to/bar.tiddler"]),
- ("bravo", ["/path/to/foo.recipe", "/path/to/bar.js"])
- ]
- config["instance_config_head"] = "\n# lorem ipsum dolor sit amet\n"
- instance = Instance(INSTANCE_PATH, config)
- instance.spawn(store_structure)
Add Comment
Please, Sign In to add comment