您自己的个人Griznog,按需获取智慧
项目描述
Griznog
用法
我是一个乡巴佬,我从不看说明。--Griznog 4/26/2019
不过,还有一些使用案例你可能想看看!
安装
从pypi安装你的Griznog
pip install griznog
或直接从仓库安装
$ git clone https://github.com/vsoch/griznog
$ cd griznog
$ python setup.py install
命令行使用
Griznog的主要功能是说话
$ griznog --help
usage: griznog [-h] [--version] {speak} ...
Griznog, captured in code
optional arguments:
-h, --help show this help message and exit
--version print the version and exit.
actions:
actions for Griznog
{speak} griznog actions
speak ask Griznog to speak his wisdom.
具体来说,我们可以要求随机引用(无参数)、筛选到特定主题(--topic <主题>
)、禁用颜色,或者让他倾倒所有智慧(引用之间有一些暂停)。
$ griznog speak --help
usage: griznog speak [-h] [--topic TOPIC] [--pause PAUSE] [--dump]
[--no-color]
optional arguments:
-h, --help show this help message and exit
--topic TOPIC subset to particular topic.
--pause PAUSE seconds to allow Griznog to breathe between spurts (default 3
seconds).
--dump Just hear everything. Optionally set a --pause (seconds)
--no-color disable color
1. 随机引用
$ griznog speak
griznog hopes everyone has an anxiety attack and leaves him alone with 10 pizzas.
--Griznog 11/28/2018
2. 主题筛选引用
$ griznog speak --topic pizza
We are fairly simple creatures, throw us the occasional beer, donut and pizza, send us hardware (in quantities that are powers of 2!) and lock us in the basement and we are happy.
--Griznog 8/31/2018
3. 引用倾倒
$ griznog speak --dump
禁用颜色(也适用于前面提到的命令)
$ griznog speak --dump --no-color
Python使用
1. 创建你的Griznog
首先,创建你的Griznog。
from griznog import Griznog
> human = Griznog()
2. 智慧
向你的Griznog请求一个随机的智慧点!
> human.speak()
The sad reality is that the universe doesn't work this way. In the same way we carry DNA and RNA that is billions of years old, we are stuck with legacy code. Organisms aren't rewarded by evolution for making giant rewrites, and programmers aren't rewarded by HR for making things simpler or starting over fresh.
--Griznog 10/11/2018
可选地,你可以筛选到特定主题。
> human.speak(topic='container')
I said they were surprisingly powerful, I didn't mean container fanbois couldn't screw them up.
--Griznog 9/13/2018
为了娱乐性的智慧流,你知道该怎么做
> human.dump()
你也可以使用筛选集合进行倾倒
> human.dump(topic='container')
对于上述任何一项,如果您的终端不支持颜色,只需禁用它。
> human.speak(add_color=False)
容器使用
Griznog被...困在一个容器中!
docker run -it quay.io/vanessa/griznog speak
job security. I get scared when any of this works too well.
--Griznog 4/12/2018
你有问题吗?或者想建议一个功能使其更好?请打开一个问题!
项目详情
关闭
griznog-0.0.11.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | c0ad049520323d3e2dfdafacce82064f08113ddf367ebd34cf2de41764d3a13d |
|
MD5 | ecd560ea66cb6bbab5a48765d1761448 |
|
BLAKE2b-256 | 3a1582b1ba5b9def7c594a3fd41b8c04436322b3afdc882f4d70bfddf1142ca1 |