GitXplorerGitXplorer
t

morning-print

public
0 stars
0 forks
4 issues

Commits

List of commits on branch master.
Unverified
323bfd2383004e2a62c54079e2a9fba47b22d6e9

log helpful things on token failure

committed 3 years ago
Unverified
5163cf94eea3de45d5d3579ea00547c89ccda7a0

Merge branch 'master' of github.com:thedaniel/morning-print

tthedaniel committed 4 years ago
Unverified
ffde25dd81ba0357390ea2f025646f93a8c6ed97

update readme

tthedaniel committed 4 years ago
Unverified
2c583d73f4e943c56bfd66de60b938ded7b2d4d6

summary can be empty

committed 4 years ago
Unverified
26be802b22e359146c5183f59930c044af148a76

remove print

committed 4 years ago
Unverified
dfe3d1d23426bf783f221c02eeae1b0adc026155

add readme

committed 4 years ago

README

The README file for this repository.

Morning Print

Prints some calendar items and a random quote from readwise.io. Code is ugly and full of copy paste and hardcoding at the moment, it's just a quick personal utility.

Gcal tokens

The gcal stuff is adapted from a google cal api quickstart that i don't have the ink to handy, you'll need to:

  • create an app and some credentials for it and save them in the root dir as credentials.json
    • if the app is in testing mode you'll have to add the emails you want to use as testers
  • Create a python3 venv, activate it, pip install -r requirements.txt
  • python gcal.py will open your browser to do the oauth dance and save token, and print events to stdout if it worked.
    • Right now I have it hardcoded to use token.json and work_token.json, basically i just checked this out on my work computer and ran it there and copied the token.json to the printer computer and renamed it to work_token.json

Readwise

.env file with READWISE_TOKEN=<token> should be all that's necessary

Run it

python print.py

Hardware

I have a GOOJPRT PT-210

  • also available on amazon and other sites. Most generic thermal printers should work

TODO

  • If the token expires the script crashes, it should probably just re-auth if it can
  • maybe print error messages to the printer instead of showing them on stdout?
  • paginate readwise
  • filter out "readwise team" higlights