jonathanmaron / fortune
Unix风格的fortune程序,可以显示随机引语。
1.0.0
2019-08-26 08:00 UTC
Requires
- php: ^7.1
- container-interop/container-interop: ^1.2
- ramsey/uuid: ^3.7
- riimu/kit-phpencoder: ^2.3
- symfony/console: ^4.0
- symfony/filesystem: ^4.0
- symfony/finder: ^4.0
- symfony/lock: ^4.0
Requires (Dev)
- squizlabs/php_codesniffer: ^3.0
- symfony/var-dumper: ^4.0
This package is auto-updated.
Last update: 2024-08-28 05:01:11 UTC
README
fortune
是一个命令行脚本,可以显示随机引语。
它与BSD fortune
程序类似,最初由Ken Arnold编写。然而,与Arnold的程序不同,这个版本是用PHP编写的,使用了Symfony组件。
安装
使用Composer安装应用程序
composer create-project jonathanmaron/fortune ~/app/fortune
使用方法
$ ~/app/fortune/bin/fortune
"A strong passion for any object will ensure success, for the desire of the end
will point out the means."
-- Henry Hazlitt
默认情况下,fortune
在终端窗口宽度处换行。您可以通过指定 --wordwrap
选项来更改此设置
$ ~/app/fortune/bin/fortune -wordwrap=25
"Success listens only to
applause. To all else it
is deaf."
-- Elias Canetti
要禁用换行,请指定 --wordwrap=0
。
建议将 fortune
添加到您的路径
$ cd ~/bin
$ ln -s ~/app/fortune/bin/fortune fortune
<log out> <log in>
$ fortune
"Be cool to people. Be nice to as many people as you can. Smile to as many people
as you can, and have them smile back at you."
-- Joe Rogan