The Samsung Memo app is pretty unfriendly, when it come to data backups. With some effort it is possible to generate .memo files out of each note. These files are zip files containing an XML document and, optionally, some attachments (especially bitmaps).
Feel free to use the provided code (link) to convert Memo backup to Quillnote file, that can be easily imported. Why Quillnote? It's open source, free, supports markdown formatting and... it's simple! The code is shared on MIT License, which simplified means: do what you want, but I'm not liable for any damages.
Look for the 'caution' comments inside of the python file and adjust the referenced sections if needed. The thing is: Samsung file format has some bugs in its design. The unicode characters are improperly encoded (UTF-16 mixed with UTF-8) and some HTML entities are improperly escaped. There is a simple approach for that provided, although far from being perfect.
<?xml version="1.0" encoding="UTF-8"?>
<memo Version="1.0">
<header>
<!-- title can be an empty string -->
<meta title="..."/>
<!-- favourite can be true or false -->
<meta favourite="..."/>
<!-- UUID has a form of [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} -->
<meta uuid="..."/>
<!-- created time is a Unix timestamp as integer with seconds precision -->
<meta createdTime="..."/>
</header>
<!-- the contents tag can be empty -->
<contents>
<!-- content is an html-formatted text with html-escaped characters to be neutral for the XML structure -->
<content>...</content>
<!-- xml_content seems to be identical in its meaning to the content, but giving some functional structure like a todo-list
it is an xml-formatted text with html-escaped characters to be neutral for the XML structure -->
<xml_content>...</xml_content>
</contents>
</memo>
Pictures (probably also other attachments) are located in the media
subdirectory of the zip (memo) file, not having any file extensions.
The target conversion file is also a zip-file, containing a single backup.json
file with all textual content and an optional media
subdirectory, containing attachments.
{
"version": 8,
"notes": [
{
"title": "...",
"content":"...",
"creationDate": ...,
"modifiedDate": ...,
"attachments": [
{
"description": "...",
"fileName": "..."
}
],
"id": ...
},
]}
where creationDate
and modifiedDate
are Unix timestamps as integers with second precision; attachments
sections appears only for notes having actual files; fileName
is the name of the file in the media
subdirectory without the media/
prefix; id
seems to be a unique notes identifier, however it does not collide with existing notes in the app (no guarantee).
There are two configuration options that you really should verify before using the code:
mypath
pointing to the directory, where individual .memo files are to be found (default .)output_filename
defining the location and the filename of the resulting Quillnote file (default quillnote_TIMESTAMP.zip)Next: Upload to S3 bucket from bash