I’m trying to learn how to use Joplin 1.0.170 on macOS 10.11.6. I’d like to import notes from an old note-taking program called “SOHO Notes,” which can export notes either as Rich Text or Plain Text formats. I was wondering how I can import these formats into Joplin. Thank you very much.
You could export them as text, then import them into Joplin.
For anything more advanced, like importing rich text, you’d have to use pandoc first.
Thank you Laurent for your help. I’ll try out this pandoc program to convert rich text tiles to a format Joplin can import.
I installed Pandoc, tried it out, and unfortunately found out that it can’t convert rich text (.rtfd) to markdown. Could I have further help regarding this process, or if that isn’t possible, is the only to convert my notes for Joplin from plain text to markdown? I apologize that I’m new to these text format conversions. Thank you very much.
A quick google search brings up this result which looks promising. I’m not familiar with macos commands, but you could probably tweak the answer to convert files (rather than stdin).
Thank you very much for looking this up. I’ve already seen that page, but I appreciate the suggestion. Some of the comments were not very encouraging, so I haven’t tried the two methods in the Stack Overflow thread. I’m also very code-averse (I can barely use MATLAB), which is why I never attempted these methods. Nevertheless, perhaps I should be more brave and try them out.
I see, I wish I could be more help but I don’t have the experience necessary. Good luck I hope you find a decent solution.
One thought actually, you might be able to import your notes into notelife using the free trial, and then export them into a more reasonable format from there. Could be worth a try.
Thank you very much CalebJohn for taking the time and effort to help out strangers. I’ve just upgraded from macOS 10.11 to 10.12 so that I could install Notelife. However, I was unsuccessful in migrating my database from SOHO Notes to Notelife. Notelife also seems to export notes only in rich-text format, so I’m back to square one, where I need to figure out how to easily convert rich text to markdown. I plan to slowly learn some Terminal commands to hopefully batch convert files using Pandoc and other means.
So with all the help received so far, I’ve been trying to import plain-text notes into Joplin (as markdown files), but some of my notes look garbled (screenshot attached). However, if I copy and paste plain text into a new Joplin note, the text looks fine (screenshot attached). I would like to avoid copying and pasting each plain-text note. Could someone tell me whether there’s a way to correctly batch import plain-text notes into Joplin please? Thank you very much.
Hmm, the first screenshot shows 2 characters right at the beginning. What format are those text files? Is it possible that they are maybe UTF16 with a BOM?
What do they look like when you do a
cat <filename.txt> on the command line or when you open them with a text editor?
Can you share one of those files by attaching it here?
Thank you for your help and help to be received. I have uploaded the (supposed) plain-text file in question.
When I typed:
cat “Best Novels of the 20th Century.txt”
in Terminal (macOS), the following was output:
??This list was prepared by the editorial board of the Modern Library, a division of Random House. The board consists of: Daniel J. Boorstin, A.S. Byatt, Christopher Cerf, Shelby Foote, Vartan Gregorian, Edmund Morris, John Richardson, Arthur Schlesinger Jr., William Styron and Gore Vidal. Where possible, a New York Times book review web link is provided.
99. “Main Street,” Sinclair Lewis
100. “Midnight’s Children,” Salman Rushdie
The two questions marks show up in both the imported plain-text document and in Terminal.
Best Novels of the 20th Century.txt (27.3 KB)
Yeah, this file is not a text file. How did you create it?
@i-like-macs please try this file:
new.txt (13.7 KB)
Thank you for the additional help.
The text file was created in SOHO Notes on the Mac, which lets you export notes in either rich-text (i.e., RTF or RTFD) or plain-text format.
I tried your text file, and Joplin imported it without any problems! Was there some kind of conversion applied to it, and if so, could you please tell me how you did this?
Yep, I ran it through iconv:
iconv -f utf-16 -t utf-8 old.txt >new.txt
Thank you very much! Your line of commands worked in Terminal for me too. I’m sorry if I sound presumptuous, but if it’s not much work, could you please tell me if the “iconv” command can be used to batch convert files? If you can direct me to a page with information, that would be fine too. Thank you again.
I guess these things can’t be done using the Automator app in Macs…
Put all of your text files in a directory. Then run the following 2 commands in a terminal in that directory:
for i in *; do iconv -f utf-16 -t utf-8 "$i" >out/"$i"; done
Oh wow! I can’t make heads or tails out of the code, but can confirm that it mostly works! A few of my notes have been converted to random Chinese (?) text, but I guess I can always manually cut and paste text from SOHO Notes to Joplin. I sincerely thank you tessus, as I can finally start using Joplin!
It’s just a loop that runs the command for every single text file. That’s all.
Hmm, I’m really not sure what this SOHO notes app does, but the file you sent looked like a UTF-16 file with BOM, although it was not even a real text file. At least the mime header was off and classified the file as data and not text.
The iconv command I used just converted the utf-16 to utf-8.
The Chinese characters are a side effect of wrong endianess conversion. UTF-16 has an endianess: Little or Big Endian format. UTF-8 does not. So, if the file is UTF-16LE but you convert from UTF-16BE to UTF-8, the characters look like Chinese characters, because the byte swapping shifted the characters to a higher unicode table, which happens to be one that holds Chinese characters.
You could try to use
-f utf-16le instead of
-f utf-16, but I can’t promise that it will help. I suspect that the SOHO export is a bit wonky.