Skip to main content

Add a remark for the file in the OS.

Project description

file-remark

Add a remark for the file in the OS.

项目地址

github: https://github.com/icexmoon/file-remark

gitee: https://gitee.com/icexmoon/file-remark

pypi: https://pypi.org/project/file-remark-icexmoon/

用途

这是一个可以给系统中的文件或路径添加备注的小工具。

特点有:

  • 使用绝对路径来匹配文件。
  • 独立数据存储,不依赖于文件的meta信息。

缺点有:

  • 文件如果移动后,就无法关联到备注信息(后续可以考虑添加md5匹配的机制)。

目的

之所以我会开发这么个小工具,是因为有时候会遇到需要给安装程序备注一个激活码,或者给压缩包备注一个解压密码的情况,此时多数情况是不得不添加一个额外的txt文件来说明,不仅麻烦,还显得很多余。

当然我也有在网上搜索类似的工具,但没有找到,只找到一个可以在文件的meta信息中写入备注的工具,但这个工具有个缺点,如果文件被修改了,meta信息就会被重写,导致添加的备注丢失。

使用说明

安装

pip install file-remark-icexmoon

更新

pip install file-remark-icexmoon --upgrade

显示当前目录下的文件和目录

pyfr

该命令可以同时显示已添加的文件备注和未添加备注的目录和文件。

比如:

 pyfr
LICENSE [this is a license for open source]
pyproject.toml [this is a test comment]
src [this is a source directory]
.git
.vscode
dist
README.md
setup.cfg
setup.py
tests

其中[xxx]是添加的备注信息。默认先显示有备注的文件,再显示其他的,但也可以使用其它参数修改显示结果。

修改显示结果

可以使用多种参数修改显示结果:

  • -o--only_remark:仅显示添加了备注的文件或目录。
  • -l--remark_last:将由备注信息的条目显示在最后。

添加备注

pyfr --add --file .\LICENSE --remark 'this is a license for open source'

pyfr -af .\LICENSE -r 'this is a license for open source'

-f参数后是需要添加备注的文件路径,可以使用相对路径或绝对路径。-r参数后是备注的内容,如果包含空白符需要使用引号包裹。

执行完毕后会自动打印当前目录下的条目以便查看添加结果。

目前只能添加备注,之后会增加修改备注和删除备注的功能。

显示系统版本

pyfr -v

pyfr --version

初始化程序

pyfr --init_process

如果数据库损坏或遇到其它问题,可以使用此功能尝试重新初始化程序,但该操作将丢失已添加的所有数据。

更新日志

  • 0.0.1 基础版本。
  • 0.0.2 修改数据库表结构,添加显示版本功能。
  • 0.0.3 修复程序初始化会出错的bug。

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

file-remark-icexmoon-0.0.3.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

file_remark_icexmoon-0.0.3-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file file-remark-icexmoon-0.0.3.tar.gz.

File metadata

  • Download URL: file-remark-icexmoon-0.0.3.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for file-remark-icexmoon-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7fb64a84f75263a30db56c72241517126c50edf0960e7f72ead8671bb1261a70
MD5 e57ce1d08f81cc02f09acb9da4af7574
BLAKE2b-256 8293bdcbcbde8d8c5cfee921493b946cab06771c4f64eb8661f01ff0c2195010

See more details on using hashes here.

File details

Details for the file file_remark_icexmoon-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: file_remark_icexmoon-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for file_remark_icexmoon-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 353c03d90a29790dba7a57717ecba058c31b2dfb4f008f22ee5a173888479145
MD5 6cc74ce05d7e030eaf1e4a6b6b669362
BLAKE2b-256 402405a3d4b02c4143a809e8fecdbf51d671d1d28d55ae3bd9ebe537e1903942

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