Code Monkey home page Code Monkey logo

fortune-zh's Introduction

fortune-zsh

**古诗词版的fortune。

Chinese ancient poetry fortune.

古诗词数目:

先秦:654

两汉:207

魏晋:128

南北朝:216

隋代:16

唐代:47061

五代:153

宋代:21450

金朝:63

元代:1401

明代:298

清代:669

依赖

fortune

strfile(通常会和fortune一起安装)

sudo apt-get install fortunes

安装:

爬取最新古诗词并安装

  1. 克隆仓库
# Make sure to clone with --recursive
git clone --recursive https://github.com/shenyunhang/fortune-zh.git
  1. 爬取古诗文
cd fortune-zh
./gushiwen-crawler/start_crawler.sh
  1. 安装古诗文
./install.sh

快速安装

使用已经爬取下来的古诗文数据。

  1. 克隆仓库
git clone --recursive https://github.com/shenyunhang/fortune-zh-data.git
  1. 安装古诗文
cd fortune-zh-data
sudo cp * /usr/share/games/fortunes/

用法:

  1. 随机输出古诗文。
fortune -e 先秦 两汉 魏晋 南北朝 隋代 唐代 五代 宋代 金朝 元代 明代 清代
  1. 设置终端登陆显示。在shell配置文件的最后加入:  
fortune -e 先秦 两汉 魏晋 南北朝 隋代 唐代 五代 宋代 金朝 元代 明代 清代
echo ''

 登录效果图:
image image image

  1. 或者:
fortune -e 先秦 两汉 魏晋 南北朝 隋代 唐代 五代 宋代 金朝 元代 明代 清代 |cowsay
echo ''
  1. 或者:
fortune -e 先秦 两汉 魏晋 南北朝 隋代 唐代 五代 宋代 金朝 元代 明代 清代 |ponysay
echo ''

问题

如果安装后不能用,则先输入:

fortune -f

查看是否已经导入先秦、两汉、魏晋、南北朝、隋代、唐代、五代、宋代、金朝、元代、明代和清代的数据。

如果没有,则修改install.sh里的“FORTUNES”变量到对应的路径再安装。  

fortune-zh's People

Contributors

cdluminate avatar dsthing avatar happyaron avatar lidaobing avatar shenyunhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fortune-zh's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.