About
This is a simple program that fetches quotes from the AnimeChan API and stores it in a sqlite3 db locally on your computer.
They can be retrieved and used randomly, and I have added functionality for you to add your own quotes to the db.
I find myself using this with fastfetch to print my system info followed by a randomq quote.
You can do this simply by creating an alias in your bashrc or zshrc
alias ff="fastfetch (+ any options) && aniquote random"
Install
To install you will need to clone the repo first
git clone https://github.com/Hiro427/aniquote.git
Initialize the project
go mod init aniquote
go mod tidy
You can build it with:
go build aniquote.go
Then you can or move it to:
/usr/local/bin
sudo mv ./aniquote /usr/local/bin
This will add it your PATH and allow you to get quotes anywhere.
Usage
Update Quote
Note: The free version of the api only allows 20 requests per hour.
You can run aniquote update
to create db(if first time running) and get new quotes inserted into your db. This db will located in your home directory as .quotes.db
.
The command will only update 10 at a time, to get 20 run it twice. (I don't know why I did this, I never rememember to change it)
*If you want you can just change the number in the loop to get it 20 before building
Insert Quote
This command allows you to add your own quotes by prompting you for the quote, person, source(book, anime, manga, show, speech etc.)
aniquote insert
Random Quote
Just run aniquote random
to get a random quote from your db.