Skip to main content

Mount your Standard Notes as a filesystem.

Project description

standardnotes-fs

Description

Mount your Standard Notes account as a filesystem and edit your notes as plain text files.

This allows you to edit your notes in your favorite text editor, use standard *nix programs and Bash scripts to manipulate them, or back them up with rsync.

This is an unofficial Standard Notes client.

Example

$ snfs ~/notes
Please enter your Standard Notes username: tanner@example.com
Please enter your password (hidden): 

$ tree ~/notes
/home/tanner/notes
├── Accounts.txt
├── Books.txt
├── Checklists.txt
├── Invention Ideas.txt
├── News Notes.txt
├── Shopping.txt
├── standardnotes-fs.txt
├── Todo.txt
└── Wifi.txt
0 directories, 31 files

$ cat ~/notes/Todo.txt
V Get groceries
V Laundry
X Replace kitchen light
O Write standardnotes-fs readme
O Release standardnotes-fs

$ vim ~/notes/Shopping.txt

$ rsync -Wa ~/notes/ ~/notes_backup/

When finished

Unmount the directory:

$ fusermount -u ~/notes

Logout to switch accounts (optional):

$ snfs --logout

Usage

usage: snfs [-h] [--username USERNAME] [--password PASSWORD] [-v]
            [--foreground] [--sync-sec SYNC_SEC] [--sync-url SYNC_URL]
            [--no-config-file] [--config CONFIG] [--logout]
            [mountpoint]

positional arguments:
  mountpoint           local mountpoint folder

optional arguments:
  -h, --help           show this help message and exit
  --username USERNAME  Standard Notes username to log in with
  --password PASSWORD  Standard Notes password to log in with
                       NOTE: It is NOT recommended to use this option!
                             The password may be stored in history, so
                             use the password prompt instead.
  -v, --verbosity      output verbosity -v or -vv (implies --foreground)
  --foreground         run standardnotes-fs in the foreground
  --sync-sec SYNC_SEC  how many seconds between each sync. Default: 30
  --sync-url SYNC_URL  URL of Standard File sync server. Defaults to:
                       https://sync.standardnotes.org
  --no-config-file     don't load or create a config file
  --config CONFIG      specify a config file location. Defaults to:
                       /home/tanner/.config/standardnotes-fs/standardnotes-fs.conf
  --logout             delete login credentials saved in config and quit

Installation

For Debian/Ubuntu based systems

Install dependencies:

$ sudo apt-get install fuse python3 python3-pip

With Sudo

Install standardnotes-fs and login:

$ sudo pip install standardnotes-fs
$ snfs ~/notes
Please enter your Standard Notes username: tanner@example.com
Please enter your password (hidden): 

Without Sudo

Install standardnotes-fs and login:

$ pip install --user standardnotes-fs
$ python -m snfs ~/notes
Please enter your Standard Notes username: tanner@example.com
Please enter your password (hidden): 

Note: if you don't want to use the python -m prefix, you'll need to add python's local bin directory to your $PATH.

For OS X systems

Install dependencies: https://osxfuse.github.io/

$ brew install python3

Install standardnotes-fs and login:

$ pip install standardnotes-fs
$ snfs ~/notes
Please enter your Standard Notes username: tanner@example.com
Please enter your password (hidden): 

Notes

  • Important: standardnotes-fs has not been tested vigorously yet. Before you use it, please make a backup of your notes by selecting Account > Download Data Archive in the official Standard Notes client.
  • Your account password is not stored and the Python variable is deleted after your encryption keys are generated with it.
  • Your account's encryption keys are stored in a config file on disk. This can be disabled with --no-config-file.
  • By default the client syncs with the Standard Notes server every 30 seconds and after any note modifications are saved.
  • If connection to the server is lost, it will keep trying to sync periodically.
  • Filesystem functions currently supported: getattr, readdir, read, truncate, write, create, unlink, utimens, and rename.
  • Creating hidden files (names beginning with a period) is disabled to prevent junk file creation.
  • Notes with identical names are deduplicated by adding a number to the end.
  • On the filesystem, notes will have the '.txt' extension appended to their name

License

This program is free and open-source software licensed under the GNU GPLv3. Please see the LICENSE file for details.

That means you have the right to study, change, and distribute the software and source code to anyone and for any purpose as long as you grant the same rights when distributing it. You deserve these rights. Please take advantage of them because I like pull requests and would love to see this code put to use.

Acknowledgements

Thanks to all the devs behind Standard Notes, Udia, Python, libfuse and FUSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

standardnotes-fs-0.0.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

standardnotes_fs-0.0.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file standardnotes-fs-0.0.2.tar.gz.

File metadata

File hashes

Hashes for standardnotes-fs-0.0.2.tar.gz
Algorithm Hash digest
SHA256 dd4a5324f984d45e9f8c737d4db11c2fcb54b6f5634375a77ceb75f94e196a5d
MD5 a02771bb909d35a1162451f2300b8a13
BLAKE2b-256 1af75c38f76c21b673476985465b7acd901300b1a3ba38f04ea9f955c3344103

See more details on using hashes here.

File details

Details for the file standardnotes_fs-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for standardnotes_fs-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6014edf056bd7b6e88b84948c0a012f6a8f56199d79ebfaa4576afc566368048
MD5 21d63d6433b12a99c5fe5796239e91ed
BLAKE2b-256 29f3a35dcdb68e1dc328870ebeaabda51ae1dea69a08926841ae8dbcd1e7bf5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page