Notebooks for iPhone Answers

Can I get a text file to split into separate notes when I import it?

mikefedeski, May 03, 2011 10:24

I have some material in a text file on my laptop that I would like to transfer into Notebooks notes. I know how to make the transfer, but is there a way that I can get it to break up more or less automatically into several smaller notes in the same book? I am imagining that there is some code that I can put into the text file to make the breaks on import.

I have only just found this discussion site (the logo was unexpectedly large and therefore invisible!). I sent the same question by e-mail, but thought it would be more helpful to put it here.

Keep up the good work.

Alfons Schmid, May 03, 2011 11:27

Hi Mike,

you might try the option "Convert to Task List" from the note's action menu. This will create a new book (a task list, in fact) and give you the option to split the note by line or by paragraph. You could then change the task list back to a book and this is it.

Maybe this is what you are looking for?

Best,
Alfons

mikefedeski, May 04, 2011 16:32

Alfons

Thanks - maybe. The notes that I want to transfer contain several paragraphs, so I would have to do some substitution of symbols for paragraph breaks and back before and after. I can see that it would work, but as it isn't going to be straightforward, I am looking at another method.

Earlier today I transferred over 700 Palm memos to Notebooks following your recommended routine. It was fast and 100% successful in creating notes in the correct book categories. I have to say I was surprised and delighted as I am used to things being more difficult (it has taken a whole week to transfer my Palm databases to an iPhone database app). The structure of the text file from Palm Memos is fairly easy to mimic: "Text of note" "0" "BookName". I've made a trial hijack of this transfer procedure for a small text file, and it works so far - I can now break a text file into separate notes AND put them in different books.

But I have a couple of questions. Firstly, do you have any idea what the "0" is doing, and what would happen if I put in different numbers? Secondly, are there any characters to avoid in the body of the note text other than quotation marks (pipes, maybe)? I had problems transporting special characters from Memos to Notebooks, even using Unicode UTF-8 (which was necessary in my case to make any transfer at all). This was not because of your conversion algorithm. The characters were changed when Palm Desktop made the text file; even common characters like the dash and the apostrophe were sometimes changed - and unfortunately not consistently. By taking some time putting them right again in the text file, they transferred to Notebooks OK. Except for quotation marks, of course, which in many cases turn out doubled in Notebooks. So a third question would be, is there any chance of a routine for turning doubled quotes ("") to ordinary quotes (") in the (otherwise excellent) transfer to Notebooks?

Mike

mikefedeski, May 04, 2011 17:00

What I have not explained is that I have my sights on the rather more daunting task of transferring Shadow Plan files from my Palm to Notebooks. Do you know about Shadow Plan? It served a similar function to Notebooks on the Palm platform - its developer (Jeff Mitchell of CodeJedi) has been pondering for several years the possibility of moving to other platforms, but I don't think he will now. It's a pity because he has a very loyal following. Shadow was the reason that I hung on to my Palm for so long.

Before I can work out a way of transforming them into Notebooks files, I still have to look more closely at the files that Shadow produces on export. It will export to Palm Memos in tab delimited format, but the difficulty will lie in unravelling the hierarchy - Shadow has an outliner structure. I don't suppose you have met this one before?

Mike

Alfons Schmid, May 05, 2011 16:24

Hi again,

using the .palm format for importing multiple notes is a great idea, funny we never thought of that ourselves :-)

You are correct, when you export the Palm memos on a PC, each entry has the format
"Memo""0""Category"

The format is different when you export from a Mac, but for the purpose of creating a file with your own notes, the PC format probably is simpler.

The "0" indicates that the memo/note is not protected; using anything else but "0" will tell Notebooks to protect the note.

The TAB character, when used in the text of the memo, may cause issues, as it is used to separate the fields. What might be a bit more complex are the newlines/returns. On a PC, each entry is delimited by CRLF (the Windows notation for a newline), so the memo itself should not contain any of them. However, it may contain the Unix or Mac notation of a return (CR) without disturbing the algorithm.

Regarding the double quotes, I have no explanation what causes them. As you see in the format above, each field needs to be delimited by quotes, but they are stripped during import...

Shadow Plan sounds very interesting, but I have not heard of it before. Well, maybe we will find a way to extract and import these infos into Notebooks as well ;-)
(We are currently working on a way to import Palm Todos into Notebooks, too)

Best,
Alfons

mikefedeski, May 06, 2011 20:29

Thanks Alfons

That's helpful. You never thought of it yourselves, indeed! You invented it.

For the record, I am working with a Mac. But I have recently changed to it from a PC, so my Palm desktop programs are all on that. When I transferred the Palm Memos, I created the export text file on the PC, then ported it across to the Mac and did the transfer to Notebooks from there. I figured that the difference between the PC/Mac procedures that you describe arose in the first part rather than the second, and that seems to be true comparing the file that I have got with your description - it's a "PC" file.

The double quotes are created by Palm Desktop, I think, when it makes the export file, so that they do not break up the memos when they appear in whatever programme the export was intended for.

I have now tried carriage returns, line feeds (shift carriage return) and a tab in a small trial fake .palm transfer, and the line feed and tab did cause problems - stuff disappeared. I don't think it is possible to enter either of these from the Palm Treo keypad, so I should be fairly safe.

Thanks for a great program, by the way, and for looking after it and your users so well.