Application for stoic meditation.
Its goal is to help practice stoicism by:
- providing quotations
- allowing user to add own quotations
- recording user's thoughts (notes) related to those quotations
- Quotes in English taken from kidadl.com
- Quotes in Polish taken from: rosnijwsile.pl
Command read
in read/ directory reads standard input formated as a sequence of quote and author (in separate lines) separated by a newline.
The quote is expected to be enclosed in double quotes.
The author is expected to start with hyphen ("-").
Usage:
./read/read -dbpath quotes.db < sayings.txt
Freedom is the only worthy goal in life. It is won by disregarding things that lie beyond our control.
-Epitectus
Another quote
-Author
Command quote
in quote/ directory prints random quote to stdout.
Usage:
$ ./quote/quote quotes.db
[karma@tpd|~/d/g/s/quote] (web) λ ./quote ../quotes.db
The best answer to anger is silence. Agreed. But nature set a limit on that — as it did on eating and drinking
Marcus Aurelius
[karma@tpd|~/d/g/s/quote] (web) λ
Command browse
in browse/ directory starts local http server on port 5000 and allows to browse quotes, view the list of quotes and record user's thoughts.
Usage:
$ ./browse/browse quotes.db
repository.go
defines Repository interface for data access- SqliteRepository in
stoicdb/impl.go
is a struct that implements the repository with sqlite database model/model.go
contains structs which act as simple data model