FileComment - 为文件加注释的工具


GPL
Linux
Python

软件简介

FileComment (https://github.com/Chengming/FileComment) 是一个为文件加注释的工具。

对于一些大文件(例如数据库备份)以及可执行文件,我们有时希望能记录文件的用途,但不想把文件的名字弄得太长,FileComment
可以帮助解决这一问题。使用方式也很简单。

为文件添加注释:

fcomment -a FILENAME

会调用默认的编辑器让用户输入注释内容。

也可以使用-m选项指定:

fcomment -a FILENAME -m 'Comment message'

显示文件的注释(默认只显示最新的一条注释):

$ fcomment *
| File Name   | Comment                      | Added Time          |
|-------------+------------------------------+---------------------|
| file1       | 100000 user data             | 2014-04-01 15:25:15 |
| path1       | DB backup after create index | 2014-04-01 15:24:31 |

也可以使用-f选项显示一个文件所有的注释:

$ fcomment -f file1
| File Name   | Comment          | Added Time          |
|-------------+------------------+---------------------|
| file1       | Comment update   | 2014-04-01 15:30:19 |
| file1       | 100000 user data | 2014-04-01 15:25:15 |