Is there an import function or guide?

Asked by BriC on 2011-07-11

I was trying to convert from other diary software and manually attempted to convert some files

(adding in the day, followed by a {text: content-here
sometimes multiple lines of content}
)

But I didn't have any luck. Various problems. Is there an easier way? A guide? Suggestions on making it work?

Question information

Language:
English Edit question
Status:
Answered
For:
RedNotebook Edit question
Assignee:
No assignee Edit question
Last query:
2011-07-11
Last reply:
2014-01-23
BriC (bchabun) said : #1

That pseudo-example I gave was from memory ... so I may have messed up the syntax.

I have a bunch of text files (one per day) which I ran through a batch file to concatenate and so that they were named properly (yyyy-mm.txt)

But it didn't seem to work. They didn't show up in RedNoteBook and after viewing an empty month and exiting the program the autosave overwrote the file with {}.

I mainly wondered if there were tips, guides, information or automation anywhere that would help me.

Jendrik Seipp (jendrikseipp) said : #2

At the moment there is no such guide, but RedNotebook will get an import functionality in the near future.

BriC (bchabun) said : #3

Great news. The files I had to work with (from export) could be formatted to a separate text file for each day's entry (e.g., 20110701.txt 20110702.txt etc) or could be put all in one file with the date inserted to separate the days. If that helps in your import thinking.

biffster (biffster) said : #4

Hello! It's been a couple of years since this question was asked, and I still don't see a way to import text files. Is there a way to internally? Is there a guide on the file format, so I could write my own filter? I have a couple thousand files (literally) that I would like to import.

Jendrik Seipp (jendrikseipp) said : #5

Some time ago I started writing an import assistant. It has never been
officially included in RedNotebook though. If you want you can enable it
in gui/menu.py and see if the code in gui/imports.py still works. There
is a mode for importing plain text files, but it may need some tweaking:
either change the import code or your files. Another option is to
generate the yaml files yourself. You find information about their
structure in the included help (Ctrl+H), but the format should be
self-explanatory if you look at some existing yaml month files
(2014-01.txt) in your data folder ($HOME/.rednotebook/data).

biffster (biffster) said : #6

Thank you!

Can you help with this problem?

Provide an answer of your own, or ask BriC for more information if necessary.

To post a message you must log in.