Git Product home page Git Product logo

standardnotes-fs's Introduction

standardnotes-fs

⚠️ Project archived: Due to changes in the Standard Notes API and encryption, this program will no longer work.

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.

Important: standardnotes-fs only works with protocol version 003 accounts. It's unlikely I'll add 004 support, so don't upgrade your account if you want to use this.

Example

$ snfs notes/
Please enter your Standard Notes username: [email protected]
Please enter your password (hidden): 
Enter your two-factor authentication code: 123456

$ tree --dirsfirst notes/
/home/tanner/notes
├── archived
│   └── old_notes.txt
├── tags
│   ├── lists
│   │   ├── Shopping.txt
│   │   └── Todo.txt
│   └── projects
│       └── standardnotes-fs.txt
├── trash
│   ├── loveletter.txt
│   └── renovations.txt
├── Accounts.txt
├── Books.txt
├── Checklists.txt
├── Shopping.txt
├── standardnotes-fs.txt
├── Todo.txt
└── Wifi.txt
5 directories, 13 files

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

# Editing:
$ vim notes/Shopping.txt
$ vim notes/tags/lists/Todo.txt

# Tags:
$ mv notes/Checklists.txt notes/tags/lists/
$ rm notes/tags/projects/standardnotes-fs.txt

$ rsync -Wa notes/ notes_backup/

When finished

Unmount the directory:

$ snfs -u notes/

Logout to switch accounts:

$ snfs --logout

Usage

usage: snfs [-h] [--username USERNAME] [--password PASSWORD]
            [-v] [--foreground] [--sync-sec SYNC_SEC]
            [--sync-url SYNC_URL] [--ext EXT]
            [--no-config-files] [--config CONFIG]
            [--creds CREDS] [--allow-other] [--logout] [-u]
            [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
  --ext EXT            file extension to add to note titles. Default: .txt
  --no-config-files    don't load or create config / cred files
  --config CONFIG      specify a config file location. Defaults to:
                       /home/tanner/.config/standardnotes-fs/standardnotes-fs.conf
  --creds CREDS        specify a credentials file location. Defaults to:
                       /home/tanner/.cache/standardnotes-fs/standardnotes-fs.conf
  --allow-other        allow other system users access
  --logout             remove config files and user credentials
  -u, --unmount        unmount [mountpoint] folder

Installation

For Debian/Ubuntu based systems

Install dependencies:

$ sudo apt install fuse python3 python3-pip

With Sudo

Install standardnotes-fs and login:

$ sudo pip3 install --upgrade git+https://github.com/tannercollin/standardnotes-fs
$ snfs ~/notes
Please enter your Standard Notes username: [email protected]
Please enter your password (hidden): 

Without Sudo

Install standardnotes-fs and login:

$ pip3 install --user --upgrade git+https://github.com/tannercollin/standardnotes-fs
$ python3 -m snfs ~/notes
Please enter your Standard Notes username: [email protected]
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:

$ pip3 install --upgrade git+https://github.com/tannercollin/standardnotes-fs
$ snfs ~/notes
Please enter your Standard Notes username: [email protected]
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.
  • 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. Change this with the --ext argument. Example: --ext '.md'.
  • neovim/nvim users have had errors about nvim being "unable to create backup file" when writing. This is a bug with neovim. Executing mkdir ~/.local/share/nvim/backup might fix it.

Development

Install dependencies:

$ sudo apt install fuse python3 python3-pip python-virtualenv python3-virtualenv
$ sudo python3 -m pip install --upgrade setuptools

Clone repo, create a venv, activate it, and install:

$ git clone https://github.com/tannercollin/standardnotes-fs.git
$ cd standardnotes-fs
$ virtualenv -p python3 env
$ . env/bin/activate
(env) $ pip install --upgrade --no-cache-dir .

Standardnotes-fs is now installed in the virtual environment. Run it:

(env) $ mkdir test
(env) $ snfs -vv --no-config-file --username [email protected] --password testaccount test/

Exit with ctrl-c or unmount as instructed above.

To make changes, edit the files and re-install it with pip:

(env) $ vim standardnotes_fs/standardnotes_fs.py
(env) $ pip install --upgrade .

It's now ready to be ran again with your changes.

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.

standardnotes-fs's People

Contributors

ludwikjaniuk avatar rdhyee avatar tannercollin avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

standardnotes-fs's Issues

Consider supporting Windows

Your upstream fusepy supports Windows using winfsp.

I was able to get standardnotes-fs to run on Windows but wasn't able to get it to actually work. Because I was originally using dummy gid and uid values, I would get permission denied errors (similar to this user doing a similar migration)

It seems the only change that needs to be made is to have Windows call it's equivalent of getuid() and getgid() and then register the conversion from Windows sid to uid/gid with winfsp. I tried my best but got stuck when trying to convert between the pywin32 sid object and the winfspy cffi binding sid object. They're not the same size and the latter doesn't expose anything do me to use and I'm not familiar enough with the intricacies of these frameworks to get further.

Here's what I ended up with, replaced a few lines in sn_fuse.py

from platform import system
_system = system()
        if _system == 'Windows' or _system.startswith('CYGWIN'):
            #Convert windows sid to uid and gid with WinFSP
            #use WinFSP bindings
            from win32security import GetTokenInformation, OpenProcessToken, TOKEN_QUERY, TokenUser
            from win32process import GetCurrentProcess
            from winfspy.operations import lib
            sid = GetTokenInformation(OpenProcessToken(GetCurrentProcess(), TOKEN_READ), TokenUser)
            lib.FspPosixMapSidToUid(sid[0], 2) #Errors, here, sid is a PySID (from pywin32), where lib FspPosixMapSidToUid expects a cffi PSID
            lib.FspPosixMapSidToUid(sid[0], 3)
            self.uid = 2
            self.gid = 3
        else:
            self.uid = os.getuid()
            self.gid = os.getgid()

can't copy txt files in mounted ~/notes folder

Hej,

Thanks for making this, looks very promising.
I succesfully mounted my SN folder in ~/notes
Can read and edit files, but can't copy files into the ~notes folder.
Any idea how to do this?

Split config and cache

Hey
First off all thank you for this nice tool!
But I wonder if it would be possible to store the generated keys into a separated file from the config. Usually keys should go into $XDG_CACHE_DIR or similar. Thereby I can integrate my standardnotes-fs configuration (user name and URL) into my dotfile repository and/or manager, without having to worry about security issues.
Do you think this is a possible feature to integrate? I would offer to implement it myself and open a PR in case you don't have time.

Moving in tags not supported

The feature seemingly created in #4 seems great but could be better.
My use case is I want to massively edit tags with help of scripts etc.
However, it seems I cannot move files between the tag directories here. Is there another way of accomplishing changing tags? If not, I would want to ask for this feature in the future.

Tags support

Good day,

I have been coming back to this project on and off. One thing that I would really like to see is support for tags on notes. The way I'm picturing it is to have tags mapped to directories under which the respective notes live.

For example:

./tag1:
some_note.txt

./tag_xyz:
some_other_note.txt
and_yet_another_note.txt

For simplicity's sake I would be happy to support just one tag per note. Multiple tags could be symlinked though I reckon. Though it does raise some scenarios to be aware of when deleting tags from the file system.

I'd be happy to spend some time on this and give it a go. Would you have any pointers on where to start? Thanks!

Unknown Traceback on Mount

Hio, long term snfs user here. Has been quite well for me for a long time. Ran into a new error today though.

In the middle of the day, not doing anything particular out of the ordinary (or so I remember), the auto-syncing crashed out. This happens every now and then for me, thought no big deal. Just remount the fs.

(base) nick@apollo:~/Programming/coding/linux_scripts$ ./mount_snfs.sh
INFO : Using config directory "/home/nick/.config/standardnotes-fs".
INFO : Loaded config file "/home/nick/.config/standardnotes-fs/standardnotes-fs.conf".
INFO : Using creds directory "/home/nick/.cache/standardnotes-fs".
INFO : Loaded creds file "/home/nick/.cache/standardnotes-fs/standardnotes-fs.conf".
INFO : Using sync URL "https://sync.standardnotes.org".
INFO : Successfully logged into account "[nick's email]@[email].com".
INFO : Config written to file "/home/nick/.config/standardnotes-fs/standardnotes-fs.conf".
INFO : Creds written to file "/home/nick/.cache/standardnotes-fs/standardnotes-fs.conf".
INFO : Starting FUSE filesystem.
Traceback (most recent call last):
File "/usr/local/bin/snfs", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/standardnotes_fs.py", line 260, in main
fuse = FUSE(StandardNotesFUSE(sn_api, sync_sec, args.ext),
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/sn_fuse.py", line 26, in init
self.item_manager = ItemManager(sn_api, ext)
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/itemmanager.py", line 253, in init
self.sync_items()
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/itemmanager.py", line 84, in sync_items
response = self.sn_api.sync(dirty_items)
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/api.py", line 110, in sync
response = self.api.post('/items/sync', dict(sync_token=self.sync_token,
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/api.py", line 27, in post
return res.json()
File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/init.py", line 518, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I've looked through standard notes I've modified in the last day, and nothing weird seems to be contained within the entries. I've also emptied the trash in Standard Notes (sometimes causes issues).

I tried this to sort of unsinstall reinstall, but same error after (I did not blow away the config) - sudo pip3 install git+https://github.com/tannercollin/standardnotes-fs --upgrade

Something I notice in the output is that it is calling python 3.8; that's strange to me, since I regularly use Python 3.69. python --version in the terminal reveals Python 3.6.9 :: Anaconda, Inc.

Looking for some help - how can I troubleshoot this a little further? Thanks!

MFA users prompted for code every time

Users who have MFA enabled are prompted for an MFA code every time they mount a directory, preventing the process from being automated (e.g. mounting a dir on login). This is inconsistent with the behavior of the SN desktop app, which doesn't reprompt every time it's reopened.

I've written a patch that addresses the issue by caching the JWT auth token alongside the other creds at felixauscent/standardnotes-fs@d9d10f003532239fadd8666f1809c5be835c67e3 - care to take a look at it? The main problem that I'm not sure yet how to address is that it won't fail gracefully if the JWT becomes invalid (not sure under what circumstances that would happen under, but it seems possible). Maybe there's some way to make a simple API request and check if it fails, and clear the cached JWT if so?

Thanks!

Missing pw_cost key error after I updated encryption version to 004

After I updated the encryption version from 004 from 003 (https://standardnotes.org/help/security), I started to encounter the following exception when running standardnotes-fs:

Traceback (most recent call last):
  File "/Users/raymondyee/.pyenv/versions/myenv/bin/snfs", line 8, in <module>
    sys.exit(main())
  File "/Users/raymondyee/C/src/my_conda_envs/myenv-3.8.5/.venv/lib/python3.8/site-packages/standardnotes_fs/standardnotes_fs.py", line 205, in main
    keys = sn_api.gen_keys(password)
  File "/Users/raymondyee/C/src/my_conda_envs/myenv-3.8.5/.venv/lib/python3.8/site-packages/standardnotes_fs/api.py", line 73, in gen_keys
    pw_cost = pw_info['pw_cost']
KeyError: 'pw_cost'

Has anyone else run into this problem? I've been running standardnotes-fs with few problems for over a year before today. I'll try to debug and fix this issue.

pip: No matching distribution found for standardnotes-fs

Is standardnotes-fs gone from pip?

$ pip install standardnotes-fs
Collecting standardnotes-fs
Could not find a version that satisfies the requirement standardnotes-fs (from versions: )
No matching distribution found for standardnotes-fs

$ python --version
Python 2.7.15

macOS 10.13.15

file stops syncing after conflict, no error logged

This may be a user error as I'm just trying all this out. I have my snfs mounted directory open in Atom, and Standard Notes open, and playing with changing contents. All works really fine (change in Atom reflected in SN and vice versa) until I voluntarily change the same file in both tools at the same time (and one does not simply override the change from the other tool). I can see that the change is not replicated. After that, both files seem to be completely separate versions of the same file. No conflicted copy created, as far as I can tell. No error or warning in "snfs -v".
This is pretty serious as it completely silent. In a workflow when I work on a project and actively modify the same file, say in SN on my mobile on the go, and on my computer in Atom (I actually plan to test another editor, using Atom for testing only.)
I find it pretty easy to reproduce. What am I missing?

SN v3.6.2 standardnotes-fs 0.0.2

Debian Stretch

Hi there,

Thanks for creating standardnotes-fs. I have it working perfectly on Mac OS. But I'm having problems with both the PyPi version and the git version on Debian Stretch:

The PyPi version installs okay but won't authenticate:

snfs ~/notes
Please enter your Standard Notes username: [email protected]
Please enter your password (hidden):
Traceback (most recent call last):
File "/usr/local/bin/snfs", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/standardnotes_fs/standardnotes_fs.py", line 143, in main
keys = sn_api.gen_keys(password)
File "/usr/local/lib/python3.5/dist-packages/standardnotes_fs/api.py", line 38, in gen_keys
password, pw_info['pw_salt'], pw_info['pw_cost'])
File "/usr/local/lib/python3.5/dist-packages/standardnotes_fs/crypt.py", line 24, in pure_generate_password_and_key
'sha512', password.encode(), pw_salt.encode(), pw_cost,
AttributeError: 'NoneType' object has no attribute 'encode'

The git version won't install:

sudo pip3 install --upgrade git+https://github.com/tannercollin/standardnotes-fs
Collecting git+https://github.com/tannercollin/standardnotes-fs
Cloning https://github.com/tannercollin/standardnotes-fs to /tmp/pip-ut8mtxvo-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-ut8mtxvo-build/setup.py", line 11, in
long_description = fh.read()
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 546: ordinal not in range(128)

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-ut8mtxvo-build/

thanks in antcipation,

Mark

Note is deleted immediately upon save when using customized Emacs

I tried mounting my notes, made a change to one in Emacs and quit. Later I listed the directory contents of the mountpoint and found that the note no longer existed there. I checked the copy on the website and found it was gone entirely. Since it was a weeks' work of work I panicked because I didn't have any other backups (my fault) and I watched as the local copy of the note got deleted on all my other devices as soon as I started the app on them. But then I learned that Standard Notes has a Trash feature, so I looked there and found that the note had just been marked "Deleted" instead, and I could restore it.

I tried creating a new note in the web app first and modifying it within the filesystem with Emacs and can reliably reproduce this. The note always becomes deleted from both the filesystem and the web app when saving it. I also noticed that Emacs was giving an Operation not permitted error when it tries to save, which I didn't see the first time, and by that time the note is deleted.

But this does not happen when using another editor, like Vim or nano. It seems like an edge case specific to something Emacs does, potentially with a customized config.

Still, do you think this is worth investigating, if it could cause data loss in the worst case? My Emacs configuration is at https://github.com/Ruin0x11/emacs.d.

Mac usage, notes appearing as unix files?

I got it working on Mac, but I may be missing something here. The notes come as unix executables, so I can't edit them with a text editor. And even when I force open them with Vim, I do see the note text contents, but modifying it and saving it doesn't sync back to my web client.

screen shot 2017-10-17 at 6 13 05 pm

Mac installation for anyone curious:

  1. brew install python3
  2. pip install virtualenv
  3. Download fuse: https://osxfuse.github.io/

Error during initializarion

Hello, faced with an issue :

what can you suggest?

UUID does not match. This could indicate tampering or that something is wrong with the server. Exiting.

Unable to create .* files

Find out that virtual filesystem, that standartnotes-fs creating does not allow hidden files.

It does not allow to establish bidirectional synchronization with rsync or unison.

Error example from unison :

sync-server_1_997abd27259a | Error in copying locally:
sync-server_1_997abd27259a | Operation not permitted [open(/sn_notes/tags/day/.unison.2020-03-04.txt.6f3ba2960ddd2864b2859cf82acc1651.unison.tmp)]
sync-server_1_997abd27259a | [abort] Aborting line 1
sync-server_1_997abd27259a | Failed: Error in copying locally:
sync-server_1_997abd27259a | Operation not permitted [open(/sn_notes/tags/day/.unison.2020-03-04.txt.6f3ba2960ddd2864b2859cf82acc1651.unison.tmp)]
sync-server_1_997abd27259a | 100%  00:00 ETAFailed [tags/day/2020-03-04.txt]: Error in copying locally:
sync-server_1_997abd27259a | Operation not permitted [open(/sn_notes/tags/day/.unison.2020-03-04.txt.6f3ba2960ddd2864b2859cf82acc1651.unison.tmp)]
UNISON 2.48.4 finished propagating changes at 14:10:52.15 on 04 Mar 2020
Saving synchronizer statea | 100%  00:00 ETA
sync-server_1_997abd27259a | [update] Updating archives
sync-server_1_997abd27259a | [update] Saving archive in /root/.unison/sc4981c0ebae83fffec824e92fb29a7fc2
sync-server_1_997abd27259a | [update] Saving archive in /root/.unison/sc6f3ba2960ddd2864b2859cf82acc1651
sync-server_1_997abd27259a | [update] Copying archive /root/.unison/tm4981c0ebae83fffec824e92fb29a7fc2 to /root/.unison/ar4981c0ebae83fffec824e92fb29a7fc2
sync-server_1_997abd27259a | [update] Copying archive /root/.unison/tm6f3ba2960ddd2864b2859cf82acc1651 to /root/.unison/ar6f3ba2960ddd2864b2859cf82acc1651
sync-server_1_997abd27259a | [update] Removing archive /root/.unison/tm4981c0ebae83fffec824e92fb29a7fc2
sync-server_1_997abd27259a | [update] Removing archive /root/.unison/tm6f3ba2960ddd2864b2859cf82acc1651
sync-server_1_997abd27259a | Synchronization incomplete at 14:10:52  (0 items transferred, 0 skipped, 2 failed)
sync-server_1_997abd27259a |   failed: 
sync-server_1_997abd27259a |   failed: tags/day/2020-03-04.txt
sync-server_1_997abd27259a | 
sync-server_1_997abd27259a | Sleeping for 30 seconds...

Reproducing steps :
go to standardnotes-fs dir, try to create file :

touch: setting times of '.service_file': No such file or directory

Some Tag Directories are Unrecognised/Inaccessible

Problem

Some of the directories in ~/notes/tags aren't recognised as directories (or even files). They show up when invoking ls -l, albeit with no form of metadata attached to them:

root@grml ~/notes/tags # ls -l
ls: cannot access 'notes': No such file or directory
ls: cannot access 'diary.2019.12': No such file or directory
ls: cannot access 'diary.2020.02': No such file or directory
ls: cannot access 'diary.2020.03': No such file or directory
ls: cannot access 'notes.exercise': No such file or directory
total 0
drwx------ 2 root root 30 Nov 18 23:08 diary.2019.04
drwx------ 2 root root 31 Sep 29  2019 diary.2019.05
drwx------ 2 root root 30 Sep 29  2019 diary.2019.06
drwx------ 2 root root 31 Sep 29  2019 diary.2019.07
drwx------ 2 root root 31 Sep 29  2019 diary.2019.08
drwx------ 2 root root 30 Sep 29  2019 diary.2019.09
drwx------ 2 root root 36 Sep 30  2019 diary.2019.10
drwx------ 2 root root 30 Nov  8 21:04 diary.2019.11
?????????? ? ?    ?     ?            ? diary.2019.12
drwx------ 2 root root  3 Jan  1  1970 diary.2020
drwx------ 2 root root 31 Jan  3 20:32 diary.2020.01
?????????? ? ?    ?     ?            ? diary.2020.02
?????????? ? ?    ?     ?            ? diary.2020.03
drwx------ 2 root root  7 Apr  5 23:18 diary.2020.04
?????????? ? ?    ?     ?            ? notes
drwx------ 2 root root 16 Sep 10  2019 notes.admin
?????????? ? ?    ?     ?            ? notes.exercise
drwx------ 2 root root  5 Oct 26 01:58 notes.software
drwx------ 2 root root 12 Jan  1  1970 notes.work

Notice the question marks and cannot access [...] no such file or directory errors.

Tags show up and work absolutely fine in the regular SN client, even after clearing the data and importing a backup.

just get tags folder

in macosx the ~/notes folder isn't mountable with nvalt.
thought that was possible by doing a mkdir ~/notes before doing snfs ~/notes

did a reinstall
snfs --logout
umount ~/notes
pip3 uninstall standardnotes-fs

install with same instructions and make a dir (~/notes) first before doing snfs ~/notes
login and such, however now I just get a tags folder in my notes folder and that is it

any idea how to fix this?

Unable to mount

Hio, long term snfs user here. Has been quite well for me for a long time. Ran into a new error today though.

In the middle of the day, not doing anything particular out of the ordinary (or so I remember), the auto-syncing crashed out. This happens every now and then for me, thought no big deal. Just remount the fs.

(base) nick@apollo:~/Programming/coding/linux_scripts$ ./mount_snfs.sh
INFO : Using config directory "/home/nick/.config/standardnotes-fs".
INFO : Loaded config file "/home/nick/.config/standardnotes-fs/standardnotes-fs.conf".
INFO : Using creds directory "/home/nick/.cache/standardnotes-fs".
INFO : Loaded creds file "/home/nick/.cache/standardnotes-fs/standardnotes-fs.conf".
INFO : Using sync URL "https://sync.standardnotes.org".
INFO : Successfully logged into account "[nick's email]@[email].com".
INFO : Config written to file "/home/nick/.config/standardnotes-fs/standardnotes-fs.conf".
INFO : Creds written to file "/home/nick/.cache/standardnotes-fs/standardnotes-fs.conf".
INFO : Starting FUSE filesystem.
Traceback (most recent call last):
File "/usr/local/bin/snfs", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/standardnotes_fs.py", line 260, in main
fuse = FUSE(StandardNotesFUSE(sn_api, sync_sec, args.ext),
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/sn_fuse.py", line 26, in init
self.item_manager = ItemManager(sn_api, ext)
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/itemmanager.py", line 253, in init
self.sync_items()
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/itemmanager.py", line 84, in sync_items
response = self.sn_api.sync(dirty_items)
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/api.py", line 110, in sync
response = self.api.post('/items/sync', dict(sync_token=self.sync_token,
File "/usr/local/lib/python3.8/dist-packages/standardnotes_fs/api.py", line 27, in post
return res.json()
File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/init.py", line 518, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I've looked through standard notes I've modified in the last day, and nothing weird seems to be contained within the entries. I've also emptied the trash in Standard Notes (sometimes causes issues).

I tried this to sort of unsinstall reinstall, but same error after (I did not blow away the config) - sudo pip3 install git+https://github.com/tannercollin/standardnotes-fs --upgrade

Something I notice in the output is that it is calling python 3.8; that's strange to me, since I regularly use Python 3.69. python --version in the terminal reveals Python 3.6.9 :: Anaconda, Inc.

Looking for some help - how can I troubleshoot this a little further? Thanks!

Help: How could I make my notes persistent

Hey, me again...
I know this is about mounting a fs. As soon as I unmount, the folder remains, but the content is gone. That's how it works. But do you see any solution how I could keep the files? I would to edit my notes even while being offline (from booting on) and sync them later. Or must I search for a different project then?

Support other file extension

Hi, thanks for the cool and useful project!

I use markdown formatting for my notes, so I would prefer for files to have the .md extension so that my text editor picks up highlighting.

Would it be possible to add an option to override the default .txt extension?

Surprising "UUID does not match " error just started yesterday

Yesterday, I started getting the error message:

UUID does not match. This could indicate tampering or that something is wrong with the server. Exiting

error message after I enter username/password/2fa code (correctly). Up to that point, I had been successfully using standardnotes-fs without problems for a couple of months. Things look fine on my official SN clients, however. I don't know how to get rid of the problem. I downloaded and restored my data but still have the same problem.

Could this issue be related to API v20190520 migration · Issue #19 · tannercollin/standardnotes-fs? Maybe the API changes used by the SN clients have changed the UUIDs of the notes in such a way that standardnotes-fs no longer recognizes as valid?

Exporting Notes from Tag Structure

I'm not sure if I'm understanding the point of the tags folders when mounted.

I was hoping to be able to export notes from a specific tag to an outside directory, but am not finding an easy way to do this, is it possible?

I can use the tree command to see the structure, so it appears there is a way to display notes in their respective tag, but getting the notes out is alluding me.

Any help would be appreciated.

Cheers,
Josh

can't login

I tried setting this up, with sudo I get the following error.
I installed with pip3 instead of pip by the way, and with sudo method.

Traceback (most recent call last): File "/usr/bin/snfs", line 11, in <module> sys.exit(main()) File "/usr/lib/python3.6/site-packages/standardnotes_fs/standardnotes_fs.py", line 143, in main keys = sn_api.gen_keys(password) File "/usr/lib/python3.6/site-packages/standardnotes_fs/api.py", line 38, in gen_keys password, pw_info['pw_salt'], pw_info['pw_cost']) File "/usr/lib/python3.6/site-packages/standardnotes_fs/crypt.py", line 24, in pure_generate_password_and_key 'sha512', password.encode(), pw_salt.encode(), pw_cost, AttributeError: 'NoneType' object has no attribute 'encode'

suspected break when upgrading to SN 2.3.1

Hey Tanner,
Logging an issue here. I believe that the only thing that's changed on my computer is an upgrade from SN 2.25 to 2.31. When I try mount SNFS, I encounter this now:
image
Wondering if you're able to replicate on your end with the latest update?
Cheers - Nick

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.