命令行脚本的有用集合。
pyqo的Python项目详细描述
Pyqo
一组有用的命令行脚本,用于浏览文件和目录,并快速获得信息。
兼容性
完全兼容:
windows7及更高版本。
linux在x窗口系统下运行的发行版。
需要Python 3
。在Python 3.6
测试。
用法
安装PyPI package:
$ pip install pyqo
你已经准备好出发了。
您还可以克隆存储库:
$ git clone https://github.com/Whenti/pyqo
或者download and extract the zip,然后运行安装程序:
$ python setup.py install
检查commands documentation below以查看可用的内容。
依赖关系
有关详细信息,请参见requirements.txt文件。
作者
- quentin l_v_que-Whenti
许可证
这个项目很自豪地获得了麻省理工学院的许可-请参阅LICENSE.md文件了解详细信息。
命令
下面我们简要描述pyqo
的不同命令。确保使用--help
选项了解更多详细信息。
命令v
用于保存小变量的关联表。有关详细信息,请参见v --help
。
示例
$ # save the value '+44 1234 123456' under the key 'john_number'
$ v john_number -a '+44 1234 123456'
$ # print John's number
$ v john_number
$ # forget John's number
$ v john_number -d
命令f
轻松打开您喜爱的文件。有关详细信息,请参见f --help
。
示例
$ cd ~
$ # associate permanently the key 'bashrc' to the file '~/.bashrc'
$ f bashrc -a .bashrc
$ cd ~/Documents/games
$ # open the '~/.bashrc' file
$ f bashrc
命令d
轻松打开文件管理器到您喜爱的目录。
命令d
与命令c
共享其数据。
有关详细信息,请参见d --help
。
示例
$ cd ~/Documents/games
$ # open the current working directory, here '~/Documents/games'
$ d
$ # associate permanently the key 'films' to '~/Documents/films'
$ d films -a /home/pyqo/Documents/films
$ # open '~/Documents/films'
$ d films
命令i
轻松打开您喜爱的网站。有关详细信息,请参见i --help
。
示例
$ # associate permanently the key 'github' to 'http://www.github.com'
$ i github -a http://www.github.com
$ # associate permanently the key 'so' to 'https://stackoverflow.com/'
$ i so -a https://stackoverflow.com/
$ # open the two websites on the existing webbrowser window
$ i github so
$ # open github and performs a google search for 'python' on a new webbrowser window
$ i -n github -g python
命令c
轻松地将命令行的工作目录设置为您喜爱的目录。
要使脚本改变当前环境,它需要在linux中使用source
。
我们建议您创建别名以避免手动执行此操作:alias c="source c"
。
命令c
与命令d
共享其数据。
有关详细信息,请参见c --help
。
示例
$ cd ~/Documents/games
$ # associate permanently the key 'games' to '~/Documents/games'
$ c games -a .
$ # associate permanently the key 'films' to '~/Documents/films'
$ c films -a /home/pyqo/Documents/films
$ # equivalent to 'cd ~/Documents/films'
$ c films
$ # equivalent to 'cd ~/Documents/games'
$ c games
命令syn
搜索参数(法语)中给定单词的所有同义词。有关详细信息,请参见syn --help
。
示例
$ # searches for all synonyms of 'gentil'
$ syn gentil
命令say
启动读取给定参数的合成语音。有关详细信息,请参见say --help
。
示例
$ say "Hi, how are you ?"
命令anto
搜索参数(法语)中给定单词的所有反义词。有关详细信息,请参见anto --help
。
示例
$ # searches for all antonyms of 'gentil'
$ anto gentil
命令rand
显示随机整数。有关详细信息,请参见rand --help
。
示例
$ # randomly draw an integer between 5 and 10
$ rand -m 5 -M 10
命令yget
在当前文件夹中下载其url作为参数传递的youtube视频。有关详细信息,请参见yget --help
。
示例
$ # downloads the youtube video '"Sweet Victory" Performance'
$ yget https://www.youtube.com/watch?v=k9iYm9PEAHg
命令define
搜索参数(法语)中给定单词的定义。有关详细信息,请参见define --help
。
示例
$ # searches for the definition of 'gentil'
$ define gentil