Skip to content

Vinfall/fortunes-vndb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fortunes-VNDB

Fortune file of VNDB quotes. Automatically updated through GitHub Action.

Why

Quoted from Yorhel via t1052.3:

Note

It takes all the fun of the randomness away if you know all of them already. :-P

And fortunes program has exactly the same charm. It becomes somehow hilarious if you pass the quote to other programs like cowsay:

fortunes | cowsay

Usage

  1. Note that it may contain NSFW content or spoilers so use it at your own risk
  2. Install fortune-mod or fortunes from your package manager
  3. Copy vndb AND vndb.dat to /usr/share/fortunes (or /usr/share/games/fortunes)
  4. You can now have VNDB quote via fortune vndb

Example commands:

$ sudo cp ./vndb* /usr/share/fortunes/

$ fortune vndb
I spent all of last year's Shiomi Festival participating in a self-sponsored Reading Festival at my apartment, actually.
        -- 筧 京太郎, Daitoshokan no Hitsujikai (https://vndb.org/v8158)

How

Data is obtained through VNDB Query. I have no idea about the meaning of score so omit it on purpose.

PostgreSQL Query:

SELECT vid, cid, quote
FROM vndb.quotes;

Or query VN titles, character names and format the output altogether, check query.sql.

If you want to create a custom VNDB fortune quote, you can either edit coded SQL query in format.py on VNDB Query, or alternatively, run the script locally, edit the JSON, and make a fortune dat yourself.