Note: this message was copied from a different thread in order to
provide a distinct subject heading...
Eric Weir wrote:
> So, is there a way to import a text file into TW as a tiddler? And if
> there is, is there a way to break a tiddler down into several smaller
> tiddlers, i.e., to split a list of contacts and contact info down into
> separate tiddlers, one for each contact?
drag-and-drop your text file onto an open TW window to automatically
create a tiddler. Also supports dropping multiple files and/or entire
directories!
provides a form to split a tiddler into several smaller tiddlers. By
default, it uses "----" on a line by itself (i.e., a TW-syntax
"HR" (horizontal rule)) to separate content. First line following
separate is the 'target tiddler title', remaining lines are the
tiddler content. You can specify an alternative separator if "\n----
\n" is used in your content (or if some other text is already used to
separate your content)
> drag-and-drop your text file onto an open TW window to automatically > create a tiddler. Also supports dropping multiple files and/or entire > directories!
> provides a form to split a tiddler into several smaller tiddlers
To things, Eric.
[1] I forgot to mention in my first reply that I believe the line used by InfoSelect, my free form database application, to separate individual notes when exporting to a text file is "----" Very convenient for me.
[2] I've had experience installing exactly one plugin so far -- your newDocument, with your help. But I don't have a good sense of what's involved in installing plugins generally. Can you refer me to something with general instructions? Alternatively, how do I install the plugins above?
Thanks, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
In general, the first two steps to installing a plugin are always:
* Import the tiddlers
* save-and-reload
The remaining steps (if any) depend upon what the particular plugin
does:
* if it defines a macro, you need to embed that macro somewhere
(e.g. "SideBarOptions", "MainMenu", or some other 'regular' tiddler
that is displayed in the 'story column')
* if it has configuration options, you might add them somewhere as
well, e.g.:
<<option chkSomething>> (for checkbox -- true/false -- controls)
or <<option txtSomething>> (for text input controls)
(some plugins provide their option controls already embedded in
their documention, while others may automatically add their controls
to the TW-standard [[AdvancedOptions]] tiddler)
* default configuration settings can often be overridden by
creating a custom tiddler (e.g., "ConfigTweaks" or "CookieJar"),
tagged with "systemConfig", that contains one or more lines of
javascript, like this:
---------------
config.options.chkSomething=false;
config.options.txtSomething="foo bar baz mumble frotz gronk snork
snerfle plurmb";
---------------
For the FileDropPlugin and FileDropPluginConfig, it's really a 'no
brainer'... the configuration controls are present in
the ...PluginConfig (of course!), and there isn't any macro to insert
anywhere. If the default settings suit your needs, there is *nothing*
more that you need to do: after the intial import-then-save-and-
reload, the FileDrop functionality is ready to use!
For SplitTiddler, there is also no additional installation steps. It
is a completely self-contained HTML form with it's own 'onsubmit'
javascript handler, so you just have to view the tiddler in the story
column and start using the form!
I've imported a text file from my free form database to my new TW, but I couldn't figure out how to get to the functionality of the FileDrop plugin.
I drug the file from my file manager to an empty tiddler. The result was a URL to the file. When I clicked on the URL, it opened in another window. So I just copied and pasted to t"unresponsive script he empty tiddler. I don't think that was the way it was supposed to work.
I tried SplitTiddler plugin. It was straightforward, but the splitting is taking a very long time. And of course my browser [Firefox] is repeatedly displaying the "unresponsive script" warning.
So now, a bunch of questions. [I don't expect anybody to help me with all. Any help with any of them will be appreciated.]
[1] How *do* use the FileDrop plugin?
[2] Should the splitting take this long? The file I imported has about 180 items in it, i.e., I should end up with 180 new tiddlers. The process has been going on about half an hour now.
[3] The "unresponsive script" warnings seem to be slowing the process down. It appears that while the warning is displayed, the splitting process stops. Is there a way to stop the "unresponsive script" warning? Or to keep it from interfering with the progress of the splitting process?
[4] I'm going to end up with a HUGE number of tiddlers. This is just one file. I have about 50, most much smaller than this one. Is there anyway I can keep *all* of these tiddlers from being displayed in the tiddler list, e.g., by having one tiddler called "contacts," with categories of contacts listed on it, with each category containing a list of actual contacts, and with only the "contacts" tiddler showing up on the main tiddler list.
[5] In most cases the titles of the individual contact tiddlers is the contacts name. The names are in normal order, i.e., first then last. Is there going to be a way to sort the tiddlers by the last name?
I know this is a lot. As I say, any help with anything from anyone at anytime will be appreciated.
Sincerely, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
> I drug the file from my file manager to an empty tiddler. The result was
> a URL to the file. When I clicked on the URL, it opened in another
> window.
> [1] How *do* use the FileDrop plugin?
Do you mean that you had created a new tiddler, open for editing, and
then dropped the file onto that open textarea input control? I'm not
certain, but I think the textarea control in FireFox may be handling
the drop all by itself (inserting the URL of the dropped file), so the
FileDropPlugin doesn't even get to see the event.
Try dropping the file somewhere on the TW document background.
> I tried SplitTiddler plugin. It was straightforward, but the splitting
> is taking a very long time. And of course my browser [Firefox] is
> repeatedly displaying the "unresponsive script" warning.
> [2] Should the splitting take this long? The file I imported has about
> 180 items in it, i.e., I should end up with 180 new tiddlers. The
> process has been going on about half an hour now.
The form's 'onsubmit' code could probably be optimized a bit. I have
some idea what *might* be making it so slow...I'll do some testing and
see if I can speed it up.
> [3] The "unresponsive script" warnings seem to be slowing the process
> down. It appears that while the warning is displayed, the splitting
> process stops. Is there a way to stop the "unresponsive script" warning?
> Or to keep it from interfering with the progress of the splitting process?
In FireFox, open a new tab/window, enter "about:config" into the
browser's location input field. When the list of browser
configuration settings appears (a *very* long list!), enter
dom.max_script_run_time
into the "filter" field. Double-click the resulting entry in the
display, and enter a new value (in seconds).
> [4] I'm going to end up with a HUGE number of tiddlers. This is just one
> file. I have about 50, most much smaller than this one. Is there anyway
> I can keep *all* of these tiddlers from being displayed in the tiddler
> list, e.g., by having one tiddler called "contacts," with categories of
> contacts listed on it, with each category containing a list of actual
> contacts, and with only the "contacts" tiddler showing up on the main
> tiddler list.
> [5] In most cases the titles of the individual contact tiddlers is the
> contacts name. The names are in normal order, i.e., first then last. Is
> there going to be a way to sort the tiddlers by the last name?
Not sure... maybe the BetterTimelineMacro can do this?
> In FireFox, open a new tab/window, enter "about:config" into the > browser's location input field. When the list of browser > configuration settings appears (a *very* long list!), enter > dom.max_script_run_time > into the "filter" field. Double-click the resulting entry in the > display, and enter a new value (in seconds).
Thanks, Eric -- on all the responses. I think there must be a plugin for every situation!
Regarding the above, delaying the appearance of the "unresponsive script" warning by seconds will not help. I think this process has been going on for about two hours now. I think I've had to click the "continue" button on the warning window at lease twice for *every* new tiddler that's split off from the original. [we're getting into the "t"s now. Hopefully it's going to come to an end soon.]
Just FYI, part of the problem in this situation is almost certainly my system. It's been *very* slow, *excruciatingly* slow, since shortly after I made it into a Linux system. The processor is a 1.6 Ghz P IV. I'm told I have plenty of memory -- 512 MB. My hard drive is only 10 GB, and it's almost full. I'm also told my onboard graphics processor may be gumming things up. Frankly, I think Thunderbird and Firefox are also.
I"m waiting for a couple of checks to arrive, to get my taxes paid, and for resolution of a contract with currently my only client. When that's all settled, and it should be soon, I'm either gonna do a serious upgrade -- more memory, new graphics card, more storage, and a fresh install of the most recent version of Kubuntu -- or just buy a new machine -- probably wouldn't cost much more -- with Kubuntu already installed.
Since TW's platform-independent, I may try the next import and split on my Windows desktop, which I hardly use any more, but is definitely faster than my current Linux setup, or on my laptop, which is still a Windows machine, though I plan to install Kubuntu on it, as well.
Thanks again, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
> Regarding the above, delaying the appearance of the "unresponsive
> script" warning by seconds will not help. I think this process has been
> going on for about two hours now. I think I've had to click the
> "continue" button on the warning window at lease twice for *every* new
> tiddler that's split off from the original. [we're getting into the "t"s
> now. Hopefully it's going to come to an end soon.]
> Just FYI, part of the problem in this situation is almost certainly my
> system. It's been *very* slow, *excruciatingly* slow, since shortly
> after I made it into a Linux system. The processor is a 1.6 Ghz P IV.
> I'm told I have plenty of memory -- 512 MB. My hard drive is only 10 GB,
> and it's almost full. I'm also told my onboard graphics processor may be
> gumming things up. Frankly, I think Thunderbird and Firefox are also.
Ouch! That sounds like it could be a very slow system (at least for
running this particular bit of code...)
512Mb of RAM can be eaten up very quickly by running just a handful of
larger apps. I've seen FireFox allocate over 400Mb all by itself,
especially when actively editing a large TW document over a long
period of time.
I think that FireFox still has some "memory leaks", or at least
deferred "garbage collection" handling that allows FireFox's 'memory
footprint' to grow so large. See the following TiddlyTools FAQ
article for a browser configuration tweak that *might* help:
http://www.TiddlyTools.com/#FAQ_FireFoxTrimOnMinimize
Because your RAM may not be sufficient to handle the needed memory
footprint, the system is probably doing a lot of *swapping* (using
disk space to temporarily store parts of the memory footprint that are
not actively being used). This can lead to 'disk
thrashing' (excessive amounts of disk I/O). Inasmuch as disk I/O is
significantly slower than direct memory access, as soon as you run out
of enough active RAM, your system starts to swap and the process bogs
down.
In addition, if your disk is almost full, there might not be a lot of
extra disk space for swapping, causing the system to constantly
'garbage collect' in an attempt to find enough disk space to store the
'swap file'
-----------------
In addition to the system resource problems described above, the
[[SplitTiddler]] process itself is, unfortunately, not very
efficient. Even on my relatively speedy system, (an AMD Athlon 64x
Dual core @ 2.21Ghz (effective speed: 4.2Ghz), with 2Gb of RAM and a
300Mb disk, running Windows XPSP2), splitting a tiddler that has just
8 parts took nearly 7.4 seconds (a little under 1 second per part!).
Of course, for 180 parts, this should only take a few minutes (which
still seems like an really long time, especially when you are waiting
for the results!)
Fortunately, as I promised earlier, I have done some work to improve
the performance of the [[SplitTiddler]] processing, and I'm please to
report that I have been able to cut the processing time ***IN HALF!!!!
*** (down to 3.7 seconds for the above 8-part test case, or about 450
milliseconds per part).
While this doesn't help you with your currently running process (which
I hope has finished by now :-), it should improve things for future
use:
> While this doesn't help you with your currently running process (which > I hope has finished by now :-) , it should improve things for future > use:
Thanks for the explanation of the problems that my system is causing -- or experiencing. Makes doing something about that -- upgrading or buying a new machine -- more imperative and more urgent.
My poor system. I guess I really put it through a workout today. I don't remember when I started. It seems like it was 2:00 or 2:30. When I finished is was probably after 5:00. Literally, I had to click the "unresponsiveness script" window two times for every new tiddler. Given your description of what was probably going, it must have really been struggling just to stay alive.
Anyway, I've got my personal contacts in my TW now. I don't think I'll even think of trying to bring the rest until after I get a new machine, or whatever. Meantime, I'll figure out how to organize the ones I have, so that when I do bring the rest in my tiddler list won't be so long.
Thanks for your help yesterday and today.
Sincerely, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
> provides a form to split a tiddler into several smaller tiddlers. By
> default, it uses "----" on a line by itself (i.e., a TW-syntax
> "HR" (horizontal rule)) to separate content. First line following
> separate is the 'target tiddler title', remaining lines are the
> tiddler content. You can specify an alternative separator if "\n----
> \n" is used in your content (or if some other text is already used to
> separate your content)
Would it also be possible to specify for the 'target tiddler title' -
instead of the first line following the separator - only the fist word
after the separator?
Thanks for any reply in advance,
W.
On 9 Mrz., 23:30, Eric Weir <eew...@bellsouth.net> wrote:
> > While this doesn't help you with your currently running process (which
> > I hope has finished by now :-) , it should improve things for future
> > use:
> Thanks for the explanation of the problems that my system is causing --
> or experiencing. Makes doing something about that -- upgrading or buying
> a new machine -- more imperative and more urgent.
> My poor system. I guess I really put it through a workout today. I don't
> remember when I started. It seems like it was 2:00 or 2:30. When I
> finished is was probably after 5:00. Literally, I had to click the
> "unresponsiveness script" window two times for every new tiddler. Given
> your description of what was probably going, it must have really been
> struggling just to stay alive.
> Anyway, I've got my personal contacts in my TW now. I don't think I'll
> even think of trying to bring the rest until after I get a new machine,
> or whatever. Meantime, I'll figure out how to organize the ones I have,
> so that when I do bring the rest in my tiddler list won't be so long.
> Thanks for your help yesterday and today.
> Sincerely,
> ------------------------------------------------------------------------
> Eric Weir
> Decatur, GA USA
> eew...@bellsouth.net
> Anyway, I've got my personal contacts in my TW now. I don't think I'll > even think of trying to bring the rest until after I get a new machine, > or whatever. Meantime, I'll figure out how to organize the ones I have,
> so that when I do bring the rest in my tiddler list won't be so long.
Not any more -- nor any of the plugins I installed today. I'm back to the basic MPTW.
Before I started working, I renamed my MPTW to MPTW1. I've been saving regularly. The saves I made this afternoon, e.g., in the process of installing plugins, after importing the text file and splitting it into separate tiddlers, etc. Made regular saves. Used "save changes," not the browser's "save as . . . . " command. After the saves this afternoon, all my changes were preserved.
Before shutting down for the evening, I made one more save. When I reopened the file to see how the save went, I had none of my work. Just the basic MPTW components. I made a test. Created a new tiddler, saved, and reloaded. The new tiddler was not there. Repeated it a couple more times. Changes are not being saved. What's going on? Where, between this afternoon and this evening, did my work go?
Fortunately, it's not a big loss. Other than the time spent splitting, I really hadn't done all that much work. But I don't want to do anymore till I find out what's going on, what happened, what do I need to do different, so I can avoid this in the future.
I'm going to bed. Probably won't be spending much time with TW till next weekend -- otherwise, if I start, I know me, it'll eat up my whole day, with the result I don't get any of my real work done.
So, help appreciated, but not urgent.
Regards, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
> I made a test. Created a new tiddler, saved, > and reloaded. The new tiddler was not there. Repeated it a couple more > times. Changes are not being saved.
E.g., if I click on either the "backup saved" or "main tiddlywiki saved" links in the little yellow box that appears in the upper right-hand corner of the window after doing "save changes," they open in new window, neither of which has the change reputedly just saved.
I checked the "tweak" that causes and empty document to be saved on "save changes." It was not checked.
More grist for the mill.
Regards, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
> Before I started working, I renamed my MPTW to MPTW1
...
> After the saves this afternoon, all my changes were preserved.
> Before shutting down for the evening, I made one more save. When I
> reopened the file to see how the save went, I had none of my work.
...
> Fortunately, it's not a big loss. Other than the time spent splitting
Not really sure what's happening there... still, there should be
backup files (the ones with the timestamps in their names), so at
least *some* of your previous work should be safely preserved.
Even so, when you DO get back to using [[SplitTiddler]] it will be
even faster than before! I just finished another round of
optimizations (and added a few new options as well)... It turns out
the some of the biggest overhead is the cost of display processing for
showing you all the new tiddlers. I was able to defer that handling
to the end of the main loop, so that the actual tiddler creation is
much, much faster: using a test case on my system, I was able to
create 95 new tiddlers in just 9.3 seconds (yes, that's right, 10
times faster than the original code!). On a really slow system
(such as yours), that would turn an hour of waiting into just 5 or 6
minutes! Yay!
> Would it also be possible to specify for the 'target tiddler title' -
> instead of the first line following the separator - only the fist word
> after the separator?
DONE! New options include:
* radio buttons to choose whether target titles use "first line of
each item" (default) or "first word of each item"
* checkbox for "confirm overwrites" (default is true) - especially
useful if target titles are "first word", which are more likely to
result in collisions with existing titles
* checkbox to "display target tiddlers when done" (default is false) -
saves LOTS of time
* target tiddler titles automatically replace brackets ("[" and "]")
and vertical bar ("|") with underscore ("_") to avoid creating titles
that couldn't be used in normal TW PrettyLink syntax (e.g. [[some text|
TiddlerTitle]] would have problems handling a tiddler named: "This
[is] a | title"
* confirmation before starting processing:
"Found NNN items in 'Tiddlername'. Press OK to proceed"
* Message reporting results:
"Created NNN target tiddlers using SSS seconds"
* trigger a call to 'store.notifyAll()' so page display will be
updated when done - ensures that sidebar tab contents show all newly
created titles.
> Not really sure what's happening there... still, there should be > backup files (the ones with the timestamps in their names), so at > least *some* of your previous work should be safely preserved.
This is what my backup file list from yesterday looks like -- all "empty." And MPTW1, the file in which I did all the work -- the work is not there. [Actually, I need to correct that: the plugins I installed are there; the imported contacts are not. Also, in the test last night, where I created a new tiddler, saved and reloaded -- the new tiddler was not there after reloading. I tried the same test on my plain TW, i.e., non-MP. Same thing happened. In *all* saves I used the "save changes" command on the right side of the TW window.]:
These filenames aren't anything like the backups created when I was playing around with the plain TW on Saturday. They had the time stamps. And there was no "empty."
As I say, more grist for the mill.
Regards, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
On Mon, Mar 10, 2008 at 8:57 PM, Eric Weir <eew...@bellsouth.net> wrote:
> This is what my backup file list from yesterday looks like -- all > "empty." And MPTW1, the file in which I did all the work -- the work is > not there. [Actually, I need to correct that: the plugins I installed > are there; the imported contacts are not. Also, in the test last night, > where I created a new tiddler, saved and reloaded -- the new tiddler was > not there after reloading. I tried the same test on my plain TW, i.e., > non-MP. Same thing happened. In *all* saves I used the "save changes" > command on the right side of the TW window.]:
> These filenames aren't anything like the backups created when I was > playing around with the plain TW on Saturday. They had the time stamps. > And there was no "empty."
These file names without the conventional timestamps indicate you have the "LessBackupsPlugin" installed. It is included in MPTW.
If you sort your files by date modified you ought to be able to see which is the most recent. From the above it looks like emptyMPTW.html is the main file you're working on. What is the modified date of that file? If your saves are working then it should be the most recent.
> These file names without the conventional timestamps indicate you have > the "LessBackupsPlugin" installed. It is included in MPTW.
> If you sort your files by date modified you ought to be able to see > which is the most recent. From the above it looks like emptyMPTW.html > is the main file you're working on. What is the modified date of that > file? If your saves are working then it should be the most recent.
Below is the complete list of saves yesterday, most recent at the bottom.:
I checked all of them. All without "empty" in the filename are identical. Some with "empty" in the name seem to be literally empty; their size is about 85KB. Some are identical to those without "empty" in the name; their size is about 380KB. All those without "empty" have the plugins I installed yesterday; none of them have the file I imported and split.
I've tested "save changes" again. The the documents, the main TW and the backup, are being saved. But the changes -- the new tiddler created before the save -- is not showing up. Presumably the "LessBackupsPlugin" isn't responsible for that. Any clue as to what is?
Also, for the time-being I think I'd like to disable the "LessBackupsPlugin." How do I do that? Or should I do that?
Thansk, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
This is weird. All my experimenting up to now has been done on my -- very slow -- Linux machine. I decided to see what would happen on my Windows machine. Copied the empty.html recently downloaded to the Linux machine to the Windows machine and ran my test. Changes still not being saved. I downloaded a fresh empty.html directly onto the Windows machine and ran the test. *Changes not being saved.*
*How can this be?*
Regards, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
> This is weird. All my experimenting up to now has been done on my -- > very slow -- Linux machine. I decided to see what would happen on my > Windows machine. Copied the empty.html recently downloaded to the Linux > machine to the Windows machine and ran my test. Changes still not being > saved. I downloaded a fresh empty.html directly onto the Windows machine > and ran the test. *Changes not being saved.*
Mystery solved. No mystery in the first place. When testing "save changes" I created new tiddlers, then saved and reloaded. When I saved the changes, the new tiddlers were open in the story area. When I reloaded, I assumed that because the new tiddlers were not in the story area they had not been saved. *In fact, they were being saved*, just not showing up in the story area, only in the tiddler list.
I assume there is a way to keep tiddlers in the story area on reloading after a save when you want?
After duplicating the testing as described above on my Windows machine, I spent some time on it surfing TW related websites. Came across some very interesting online TiddlyWikis, e.g., TiddlyWikiTips, QwikiWeb, TagglyWiki, a TiddlyWiki about linking TiddlyWiki to Thunderbird, etc., etc.
I was amazed at how much faster things happen on my Windows machine than the Linux machine. The main difference between the two machines, other than the operating system, is that the Windows machine's hard drive is about only one-quarter full, while the Linux machine's is practically full. [Gotta upgrade -- or buy a new.] machine.
I appreciate all your efforts to help me. I imagine there at the end you must have though I was either out of my gourd or yanking your chains.
Sincerely, ------------------------------------------------------------------------ Eric Weir Decatur, GA USA eew...@bellsouth.net
> Mystery solved. No mystery in the first place. When testing "save
> changes" I created new tiddlers, then saved and reloaded. When I saved
> the changes, the new tiddlers were open in the story area. When I
> reloaded, I assumed that because the new tiddlers were not in the story
> area they had not been saved. *In fact, they were being saved*, just not
> showing up in the story area, only in the tiddler list.
> I assume there is a way to keep tiddlers in the story area on reloading
> after a save when you want?