Skip to content

Latest commit

 

History

45 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardcover Quotes - HCQ

Go program to fetch a random quote from your hardcover.app reading journals and output it to your terminal (think message of the day or on initial shell invocation).

ps. add me on hardcover 🤓 https://hardcover.app/@countmancy

Requirements

  • hardcover.app api key stored in the env var HARDCOVER_API_TOKEN
    • Token with necessary read-only permissions can be generated directly from this link:

Installation

Grab the latest binary release or install via go:

go install github.com/GianniBYoung/hardcover-quotes/cmd/hcq@latest

Usage and Applications

  • hcq will output a formatted string to stdout
  • A webhook will be sent if the env var HCQ_WEBHOOK_URL is set Hardcover Quotes Screenshot
  • Pipe it to lolcat or cowsay for more fun!
  • Set the MOTD(message of the day)
  • Print a quote upon shell invocation!
  • Send a webhook to a service such as trml for displaying the quote on an e-ink display!
[[ $SHLVL -le 1 ]] && hcq

Hardcover Quotes Screenshot

Configuration Options

Environmental Variables

  • HARDCOVER_API_TOKEN -> required to set be able to access your profile and retrieve quotes
  • HCQ_WEBHOOK_URL -> If set, will send a POST request to the specified URL with the quote
  • HCQ_INFO_LEVEL -> increase the verbosity for debugging
    • debug
    • info
    • warning

Inspiration

Links to some projects that inspired me to start this project, check them out!

Contributing

Contributions appreciated!

Take a look at the issues, submit feature requests, submit Pull requests etc

About

Fetch Quotes from hardcover.app

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages