Timesheet logger for lazy people
Allows you to timelog in bulk. When you're the king of procrasti-nation, there's really a lot of other / better things to do.
- Ruby (duh)
- Chrome
-
bundle install
-
Copy
.env.sample
to.env
and edit its content.
USERNAME=fixme
PASSWORD='fixme'
FRESHBOOK_URL = "https://fixme.freshbooks.com/"
- Copy
config.sample.rb
toconfig.rb
and edit its content.
CONFIG = {}
CONFIG['holidays'] = []
# CONFIG['holidays'] << 'YYYY-MM-DD'
CONFIG['Mon'] = []
# CONFIG['Mon'] << ['Project', 'Task', 'Hours', 'Notes']
CONFIG['Tue'] = []
# CONFIG['Tue'] << ['Project', 'Task', 'Hours', 'Notes']
CONFIG['Wed'] = []
# CONFIG['Wed'] << ['Project', 'Task', 'Hours', 'Notes']
CONFIG['Thu'] = []
# CONFIG['Thu'] << ['Project', 'Task', 'Hours', 'Notes']
CONFIG['Fri'] = []
# CONFIG['Fri'] << ['Project', 'Task', 'Hours', 'Notes']
- Run the script
bundle exec ruby app.rb # Log today
DATE=2018-05-15 bundle exec ruby app.rb # Log specific date
FROM=2018-05-01 TO=2018-05-31 bundle exec ruby app.rb # When you procrastinate until the last minute
- Will only log on a day where there's no existing time logs. Comment out these lines if you wish to ignore :-
# app.rb
unless page.find('.timesheet-entry-table').has_content?('No hours logged on')
puts "Already Logged on #{date.strftime}!!"
return
end
-
This obviously only works if you have a pretty similar work schedule every day of week.
-
There's no UNDO button. Make sure you know what you're doing.
-
Things will break when the UI changes.
-
You'll get your login will temporarily blocked if you fire the script too many frequently.
-
Contributions are welcomed.
Because why use a scalpel when you have a chainsaw >:)
If you can't handle the action & excitement, check out the oauth
branch. But seriously, you're missing all the fun.
This project is Licensed under GLWTPL