Giter VIP home page Giter VIP logo

apple-to-standard-notes-exporter's Introduction

Apple Notes to Standard Notes Exporter

Purpose

After recently switching from iOS to Android, I found that my Apple notes (of which I had many thousands, accrued over several years) were not easily exported to any equivalent platform on Android. Further to that, I found that most popular note applications on Android similarly prevent import/export.

One exception is the Standard Notes application and service, which provides client-side encryption for all notes, and free cloud syncing, with clients on iOS, Android, macOS, Windows and Linux. For that reason, I wrote this simple script to extract notes from the macOS Notes app database and convert them into the Standard Notes format.

Functionality

This script will find all notes in all accounts, and generate a valid Standard Notes 'export' (which can be imported through the Standard Notes desktop app), preserving creation date, edit date, title and basic formatting. As Standard Notes doesn't support rich text/HTML rendering by default, the HTML structures used by Apple Notes for lists, titles, etc. will be converted into valid Markdown during export.

Usage

python3 apple_notes_to_sn.py <path_to_notes_db_file> will write out the Standard Notes export to Standard_Notes-apple_notes_export.txt.

apple-to-standard-notes-exporter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

cobrienin arbal

apple-to-standard-notes-exporter's Issues

Feature request: Support exporting iOS Notes

Can you please add functionality to export iOS Notes as well? (This would obviously be for jailbroken iPhones.)

Here is the schema for the notes.sqlite file:

CREATE TABLE ZNEXTID ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCOUNTER INTEGER );

CREATE TABLE ZNOTE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCONTAINSCJK INTEGER, ZCONTENTTYPE INTEGER, ZDELETEDFLAG INTEGER, ZEXTERNALFLAGS INTEGER, ZEXTERNALSEQUENCENUMBER INTEGER, ZEXTERNALSERVERINTID INTEGER, ZINTEGERID INTEGER, ZISBOOKKEEPINGENTRY INTEGER, ZBODY INTEGER, ZSTORE INTEGER, ZCREATIONDATE TIMESTAMP, ZMODIFICATIONDATE TIMESTAMP, ZAUTHOR VARCHAR, ZGUID VARCHAR, ZSERVERID VARCHAR, ZSUMMARY VARCHAR, ZTITLE VARCHAR );

CREATE INDEX ZNOTE_ZINTEGERID_INDEX ON ZNOTE (ZINTEGERID);

CREATE INDEX ZNOTE_ZBODY_INDEX ON ZNOTE (ZBODY);

CREATE INDEX ZNOTE_ZSTORE_INDEX ON ZNOTE (ZSTORE);

CREATE TABLE ZNOTEATTACHMENT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZNOTE INTEGER, ZCONTENTID VARCHAR, ZFILENAME VARCHAR, ZMIMETYPE VARCHAR );

CREATE INDEX ZNOTEATTACHMENT_ZNOTE_INDEX ON ZNOTEATTACHMENT (ZNOTE);

CREATE TABLE ZNOTEBODY ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZOWNER INTEGER, ZCONTENT VARCHAR, ZEXTERNALCONTENTREF VARCHAR, ZEXTERNALREPRESENTATION BLOB );

CREATE INDEX ZNOTEBODY_ZOWNER_INDEX ON ZNOTEBODY (ZOWNER);

CREATE TABLE ZNOTECHANGE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZCHANGETYPE INTEGER, ZSTORE INTEGER, ZNOTEINTEGERIDS BLOB, ZNOTESERVERIDS BLOB, ZNOTESERVERINTIDS BLOB );

CREATE INDEX ZNOTECHANGE_ZSTORE_INDEX ON ZNOTECHANGE (ZSTORE);

CREATE TABLE ZPROPERTY ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZPROPERTYKEY VARCHAR, ZPROPERTYVALUE BLOB );

CREATE TABLE ZSTORE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZACCOUNT INTEGER, ZEXTERNALIDENTIFIER VARCHAR, ZNAME VARCHAR, ZSYNCANCHOR VARCHAR );

CREATE INDEX ZSTORE_ZACCOUNT_INDEX ON ZSTORE (ZACCOUNT);

CREATE TABLE Z_PRIMARYKEY (Z_ENT INTEGER PRIMARY KEY, Z_NAME VARCHAR, Z_SUPER INTEGER, Z_MAX INTEGER);

CREATE TABLE Z_METADATA (Z_VERSION INTEGER PRIMARY KEY, Z_UUID VARCHAR(255), Z_PLIST BLOB);

CREATE TABLE Z_MODELCACHE (Z_CONTENT BLOB);

CREATE TABLE ZACCOUNT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZDIDCHOOSETOMIGRATE INTEGER, ZTYPE INTEGER, ZDEFAULTSTORE INTEGER, ZACCOUNTIDENTIFIER VARCHAR, ZCONSTRAINTSPATH VARCHAR, ZNAME VARCHAR );

CREATE INDEX ZACCOUNT_ZDEFAULTSTORE_INDEX ON ZACCOUNT (ZDEFAULTSTORE);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.