On Jun 4, 5:05 am, "[email protected]" <[email protected]> wrote: > On Jun 4, 1:55 am, tony <[email protected]> wrote:
> Yeah, this is because nothing has been migrated. The README in the > migrate plugin[1] explains how to do that. Make sure you make a > backup! > > [1]http://github.com/tiddlyweb/tiddlyweb-plugins/tree/master/migrate Thank you Chris! This is a great example of a wonderful plugin that highlights TiddlyWeb's extensibility. Simply awesome!!! For those following at home, First I added the migrate.py to my instance, then edited the tiddlywebconfig.py flipping over Chris' example of text store to sqlite.db then ran the migrate command on twanager like so: $ twanager migrate migrate users migrate recipes putting recipe default migrate bags putting tiddler ServerSideSavingPlugin:1 in bag system putting tiddler TiddlyWebAdaptor:1 in bag system putting tiddler TiddlyWebConfig:1 in bag system Now there is a sqlite db added to my instance $ ls migrate.py sql.py store test.db tiddlywebconfig.py wiki.db migrate.pyc sql.pyc test tiddlyweb.log tiddlywebconfig.pyc Then I comment the migrate lines (so I don't forget them in the future) and add the sql config to the tiddlywebconfig.py. This will allow Tiddlyweb to use the newly created sqlite db as a store! Here's my tiddlywebconfig.py # A default config, make your own changes here. config = { #'twanager_plugins': ['migrate'], #'server_store': ['text', {'store_root': 'store'}], #'target_store': ['sql', {'db_config': 'sqlite:///wiki.db'}], # using sqlite 'server_store': ['sql', {'db_config': 'sqlite:///wiki.db'}], # using mysql #'server_store': ['sql', # {'db_config': 'mysql://localhost/tw?charset=utf8'}], } Finally to validate that indeed it worked, I opened up tiddlyweb, saved a test tiddler then went back and checked it using sqlite. Voila, ici: ~/mywikistuff $ sqlite3 wiki.db SQLite version 3.6.14.2 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> select * from tiddlers; 433843e0-0171-4fab-a3f6-e4df671abe28|ServerSideSavingPlugin|system 8ea350de-ee94-4bbb-8154-843420a2f7aa|TiddlyWebAdaptor|system 44b50275-9428-4dd8-8d4c-bd249cca1f51|TiddlyWebConfig|system 3e3ab514-5719-4dfc-8a7b-33d5e5f8f865|TestTiddler|common Best, tony --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/TiddlyWikiDev?hl=en -~----------~----~----~----~------~----~------~--~---
