Quotes

Famous authors says things that are way smarterer then this sentence... bigly!
Wednesday 18th of October 2017 12:29:01 PM

I had this idea of putting random quotes into my loading screens where the loading takes a little while, and as a little widget (turns out most loading is done in about 2 sec so kind of hard to read a lot of quotes in that time). I searched for a free online source of quotes, ideally a api the form of a simple http-rest-json setup. No such thing it seems like, so I had to... ehm... "borrow" some quotes from the online resources of a British library. I mean... can anybody really own famous quotes? Don't they belong to their author? Also public libraries in England are payed for by public funding I assume, so... thanks British tax payers! 

Bada-bim bada-bom, and we have a database of 20k quotes at our disposal. I made a simple internal api to fetch the quotes in json format, as well as a image generator with the help of php_gd image library, that seems to be available per default in php7.1 (or I enabled it long ago and forgot about it) and the intervention/image package. The results can been seen here

I also wanted to try out some programmatic tweeting, so I made a "Quote Bot" on twitter: @QuteBot


Further improvements will be logic to allow users to find quotes by author and topics/subjects. That information is already in the database. I might also make the api public, however I do not have the server resources to support that. However you don't need to be a rocket scientist to find the api on my webpage right now... 

UPDATE

I've added support for topics and author search to test my first ever Amazon Echo/Alexa Skill. The QuoteBot Skill is now available here.