Skip to content

regismesquita/wikiquote2fortune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Straight to the point:

1. Find a page you like in Wikiquote, in my case BSG page: http://en.wikiquote.org/wiki/Battlestar_Galactica_%282003%29
2. Choose a name for your fortune file, in my case, bsg_fortune
3. Run the program: ./wikiquote2fortune  http://en.wikiquote.org/wiki/Battlestar_Galactica_%282003%29 > bsg_fortune
4. strfile bsg_fortune
5. All ready. Just run fortune bsg_fortune, and everything should be ok.

Step 4 (strfile) will create a file called bsg_fortune.dat. Those two files must be in the same folder for the fortune command to work.

Note: I developed this code while some tests for my app were running, so there might be bugs...
Note 2: I don't work with shell script daily so probably there's a better way of doing that. Contribute if you know how...
Note 3: I quickly redid it `go` as the previous one was not working as expected...

Enjoy, MIT licensed (c'mon it's just a handful of lines...) [After so many years it still is]

About

Converts wikiquote pages to Unix Fortune files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages