将标准笔记作为文件系统安装。

standardnotes-fs的Python项目详细描述


标准注释fs

说明

将您的Standard Notes帐户装载为文件系统,并将笔记编辑为纯文本文件。

这允许您在您喜爱的文本编辑器中编辑笔记,使用标准的*nix程序和bash脚本来操作它们,或者使用rsync备份它们。

这是一个非正式的标准notes客户端。

示例

$ 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/

完成后

卸载目录:

$ fusermount -u ~/notes

注销以切换帐户(可选):

$ snfs --logout

用法

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

安装

对于基于debian/ubuntu的系统

安装依赖项:

$ sudo apt-get install fuse python3 python3-pip

使用sudo

安装StandardNotes fs并登录:

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

不带sudo

安装StandardNotes fs并登录:

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

注意:如果不想使用python -m前缀,则需要将python的本地bin目录添加到$PATH

对于os x系统

安装依赖项: https://osxfuse.github.io/

$ brew install python3

安装StandardNotes fs并登录:

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

注释

  • 重要提示:standardnotes fs还没有经过严格的测试。在使用之前,请在正式的标准Notes客户机中选择Account > Download Data Archive备份您的笔记。
  • 不会存储您的帐户密码,并在用它生成加密密钥后删除python变量。
  • 您帐户的加密密钥存储在磁盘上的配置文件中。这可以通过--no-config-file禁用。
  • 默认情况下,客户端每30秒与标准notes服务器同步一次,并在保存任何note修改之后同步。
  • 如果与服务器的连接丢失,它将继续尝试定期同步。
  • 当前支持的文件系统函数:getattr、readdir、read、truncate、write、create、unlink、utimens和rename。
  • 禁用创建隐藏文件(名称以句点开头)以防止创建垃圾文件。
  • 具有相同名称的便笺将通过在末尾添加数字进行重复数据消除。
  • 在文件系统中,notes的名称后面会附加“.txt”扩展名

许可证

该程序是GNU GPLV3授权的免费开源软件。有关详细信息,请参见LICENSE文件。

这意味着您有权研究、更改软件和源代码,并将其分发给任何人,以及出于任何目的,只要您在分发时授予相同的权利。你应该享有这些权利。请利用它们,因为我喜欢拉请求,并希望看到这段代码投入使用。

致谢

感谢标准notes、udia、python、libfuse和fuse背后的所有开发人员。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java中的安卓字节[]操作   java如何使用SeleniumWebDriver自动弹出对话框窗口   运行单黄瓜JVM的java。来自Gradle的功能文件   在Java中使用JTA连接到SSH   eclipse为什么在从SVN签出Ant版本1.3时,Ant java项目本身有很多错误?   java如何获取撇号之间的字符串   java锁在单个线程上作为布尔信号量工作吗?   bluej我可以使用什么代码清除屏幕(java)?   java在单击JButton时更改JPanel图标   java将逗号分隔的字符串转换为不带中间容器的列表   java Flink:以集群模式加载资源文件   java删除多对多条目,同时将两个对象都保留在数据库中   将数组值向左移动