XML in TiddlyWiki

105 views
Skip to first unread message

TonyM

unread,
Dec 1, 2018, 7:55:50 PM12/1/18
to tiddl...@googlegroups.com
Folks,

I have used toodledo.com and other online tools which export their contents as xml.

You may be aware that xml uses a simple system for representing data eg <startdate>0</startdate> and it can be nested (see tasks/task below)

It seems to me it should be easy to take any given xml and use a method to parse it into tiddlers and their fields. If a field name needs to be changed a search and replace should "fix the data"

See also the locations, whose id is stored in the tasks. We should be able parse these (in a separate process if necessary)  such that we have location tiddlers that can be linked to or looked up from the task tiddler.

Basically I think we need to chose which field to use as the title and which other fields to import or include in the text.

With a little careful design it should be simple to provide the tools to do this, and open a great deal of power, especially if we can also generate the xml for tiddlers for export. It need not be interactive. For example if I could say something like this
xmllist sourcetiddler items=task title=title text=note fieldfilter="[all[]] -[prefix[time]]"
from sourcetiddler extract <task> items using their title field as the tiddler title, place note into text, and make a field with its value for all others defined by fieldfilter.

Perhaps the ability to map an incoming "filedname"'s to another fiels name would also be important eg parent=master would take the content of <parent>parent name</parent> and put it in the field master.

Has anyone looked into this or seen any activity on it?

Regards
Tony


<locations>
 
<location><id>106960</id><lat>-33.900589</lat><lon>151.196457</lon><name>Alexandria park</name><desc></desc></location>
</locations>


<tasks>
<task>
 
<id>324412672</id>
 
<date_added>1368964800</date_added>
 
<date_modified>1399682850</date_modified>
 
<via>7</via>
 
<parent>0</parent>
 
<order>0</order>
 
<title>Coaxial cable to test voxson</title>
 
<tag></tag>
 
<folder>3154339</folder>
 
<context>0</context>
 
<goal>0</goal>
 
<location>23515</location>
 
<startdate>0</startdate>
 
<starttime>0</starttime>
 
<duedate>0</duedate>
 
<remind>0</remind>
 
<duedatemod>0</duedatemod>
 
<duetime>0</duetime>
 
<completed>0</completed>
 
<repeatfrom>0</repeatfrom>
 
<repeat></repeat>
 
<priority>0</priority>
 
<length>0</length>
 
<timeron>0</timeron>
 
<timer>0</timer>
 
<status>0</status>
 
<star>0</star>
 
<note>Tv to voxson after fix voxson
Only front right working with any speaker
Front left worked momentarily.
</note>
</task>
</tasks>


Mark S.

unread,
Dec 1, 2018, 10:25:30 PM12/1/18
to TiddlyWiki
In terms of inspiration re the code, perhaps you could look at the evernote importer plugin. I believe it imports enex files, which are actually just another (I think) XML file.

Good luck
-- Mark

@TiddlyTweeter

unread,
Dec 2, 2018, 8:59:06 AM12/2/18
to TiddlyWiki
TonyM

Just wondering IF this could fit with the the XLSX plugin in some way? https://tiddlywiki.com/editions/xlsx-utils/

J.

@TiddlyTweeter

unread,
Dec 2, 2018, 9:03:34 AM12/2/18
to TiddlyWiki
TonyM

This also might enable easier import of TIDDLYTOOLMAP to TW. TiddlyToolmap has OPML export that is pseudo XML. ???

J. x

TonyM

unread,
Dec 4, 2018, 6:15:36 PM12/4/18
to TiddlyWiki
Folks,

Thanks for your suggestions. They each seem to result in me running down multiple rabbit holes, which is better than nothing, but it highlights the value of having an actual xml solution for TiddlyWiki

I will look into XML and WebServices https://www.w3schools.com/xml/xml_services.asp 

It is possibly all out of my depth, but I will look around and consider it with a bit more knowledge. 

Thanks
Tony
Reply all
Reply to author
Forward
0 new messages