LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1133|回复: 11

Fortunes from Gentoo.org, Kernel.org

[复制链接]
发表于 2005-5-15 19:06:05 | 显示全部楼层 |阅读模式
这是个非常非常简单的脚本, 可以在你的网页上随机显示一段来自 gentoo 论坛, gentoo 开发组或者是内核注释的名言. 我是用 php fortune 搞的, 调用方法是这样的, 在你的网页里嵌入下面这段代码:
  1. <dl>
  2. <dt>Fortunes from <a href="http://www.gentoo.org/">Gentoo.org</a>, <a href="http://www.kernel.org/">Kernel.org</a>:</dt>
  3. <dd><script type="text/javascript" src="http://lexrus.monoforge.com/fortune/"></script></dd>
  4. </dl>
复制代码


实际效果可以看我 blog 的底部:
http://lexrus.monoforge.com

p.s.随你怎么用, 但是我保留以后加上反向链接的权利
 楼主| 发表于 2005-5-15 19:12:28 | 显示全部楼层
另外, 还有一个 fortune 脚本是我朋友用 python 做的, 有实时查字典的功能, 在这里顺路给他做一下广告咯:
http://livid.cn/doc_view.php?doc_id=1335
回复 支持 反对

使用道具 举报

发表于 2005-5-15 19:29:05 | 显示全部楼层
记得以前linux里有fortune命令可输出谚语的,不知道现在怎么没了?
回复 支持 反对

使用道具 举报

发表于 2005-5-15 20:49:35 | 显示全部楼层
强烈要求midx换头像,不小心朝那边一看,保证晕到,不少兄弟每天眼都看着屏幕已经累的受不了,在看到midx的头像肯定眼冒金星
回复 支持 反对

使用道具 举报

发表于 2005-5-15 21:14:46 | 显示全部楼层
找到了,emerge games-misc/fortune-mod 然后命令行输入fortune
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-15 21:21:30 | 显示全部楼层
恩, emerge fortune-mod-gentoo-dev fortune-mod-gentoo-forums
强烈要求midx换头像 @_@ 换成四个眼睛的企鹅也比这张好啊..
回复 支持 反对

使用道具 举报

发表于 2005-5-16 09:44:08 | 显示全部楼层
换了
回复 支持 反对

使用道具 举报

发表于 2005-11-15 19:28:19 | 显示全部楼层
转悠了下The Fresh Ebuilds,发现portage还有个games-misc/fortune-mod-firefly *_*
$ fortune /usr/share/fortune/firefly
Operative: "The minds behind every diplomatic, military, and covert
operation in the galaxy, and you put them in a room with a psychic."

$ fortune /usr/share/fortune/firefly
Captain: "Catalyzer's a nothing part, captain."

Mal: "It's nothing until you don't got one. Then it appears to be everything."

$ fortune /usr/share/fortune/firefly
Teacher: "...so why would [the independents] fight so hard against us?"

River: "We meddle."

Teacher: "River?"

River: "eople don't like to be meddled with.  We tell them what to do,
what to think, don't run don't walk we're in their homes and in their heads
and we haven't the right.  We're meddlesome."

Teacher: "River, we're not telling people what to think.  We're just trying
to show them how."

$ fortune /usr/share/fortune/firefly
River: "Let's go again!"

Simon: "Later.  Maybe."
回复 支持 反对

使用道具 举报

发表于 2005-11-17 09:02:20 | 显示全部楼层
没换
Post by midx
换了
回复 支持 反对

使用道具 举报

发表于 2005-11-17 10:29:49 | 显示全部楼层
Post by danfo
没换

怨呀!确实换了。以前是这个:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表