跳转到主要内容

您自己的个人Griznog,按需获取智慧

项目描述

Griznog

PyPI version GitHub actions status

asciicast

用法

我是一个乡巴佬,我从不看说明。--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 (54.3 kB 查看哈希值)

上传时间 源代码

由以下支持