Skip to content

humane replacement for the monstrous fortune-cookie: prints at login a random line from a text file

License

Notifications You must be signed in to change notification settings

berrytsakala/dailytip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dailytip

A humane alternative to the monstrous fortune-cookie*: prints at login a random line from a text file

Raison d'être:

Fortune cookie's files are too complicated to edit!

Install

  1. copy dailytip.py to your $PATH, e.g. /usr/local/bin
  2. chmod a+x /usr/local/bin/dailytip.py
  3. copy .dailytiprc to your $HOME
  4. put a text file, (line delimited), in $HOME/.dailytip.txt (configurable via .dailytiprc)
  5. add to your shell's rc file (e.g. .bashrc) the command "dailytip.py"

Notes:

This process is not the most efficient: it'll load all the lines and choose a random one. for files under 10mb, in modern desktops, it goes unnoticed.

Todo:

  • deal with long lines

_* pun intended

About

humane replacement for the monstrous fortune-cookie: prints at login a random line from a text file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages