{"id":13771128,"url":"https://github.com/bgribble/remarkable_simplenote","last_synced_at":"2025-05-11T03:33:04.583Z","repository":{"id":151268691,"uuid":"343221276","full_name":"bgribble/remarkable_simplenote","owner":"bgribble","description":"Sync tool to connect reMarkable tablet to Simplenote","archived":false,"fork":false,"pushed_at":"2021-03-06T22:23:29.000Z","size":20,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-17T06:40:35.831Z","etag":null,"topics":["remarkable-tablet","simplenote"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bgribble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-02-28T21:42:14.000Z","updated_at":"2024-09-22T20:00:35.000Z","dependencies_parsed_at":"2024-01-06T21:58:10.338Z","dependency_job_id":null,"html_url":"https://github.com/bgribble/remarkable_simplenote","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgribble%2Fremarkable_simplenote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgribble%2Fremarkable_simplenote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgribble%2Fremarkable_simplenote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgribble%2Fremarkable_simplenote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgribble","download_url":"https://codeload.github.com/bgribble/remarkable_simplenote/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514352,"owners_count":21920327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["remarkable-tablet","simplenote"],"created_at":"2024-08-03T17:00:48.010Z","updated_at":"2025-05-11T03:33:04.306Z","avatar_url":"https://github.com/bgribble.png","language":"Python","funding_links":[],"categories":["Cloud Tools"],"sub_categories":["Launchers"],"readme":"## remarkable-simplenote\n\nSimple tool for syncing a Simplenote account with a reMarkable\ncloud account.\n\nThere is no perfect mapping between reMarkable notebooks and\nSimplenote notes, so there's some built-in opinions about how\nthe sync works.\n\n## Status\n\nThe \"Basic\" case below works; that is, pull from simplenote and sync to \nreMarkable. I'm going to start on some of the offline OCR workflows next,\nbut at least now I get PDF versions of all my Simplenote notes on the \nreMarkable \\o/\n\n### Key tools\n\n* Simplenote API: the `simplenote` Python package\n* reMarkable API: the `rMapy` Python package\n* text/markdown to PDF: `pandoc` document converter\n* PDF to text (OCR): Tesseract, a Google OCR engine\n\n### Sync model\n\nLet's start with a few facts:\n\n* Simplenote works in the \"text domain\". Simplenote items are\nultimately just formatted, annotated text.\n* reMarkable works in the \"document domain\". Most of the content\non a reMarkable is unsearchable images of handwritten text and\nPDFs imported from elsewhere.\n\nSo to sync these means that we have to transform Simplenote text\nto files that can be rendered on the reMarkable, and do what we\ncan to extract text from reMarkable notebooks to put them into\nSimplenote notes. Tracking changes on both ends will be tricky.\n\n#### Out of scope\n\nThere are some sync pathways that are out of scope:\n\n* Update reMarkable notebooks based on changes in Simplenote\n  text. This would mean some crazy business like creating new\n  notebook content with the typewritten text replacing the\n  original handwritten text or something. Not going there.\n\n* In fact, updating reMarkable notebooks in place at all. I don't\n  want to take a chance of messing up notebook contents.\n\n* Not totally off the table but very unlikely: Updating\n  Simplenote text based on handwritten annotations on the PDF\n  done on reMarkable.\n\n#### Basic: Simplenote to reMarkable, one-way\n\nPush all Simplenote notes, rendered into PDFs, into the right\nfolder on reMarkable.\n\n\"The right folder\" is complicated, given that there are no folders\nin SimpleNote. For my use case, it's important that my notes get\nput into the right folder but the rules are pretty complicated; I\nuse a numeric filing system wherein the path can be inferred from\nthe title of the note but it's not an exact match. For example,\nthe title might be \"101.12.02 Quarterly TPS Targets\", which could\ngo into the folder \"101 Important project/12 Planning/02 Q4 2020/\" as a\nfile called \"101.12.02 Quarterly TPS Targets.pdf\".\n\nI don't want to impose this on anybody else so I have some config to\ncontrol this. Since the above is the only folder strategy I am using,\nI am only doing one other strategy, which is \"all notes into the same\nfolder\". If anyone else ever uses this tool I am happy to discuss other\nfolder strategies based on Simplenote tags or whatever.\n\nThe `folder_strategy` config var can either be `\"jd_title\"` for my special\nJohnny Decimal title strategy, or `\"bucket\"` for all notes in one bucket. If you\nchoose `\"bucket\"`, `folder_bucket` should contain the visible name of the\nreMarkable folder.\n\n\n#### Improvement: reMarkable to Simplenote, one-way\n\nGrab notebooks from a specified folder on the reMarkable. Run\nthem through an OCR process to extract text from the handwritten\nnotes. Push the OCRed text into notes on Simplenote with an\nappropriate tag.\n\nNote that if we do both of these first 2 steps, we end up with a\nseparate OCRed version of reMarkable notebook contents on the\ndevice in a separate PDF.\n\nThis still isn't really a sync, since (for example) new\nannotations on Simplenote notes done on the reMarkable, or\nchanges to the OCR'ed text of notes in Simplenote that were\noriginally from the reMarkable, will not be reflected back in\ntheir source documents. In fact such changes will be discarded on\nthe next pull-push if the source doc ever changes.\n\n#### Improvement: Support OCR corrections from Simplenote\n\nIf we hand-edit the notes synced from reMarkable to Simplenote,\nit may be possible to preserve those changes for the future.\nThese are probably valuable changes to preserve since they are\nlikely to be OCR fixes.\n\nAny way around this assumes that changes to the reMarkable\nsource notebook will end up being OCRed the same way under basic\nediting operations.\n\n* When edits are made to the Simplenote note, record diff output\n  between the original OCR text and the edited text. This can be\n  done on the fly if we store a version history.\n\n* If subsequent changes are made to the reMarkable source doc,\n  apply the previous diff after doing OCR on the new version.\n  Heuristic the crap out of it to try to DTRT on chunks that\n  don't apply.\n\n#### Improvement: Support handwritten edits to Simplenote notes\n\nI don't know how overlays to PDF docs created in the reMarkable\nare represented. Almost definitely we couldn't support editing in\nthe body of a PDF by like strikethroughs or other kinds of\nediting annotations.  But we could possibly support append-only\nedits if the handwritten text can be OCRed separately from the\nPDF content.\n\n### Sync pathways\n\n#### Simplenote --\u003e reMarkable\n\nThis is the most straightforward path. The Simplenote API allows\nus to download the whole account's worth of data and keep it in\nsync with our local document store.\n\nWe can then render each note into a PDF file using pandoc and\nsync it up to the reMarkable cloud via the reMarkable API.\n\n#### reMarkable --\u003e Simplenote\n\nThe `rmapy` API allows us to download metadata and content of\nreMarkable notebooks (and PDFs and ePubs). Eventually we might be able to\nOCR this content and push to Simplenote notes, who knows!\n\n### Installation\n\nFrom a the top level of the source tree,\n\n```\npip install .\n```\n\nThis will install needed Python dependencies, but you will also\nneed to install a few non-Python tools for processing documents:\n\n* `pandoc` (converting markdown to PDF)\n* a PDF engine for `pandoc`, I use `wkhtmltopdf`\n* `exiftool`, a file metadata reader/writer\n\nYou will need a local directory to store config and sync cache;\nit will be created automatically on first run, and defaults to\n`~/.remarkable_simplenote/`. If you choose another local\ndirectory, pass `--path=\u003cdir\u003e` on the command line.\n\n\n### Configuration\n\nConfiguration is pulled from a Python \"conffile\" formatted file\ncalled `config` in the local cache directory, so by default\n`~/.remarkable_simplenote/config`.\n\nHere's mine:\n\n```\n[default]\nsimplenote_user= \u003cusername\u003e\nsimplenote_pass= \u003cpassword\u003e\nfolder_strategy=jd_title\nfolder_match=start\nfolder_bucket=Notes\npdf_engine=wkhtmltopdf\npdf_engine_opts=-T 0mm -B 0mm -L 10mm -R 0mm --user-style-sheet /home/grib/.remarkable_simplenote/wkhtmltopdf.css\n```\n\nIf using `wkhtmltopdf` as the PDF engine, you probably want to\ncreate a CSS file to style the notes more nicely. Here's the\nbasic one that I use:\n\n```\nbody,p,li {\n  font-family: Arial, sans-serif;\n  font-size: 16px;\n}\n```\n\n### Invocation\n```\nusage: remarkable_simplenote [-h] [--pull [{remarkable,simplenote} ...]]\n                             [--push [{remarkable,simplenote} ...]]\n                             [--path PATH] [--force-pull] [--force-sync]\n                             [--force-push]\n\nSync reMarkable and Simplenote\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --pull [{remarkable,simplenote} ...]\n                        Pull content from the specified source(s)\n  --push [{remarkable,simplenote} ...]\n                        Push content to the specified destination(s)\n  --path PATH           Local config/cache folder\n  --force-pull          Pull remote content even if unneeded\n  --force-sync          Convert pull to push even if unneeded\n  --force-push          Push data to remote even if unneeded\n```\n\nFirst data is pull-synced to the local store from the named\nremote sources (\"pull\"), then the pulled data is format-converted\nand processed into the push queue (\"sync\"), then the push queue\nis push-synced to the named sources (\"push\").\n\nIf the `--force-THING` option is not passed, we try to do the\nminimum amount of work possible by looking at object version\nnumbers.\n\nYou can do this process either in a single pass, as in\n```\nremarkable_simplenote --pull simplenote --push remarkable\n```\nor in separate pull and push steps.\n\n\"sync\" happens automatically after \"pull\", so it's not necessary to\nmention it on the command line unless you want to force it, such\nas if you need to change your wkhtmltopdf stylesheet and want to\nrebuild all the pdfs. In that case you can just run the sync by\nitself:\n\n```\nremarkable_simplenote --force-sync\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgribble%2Fremarkable_simplenote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgribble%2Fremarkable_simplenote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgribble%2Fremarkable_simplenote/lists"}