On Jan 20, 2:43 pm, EduardWagner <[email protected]> wrote:
> Hi, we do have a lot of recipes now
> and each of them has it's own workspace bag, where we put the
> corresponding TiddlyWebConfig entry "server.workspace": "bags/
> workspace"
> We don't have a TiddlyWebConfig in the system bag any more and so only
> one is loaded with the recipes bags.
> I don't now if there is a feature for multiple workspaces right now,
> there is a tiddlersourceplugin, but i don't now if it's obsolete now.

Whew, I think I finally figured out a workaround to save to different
workspaces thanks to Eduard and FND's advice of either having a new
tiddler macro set to the target bag or adding a custom config in the
local bag: above and
http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/94cdb9613200687c#

with a slight hiccup of having to restart twanager server with the
first save still going to the common bag.

Basically I chose the latter as suggested: there needs to be a local
config in the new bag (not system, not common) that will override the
TiddlyWebConfig in the system bag.

I copied the TiddlyWebConfig from the system bag into 2 test bags: foo
and bar

Then I changed config.defaultCustomField,  "server.workspace": "bags/
common" to "bags/foo" and "bags/bar" respectively.

so
$ less store/bags/foo/tiddlers/TiddlyWebConfig/1 should have
"server.workspace": "bags/foo"
and
$ less store/bags/bar/tiddlers/TiddlyWebConfig/1 should have
"server.workspace": "bags/bar"

more importantly in the system bag
$ less store/bags/system/tiddlers/TiddlyWebConfig/1 will be
"server.workspace": "bags/common"

and if I'm reading correctly saving default to 'default' bag! -http://
www.tiddlywiki.org/index.php?title=Dev_talk:TiddlyWeb&action=edit&section=2

I made the usual recipe of foo recipe = system + foo bag with imported
empty.html and bar recipe = system + bar bag with imwiki empty.html

I then started the server and created a foo tiddler from the foo
recipe and saved

Unfortunately when I checked the foo bag (not foo recipe) I didn't see
my foo tiddler. It got saved to the common bag even though I went on
the command line and edited it to bag/foo:

2009-01-20 16:23:06,707 INFO     127.0.0.1 - GUEST [20/Jan/
2009:16:23:06 ] "PUT /bags/common/tiddlers/FooTiddler?nocache
=0.07761599014055898 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/
foo/tiddlers.wiki"

2009-01-20 17:17:27,651 INFO     127.0.0.1 - GUEST [20/Jan/
2009:17:17:27 ] "PUT /bags/common/tiddlers/FooTiddler?nocache
=0.34582476555036457 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/
foo/tiddlers.wiki"

So I restarted the server and tried creating a bar tiddler in bar
recipe

bingo it worked as shown PUT to bags/bar

2009-01-20 17:18:06,104 INFO     127.0.0.1 - GUEST [20/Jan/
2009:17:18:06 ] "PUT /bags/bar/tiddlers/BarTiddler?nocache=0.
5101406414486139 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/bar/
tiddlers.wiki"  NT

Then I tried foo again, bingo that worked with PUT to bags/foo:

2009-01-20 17:20:16,963 INFO     127.0.0.1 - GUEST [20/Jan/
2009:17:20:16 ] "PUT /bags/foo/tiddlers/FooTiddler?nocache=0.
9306065403541731 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/foo/
tiddlers.wiki"  NT

another bar tiddler just in case, I'm not going crazy:

2009-01-20 17:22:01,646 INFO     127.0.0.1 - GUEST [20/Jan/
2009:17:22:01 ] "PUT /bags/bar/tiddlers/BarTiddler2?nocache=0
.7775235943857574 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/bar/
tiddlers.wiki"  NT

Maybe change the title to Bar (testing save to existing tiddler):

2009-01-20 17:22:08,396 INFO     127.0.0.1 - GUEST [20/Jan/
2009:17:22:08 ] "PUT /bags/bar/tiddlers/SiteTitle?nocache=0.4
650678830220858 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/bar/
tiddlers.wiki"  NT 5


And another foo tiddler 2
2009-01-20 17:23:13,663 INFO     127.0.0.1 - GUEST [20/Jan/
2009:17:23:13 ] "PUT /bags/foo/tiddlers/FooTiddler2?nocache=0
.1970655670193442 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/foo/
tiddlers.wiki"  NT

And lastly title change:
2009-01-20 17:23:19,600 INFO     127.0.0.1 - GUEST [20/Jan/
2009:17:23:19 ] "PUT /bags/foo/tiddlers/SiteTitle?nocache=0.0
2641447881101089 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/foo/
tiddlers.wiki"  NT


So it works but is a bit of a kludge as the user has to go on the
command line and edit the TiddlyWebConfig manually ie save was set to
common bag.

The only hiccup is that the initial save for some reason saves to the
common bag. I'll keep testing.

Sorry for all the long posts, but it helps to refer back when i need
to test again on the next iteration, hopefully beta!
I would have thrown these notes to the wiki, but i don't think it is
useful as tiddlyweb is still evolving.

Thanks again for all the input, it was a good learning experience

Best,
tony




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to