Raw format

Hi Folks,

Trying to generate Raw format from my simplenote export. Found the post at Importing markdown file from command line

which suggests the following format for metadata:

id: 1e23028857cb46c082ce6628d4053854
parent_id: 8f4b9330b96240f28ef918c263074dfe
created_time: 2017-12-07T21:24:05.509Z
updated_time: 2017-12-07T21:24:05.624Z
is_conflict: 0
latitude: 48.73219094
longitude: -3.45966339
altitude: 0.0000
author: 
source_url: 
is_todo: 1
todo_due: 0
todo_completed: 0
source: joplin
source_application: net.cozic.joplin
application_data: 
order: 0
user_created_time: 2017-12-07T21:24:05.509Z
user_updated_time: 2017-12-07T21:24:05.624Z
encryption_cipher_text: 
encryption_applied: 0
type_: 1

I’d love to know which of these are optional. I’m also getting an error when trying to import: Missing required property: type_: Test. Has the format of that changed at all since that post?

AFAIK there must not be a line feed at EOF. Yep, don’t ask me why. Everybody who thinks a file without a proper ending is still a valid file should be locked up and never design SW. I don’t even want to start with the good ol’ POSIX standard.
(Laurent, please don’t take my statement personally. It probably happened as a result of how JS handles files.)

@laurent Maybe we can improve this. It should accept a proper file for import. I find it rather weird that one has to deliberately create a broken file to be able to import.

I’d love to know which of these are optional

Almost all properties are optional I think, except for type_. Maybe just try starting from a valid file and removing the properties one by one and see if it still imports.

The raw format is specific to the app and not meant to be user editable, so there’s definitely no plan to make the format more user friendly.

If anything I’d rather make it less user friendly to make it clear it shouldn’t be edited with a text editor, especially editors that auto-format everything as seems to be common these days.

If the API is not enough and you really have to generate these files, the best is to write a script that does it properly for you.

1 Like

In that case it should be a binary format and not a text file. But if it had to be a text file, something like json would be more appropriate. Maybe BSON?

Hi again,

Thanks for the speedy response. I’ve switched over to using the API instead of duplicating the raw format, seems pretty good!

I’m most of the way to a basic Simplenote import, although I’ll probably be too lazy to figure out tagging. :-p

2 Likes

Don't worry, tagging with the API is easy. (Don't know about the Simplenote part, though.)

Do you intend to release your resulting scripts in case someone else coming from Simplenote needs them? :slight_smile:

Yeah, definitely going to put it up, even if just on a post here.

My motivation to add tagging is low, partly because I didn't use them consistently in simplenote. :wink:

2 Likes

Did you finish your script? I'm about to import all my Simplenote notes into Joplin