[TW5] Creating multiple tiddlers at once by importing JSON file

356 views
Skip to first unread message

Matthew Petty

unread,
Apr 16, 2015, 6:27:50 AM4/16/15
to tiddl...@googlegroups.com
I'm trying to use a JSON file to create a bunch of tiddlers in one go, by following the instructions outlined by Jeremy here: https://groups.google.com/forum/#!topic/tiddlywiki/PQ-GWjqAVOk
My JSON example is here:
[
{
   
"title": "1972",
   
"text":"A [[Year]]"
},
{
   
"title": "1973",
   
"text":"A [[Year]]"
},
{
   
"title": "1974",
   
"text":"A [[Year]]"
},
{
   
"title": "1975",
   
"text":"A [[Year]]"
}
]

But when I save it to 'tw5.json' and drag it to the browser, the Import tiddler looks like this:




PMario

unread,
Apr 16, 2015, 7:00:22 AM4/16/15
to tiddl...@googlegroups.com
Hi Matthew,

I took your json and put it into a file named: test.json
I drag it to tiddlywiki.com and it works as expected.

-mario

Matthew Petty

unread,
Apr 16, 2015, 7:14:21 AM4/16/15
to tiddl...@googlegroups.com
Hi,
I just tested it in a new empty TW5 file, and it worked fine. Looks like there's some weirdness going on. Time to "upgrade" to a fresh install I think. There have been some weird bits left over from plugins, which may be causing problems.

Best regards,
Matthew

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/ynMIC6Q6LmE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3ed94f38-c9c8-4a4c-acdb-2bee03282aac%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
website: matthewpetty.com

READ CAREFULLY. By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

Matthew Petty

unread,
Apr 22, 2015, 9:59:39 AM4/22/15
to tiddl...@googlegroups.com
I just tried this again, and it's strange.
When I drag the JSON onto the TW5, the drag and drop banner appears, and then the Import function appears. What that shows seems to be related to what is on the clipboard, or what has recently been on the clipboard (if that makes sense). That is why the screenshot above mentions "hala" - she's a colleague.

Out of curiosity, I clicked Import. What happened then was that the correct tiddlers were imported!

Here's a new example. The JSON file is below:
[
{
   
"title": "2001",
   
"text":"A [[Year]]"
},
{
   
"title": "2002",
   
"text":"A [[Year]]"
},
{
   
"title": "2003",
   
"text":"A [[Year]]"
},
{
   
"title": "2004",
   
"text":"A [[Year]]"
},
{
   
"title": "2005",
   
"text":"A [[Year]]"
},
{
   
"title": "2006",
   
"text":"A [[Year]]"
},
{
   
"title": "2007",
   
"text":"A [[Year]]"
},
{
   
"title": "2016",
   
"text":"A [[Year]]"
}
]

This is saved as tw5.json, and dragged onto the wiki. What is shown is this:


Which is a different list from a while back! But then I click Import, and get this:


...which is the correct data. So the preview is showing the wrong information, but the results are correct.

It still looks like I need to upgrade.

-Matthew


On Thursday, April 16, 2015 at 3:14:21 PM UTC+4, Matthew Petty wrote:
Hi,
I just tested it in a new empty TW5 file, and it worked fine. Looks like there's some weirdness going on. Time to "upgrade" to a fresh install I think. There have been some weird bits left over from plugins, which may be causing problems.

Best regards,
Matthew
On Thu, Apr 16, 2015 at 3:00 PM, PMario <pmar...@gmail.com> wrote:
Hi Matthew,

I took your json and put it into a file named: test.json
I drag it to tiddlywiki.com and it works as expected.

-mario

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/ynMIC6Q6LmE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
Reply all
Reply to author
Forward
0 new messages