I’ve lost the 1mm pencil leads in choas of my office (and many other things). So I believe it would help me to maintain: a storage list (storage namespace? e.g. house/room/cupboard/drawer): a stuff list (namespace? stationary/writing stuff/pencil/leads); and associations between the storage and the stuff so that a helpful computer can generate: a two columned table with ordered full storage namespace on left and corresponding full stuff namespace on right; a two columned table with ordered stuff namespace on left and corresponding storage namespace on right; and a search function to locate an item or class of stuff with one or more full storage namespace/s. Is this something for Tiddlywiki? or would I be better off in another language. I’m getting bogged down in writing a tiddler for every namespace item AND repeating every name in the namespace in the tiddler. Any comments and guidance appreciated. Kind regards, Pokey
Hi Pokey,
Welcome!
That’s a description, how I personally would tackle the problem. Step by Step
I think you have 2 classes of elements.
- container
- stuff
Container
The container has a location like earth/country/state/city/street/no/room-no/cupboard/drawer/secret …
This info can be saved in a tiddler eg: container-0001 which gives you 9999 unique container names, which imo would be enough for me
You could call those names an ID.
In TW tiddler titles have to be uniqe, so they work perfectly for that usecase.
The tiddler can have the following fields
title: container-0001
tag: container
location: earth/country/state/city/street/no/room-no/cupboard/drawer/secret
caption: Safe
subtitle: more specific than caption
description: Some info about the container. **not the password ;)**
{{||my-container-template}}
The my-container-template can look like this
title: my-container-template
Name: {{!!caption}}
Description: {{!!description}}
Location: {{!!location}}
Stuff
The stuff can be anything eg: 1mm pencil. It could be tagged: stuff
title: 1mm pencil
tag: stuff
location: container-0001
{{||stuff-template}}
Some info about the pencil in the text field
So it’s easy to change the location of the 1mm pencil. .. Just change the location field to eg: container-0002
Stuff Template
stuff-template will show the location of the element and link to the container title like so:
title: stuff-template
Location: <$link to={{!!location}} ><$text text={{{ [{!!location}get[location]] }}}/> </$link>
---
You may ask: But how do I know that container-0002 is the kitchensink. … Where I want to store some stuff
Nice that you ask. Go on reading …
Listing Containers
To get a list of all containers you can use the list-links-draggable macro
Using the container tag shows a list and makes it usable as a list for the select-widget
title: container
list: container-0001 container-0002 container-9999
Drag and drop new containers to the list to register them for the select-widget
<<list-links-draggable tiddler:"container">>
Make Stuff Location Selectable
To make the stuff-template more useful. We want to have a select-widget to define the location of stuff. So we have to extend the stuff-template tiddler See: select-widget
title: stuff-template
Location: <$link to={{!!location}} ><$text text={{{ [{!!location}get[location]] }}}/> </$link>
Change Location:
<$select field="location" default='container-9999'>
<$list filter='[all[shadows+tiddlers]tag[container]sort[title]]'>
<option value=<<currentTiddler>>><$view field='caption'/> -- <$view field='description'/></option>
</$list>
</$select>
---
Hope that helps
have fun!
mario
PS: Here are some tiddlers to play with:
find-stuff-example.json (2.7 KB)
That’s not a finished project. There are a lot of possible UI improvements and convenience functions.
But I think it’s a good start.
have fun!
mario
A more useful my-container-template should also list the content like so:
Name: {{!!caption}}<br>
Description: {{!!description}}<br>
Location: {{!!location}}<br>
------
Stuff in the container
<<list-links filter:"[tag[stuff]location<currentTiddler>]">>
I think Tiddlywiki is ideal for this, but I think a design approach like marios would be better. I have built something like this back in TiddlyWiki classic, but not revisited in TW 5.x.
- My approach would be a hierarchical list of locations organised like tiddlywiki.com’s contents menu, for example home > home office > home office desk > 1st draw home office desk or 4 tiddlers related by tags.
- Its easy to use new here to divide a location into smaller locations
- You could organise things this way too, but it’s not so important because you can search for items “pencils”, once you find an item you look to see what its location(s) is/are.
- When placing something in a place a way to navigate the location heirachy to assign a location would be helpful.
- by keeping locations heirachical you could move a box or filing cabinet to another room or the shed keys from a desk draw to a kitchen hook. Yet any items in the box will move with it.
- if possible keep some places generic eg “utensil draw” where ever it is thats the default place for placing utensils. Now you dont need to record every thing in the draw just put it physically in the correct place. Use keywords in the location definition so it comes up when searched.
- the ability to move, drag and drop and organise generically will help everyday use so it does not age.
I think we could make some general use tools that would help with this including an alternative hierarchy, say using TocP and allow items in only one location unless generic, select from hierarchy, drop on containers (tiddlers) etc…
I do like the location “namespace” like approach, because it’s only stored at 1 very specific place. The container tiddler where it belongs to.
Stuff can easily change the container
Containers can easily be moved (if needed) by changing the namespace and we are done.
Changing several tags may get complex very easily.
If every location is an independent tiddler, you need only change the single location field, ideally via drag and drop.
Thank you Mario for all your comments. I will have fun. It may take awhile for me to digest them but I am now hopeful that Tiddlywiki can provide a solution.
Thank you also TW-Tones. I will let you know how I get on.
Yea. If actually was fun to create it. I did play around with a similar concept with TWclassic a long time ago.
So I did start to make some tests. Which was the fastest part. Creating the steps took much longer.
I did add some links to widgets that are used.
But if you have any questions just ask. The community will help you out.
-m