【发布时间】:2016-08-25 15:18:30
【问题描述】:
我在我的 shell 脚本中使用了 fortune 命令。我想将这些报价嵌入基于网络的程序中。 Linux发行版中fortune命令的源码和报价库在哪里可以找到?
【问题讨论】:
标签: linux command open-source
我在我的 shell 脚本中使用了 fortune 命令。我想将这些报价嵌入基于网络的程序中。 Linux发行版中fortune命令的源码和报价库在哪里可以找到?
【问题讨论】:
标签: linux command open-source
Debian 版本的源代码和数据库似乎都在这里维护: http://anonscm.debian.org/gitweb/?p=collab-maint/fortune-mod.git
(我通过 Debian 包跟踪系统找到了 fortunes 包: https://packages.qa.debian.org/f/fortune-mod.html)
【讨论】:
对于基于 Debian 的发行版上的报价数据库,请访问 /usr/share/games/fortunes。引号仅以纯文本形式出现。您可以添加一些其他数据库,搜索:
apt search ^fortunes
【讨论】:
Following a Repology search,我发现上游源托管在here。
报价和其他数据文件可以在here找到。另一方面,本地安装的数据文件通常可以在/usr/share/fortune/ 找到。
您选择的编程语言可能已经存在其他实现,例如。 G。存在 python 实现here。
【讨论】: