Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
/ yv-votd Public archive

Verse of the day (VOTD) Command line app

License

Notifications You must be signed in to change notification settings

jyksnw/yv-votd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verse of the day (VOTD) Command line app

A command line interface (CLI) to fetch the current verse of the day from YouVersion public votd API

The app has been developed using the Go programming language and currently requires to be installed from source. If Go has been installed than installation is as easy as running:

go get -u github.com/jyksnw/yv-votd
go install github.com/jyksnw/yv-votd

Environment Variables

There are two environment variables that may be set prior to running the application:

Variable Required Description
YOUVERSION_VOTD_TOKEN Your YouVersion Developer Token
YOUVERSION_VOTD_VERSION The YouVersion Bible Version ID

A YouVersion Developer Token can be obtained by creating an account on the YouVersion Developer Portal

The YouVersion Bible Version ID can be obtained by calling the YouVersion Versions API. If the YOUVERSION_VOTD_VERSION environment variable is not set than a default version_id of 1 will be used which maps to the KJV.

Caching

The application caches each day's verse of the day in a dated file found in the $GOPATH/bin/.votd folder. For example, if the application was executed for the first time on 10/30/2018 the resulting response would be cached in the file $GOPATH/bin/.votd/20181030. Removing this file or this folder will result in the application to re-fetch the current verse of the day.

Example Usage

The application could be used to print the current verse of the day to any new terminal windows by setting up your .bashrc or .bash_profile with the following (assuming that the $GOPATH/bin directory is on your $PATH):

export YOUVERSION_VOTD_TOKEN={your_developer_token}
export YOUVERSION_VOTD_VERSION=1 #1=KJV, 12=ASV, 206=WEB
yv-votd | cowsay -f stegosaurus

Stegosaurus verse of the day

TODO

  • Add support to pass in command line arguments
  • Fail back to prior votd on error
  • Add support to fetch supported versions and their Id's
  • Add support for converting VOTD image to ASCII art
  • Cache the votd based on the date and version_id (currently the cache ignores the version id and will load the last successfully cached votd)

About

Verse of the day (VOTD) Command line app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages