Just played around with this a bit and having the 'title' in the 1st column 
of the spreadsheet, setting the primary key to 0 and then 
putting [<primaryKey>] in the box for the shadow name filter names the 
resulting tiddlers with the 'title' field - so all good!

With regard to the creation date,  if I gave it a different name (so that 
it is imported), I suppose I could still perform ordering  and searching 
etc. in the same way.

Good to have some confirmation of this before I go any further.


On Sunday, 14 June 2020 12:37:24 UTC+1, Jon wrote:
> Hi Joshua,
> The unpacking worked really well and things are looking promising but 
> there are few glitches I can't get past.
> For the .csv file to import, I included the fieldnames 'title' 'text' & 
> 'created'.
> The text field appeared in the body of the tiddler as it should but the 
> created & title fields appear to be absent.
> Instead, the name of the tiddler is derived from the name of the plug-in.
> I noticed there is an option to define the primary key and as the title 
> field is in the first row of the spreadsheet,  I chose the column 0 option. 
> This created a name for each tiddler which includes the contents of the 
> 'title' field but combined with the name of the plugin - so perhaps a bit 
> of tweaking will solve this easily.
> Also, I notice that for the unpacked tiddlers, there is still a message 
> which appears in edit mode:
> "This is a modified shadow tiddler. You can revert to the default version 
> in the plugin Data/Metrics - HH by deleting this tiddler"
> Regards
> Jon
> This is a modified shadow tiddler. You can revert to the default version 
> in the plugin Data/Metrics - HH by deleting this tiddler
> On Sunday, 14 June 2020 07:25:46 UTC+1, Jon wrote:
>> Hi Joshua,
>> many thanks for getting back to me with the missing piece.
>> I'll have a go later and report back.
>> Regards
>> Jon
>> On Sunday, 14 June 2020 00:46:13 UTC+1, Joshua Fontany wrote:
>>> Hi Jon, author of JsonMangler here. I setup the import to package the 
>>> imported tiddlers into a plugin to have a simple way of 
>>> overwriting.updating/deleting a whole import at once.
>>> The way that tiddlywiki is setup, "shadow" tiddlers are full tiddlers in 
>>> the system (beware of confusing this with "system" tiddlers that start with 
>>> "$:/" because something can be both a shadow and a system tiddler).
>>> Meaning that you can search for and/or filter-query any "shadow" tiddler 
>>> just like any other tiddler, BUT you have to start your filter runs with 
>>> `all[shadows+tiddlers]` instead of the default (asumed if missing) 
>>> `all[tiddlers]`. The one special feature of shadow tiddlers is that you can 
>>> edit them, creating a "regular" tiddler of that name to store the edits, 
>>> and then if you delete the edited version the "backup/shadow" version is 
>>> immediately referenced in its place.
>>> For example, after importing the Video Games CSV in my example wiki, you 
>>> can hit the Filter tab of $:/AdvancedSearch and enter 
>>> `[all[shadows+tiddlers]search:*[Mario]]` to display links to all references 
>>> to "Mario".
>>> If you want to promote a shadow tiddler to a regular one, the easiest 
>>> way to do that is a weird little hack I picked up, where you setup a button 
>>> to delete a field that DOES NOT EXIST from each shadow tiddler, like so:
>>> ```
>>> \define plugin-target() Data/vgsales
>>> \define unpack-actions()
>>> <$list variable="shadowtiddler" 
>>> filter="[<plugin-target>indexes[/tiddlers]]">
>>> <$action-setfield $tiddler=<<shadowtiddler>> 
>>> $field="does.not.exit.in.this.wiki452369084306093845760894253" />
>>> </$list>
>>> \end
>>> <$button actions=<<unpack-actions>> >
>>> Press here to unpack <<plugin-target>>
>>> </$button>
>>> <$list variable="test" filter="[<plugin-target>indexes[/tiddlers]]">
>>> </$list>
>>> ```
>>> This creates a regular tiddler that is identical to the shadow, for each 
>>> one in the plugin-target. Change the definition of that line to your target 
>>> plugin containing yuor imported tiddlers and it will "unpack" it for you 
>>> (you will no longer need `all[shadows+tiddlers]` in filters to target the 
>>> "unpacked" tiddlers). You will see the links to your tiddlers go from being 
>>> Bold to normal font to show that they are now "overwritten shadow 
>>> tiddlers", and exist as normal tiddlers in the wiki.
>>> Best,
>>> Joshua F.
>>> On Saturday, June 13, 2020 at 12:40:10 AM UTC-7, Jon wrote:
>>>> Hi,
>>>> I'm importing a .csv file and I want each row to be a separate tiddler.
>>>> What's the best way to do this?
>>>> I have tried TW5-JsonMangler/ 
>>>> <https://joshuafontany.github.io/TW5-JsonMangler/> where "each 
>>>> individual row is rendered to a tiddler, then these tiddlers are packaged 
>>>> as shadow-tiddlers into a plugin."
>>>> but then there doesn't appear to be any instructions as to what to do 
>>>> with the resulting plugin (sorry, I'm only an end user).
>>>> Any guidance about using this method or an alternative much appreciated.
>>>> Regards
>>>> Jon 

You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to