Import from CSV --> EditTemplateFieldsPlugin

238 views
Skip to first unread message

Domien Stoffels

unread,
Dec 28, 2011, 4:54:05 AM12/28/11
to TiddlyWiki, d.sto...@nl.aswatson.com
Hello,

I am stuggling a few hours now, and feel a little desperate... I would
appreciate some help. Please remind that i am aa NOOB when it comes up
to TiddlyWiki, but i have already made some nice changes (including
plug-in installation) on my Personal Wiki.

I am using the following plug-in: CreateTiddlersFromCSV
|Source|http://www.TiddlyTools.com/#CreateTiddlersFromCSV|
|Version|1.3.1|
|Author|Eric Shulman|

My Problem: within my STANDARD wiki i can only import 1 field with
"TEXT". But there is some formatting in the text i want to import
(several rows with information). Due to to this i need to:

(1) Get some help or advise in formatting inside the import tool, or
(2) Add extra fields to the (imported) Tiddlers to show data in extra
fields.

Online searching brought me to the "EditTemplateFieldsPlugin", which
seems to do the trick (2) for me. There are a lot of pages available
on this Plugin, but i cannot find anywhere HOW to install it...

If i follow the instruction (http://tiddlywiki.org/ - Custom Fields),
but do not understand it completely. It states: put <div
macro="editFields"></div> into your EditTemplate.

And there is some code on this page. What should i do to get it
working? Where to add the code? Import it? If yes: how...?


Or is there anyone that has a different option for my problem: "import
tiddlers with formatting"?

Thanks in advance!



HansBKK

unread,
Dec 28, 2011, 6:57:51 AM12/28/11
to tiddl...@googlegroups.com, d.sto...@nl.aswatson.com
I'm afraid I can't help with your specific problem, as I've never tried to use custom fields in TW. This is actually a fairly advanced topic for someone new to try to do, so I'd suggest you spending some time getting to know the basics before something like this. Most non-technical people can usually get up to speed within a hundred hours of mucking about, people with programming experience much more quickly.

Someone else might be willing and able to answer your specific question, but I suspect they'll need more detailed information. To start with, what do you mean by "formatting" - like, bold, italics etc?

It would also be helpful if you posted a few sample lines of data from the source of what you're trying to bring into TW, and if it isn't obvious, explain what the various fields mean and how you'd like them to display, or how you intend to use them in TW.

Hope this helps. . .

Domien Stoffels

unread,
Dec 28, 2011, 7:13:01 AM12/28/11
to tiddl...@googlegroups.com, d.sto...@nl.aswatson.com

Hello Hans,

 

Thanks for your reply. I personally think I am pretty into the basics. This quest is just the last step in using the Wiki on my department. I NEED to import a lot historic data to implement the Wiki (to prevent hours/days of manual importing). As requested I will post some data as example(s) for my problem:

 

The text I want to display isn’t plain text on 1 row (the only possible option, as far as I can see). For example:

 

[Blank Row]

Question: I have a problem with my Tiddly Wiki Import

[Blank Row]

Answer: Just add some code and solve your problem

[Blank Row]

This is a footer row with text

 

If I try to import the blank rows at this moment, the import-module creates NEW TIDDLER(s) per row which isn’t what I want.
 
To be exact, here's a real example of what i am trying to import:

 

Eric Shulman

unread,
Dec 28, 2011, 12:47:43 PM12/28/11
to TiddlyWiki
> The text I want to display isn’t plain text on 1 row (the only possible
> option, as far as I can see). For example:

You absolutely *can* use data with multiple lines within a CSV file.

Here's an example:
---------------------
"title","text","tags","myfield"
"TiddlerA","this is one line","tag1 tag2","foobar"
"TiddlerB","this is
Four lines

With a blank","tag3 tag4","mumble"
"TiddlerC","This is one line also","tag5","gronk"
---------------------

Note that CSV fields are delimited by double-quotes. Although quoting
is not required for *all* fields, it is *REQUIRED* for any field
values that contain commas, newlines, or double-quotes as literal
characters.

If you paste the above example into CreateTiddlersFromCSV it will
create 3 tiddlers: TiddlerA, TiddlerB, and TiddlerC with the
corresponding title, text and tags, as well as a custom field named
"myfield", which will have values of "foobar", "mumble" and "gronk",
respectively.

Also note that CreateTiddlersFromCSV only accepts input that is either
pasted from the clipboard, entered by hand, or stored in a tiddler as
text (most likely copy/pasted previously). However, you can
conveniently load tiddlers *directly from a CSV file on your drive*,
by using
http://www.TiddlyTools.com/#ImportTiddlersPlugin
which can read CSV-formatted files and automatically processes and
presents them as a list of tiddlers for you to select and import.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

----
TiddlyTools needs YOUR financial support...
Help ME to continue to help YOU...
make a generous donation today:
http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact

HansBKK

unread,
Dec 28, 2011, 8:54:32 PM12/28/11
to tiddl...@googlegroups.com, d.sto...@nl.aswatson.com
See there ya go! 8-)

BTW I highly recommend getting to know say 20+ plugins from Eric's site as part of your basics "boot camp" education in TW.

As to which 20 to start with, I'd say either choose those most often mentioned in the list archives, or just browse the site and cherry-pick those that you think look most useful for your use case.

PS do read their documentation, which is usually included in a separate info tiddler to save space.

Reply all
Reply to author
Forward
0 new messages