make an alfred hotkey that enters a time log into a timesheet entry
abbood opened this issue · 9 comments
Business Requirement
allow user to directly log time they spend on a specific project to a specific timesheet
Analysis
This can be simplified by the following assumptions.
- use a COPY of this google sheet to do your work
- when you make the entry.. it must/can only happen on the same day.. doing time logs for past/future dates is not applicable here
- a given time sheet will have several "projects" or "tasks" in it.. they won't appear in a dropdown in an alfred box obviously.. nor is the user expected to be able to remember/put the exact spelling of the projects there.. so as a work around the script will have to "guess" what project the client is working on simply by using a case insensitive regex..
for example if i type the following in the alfred box jira 3:00
then this should work on all of these:
jira migration
JIRA migration
the Jira migration
etc
technical requirement
given
user is using this spreadsheet for time logging
and
user launches alfred
and
enteres %project case insensitive substring% %hh:mm%
where h = hour, m = minute
when
clicks on enter
then
the spreadsheet should update the row/column of that project on that date with the added hours
Status Update
feb 15th, @abbood
trying to use caching, and working on creating a singelton method to call the google sheets service (ie must learn singelton in python)
feb 14th 2:00pm @abbood
made python command line work perfectly.. see this commit aa40835 with it's log message
next step: integrate it into alfred workflow.. documentation is poor, following tutorial here for now
feb 14th @abbood
successfully wrote script that can update number to a cell corresponding to today (see 1e9c6ee).. now we must add the ability to specify the project name via regex (challenging)
feb 13th @abbood
working now on writing a method that scans a spreadsheet sheets and returns the sheet title and column that matches today's date
Related Issues
References
game plan
step 1: hello world
- decide on a language to be used that will do the interfacing with the google docs api, and make it simply add a hello world cell in an existing sheet
- this will require authentication, so figure that out first
- note: chose ruby for language of choice b/c gitlab is in ruby
- Created a project called "logtivly" on the dev console of lobolabs following instructions [here]
(https://developers.google.com/sheets/api/quickstart/ruby) - got client id/client secret.. stored in a safe place
ran quick start guide.. worked fine.. see this commit
step 2: enter data into specific spreadsheet
- use this spreadsheet with id
1tRziPgOwgPBCYIQZuwa7Me1vk5_tfsAWb3mcpPICxEI
- enter "hello world" text into a specific row/column
step 3: write script that finds appropriate sheet to enter tab into
ie we gotta find the sheet that has the date range we're interested in
step 4: make program work on python command line
done
step 5: add notificaiton indicating success of adding something
step 6: change workflow, make it display suggestions at first
given
user types log
then
list of all projects display
when
user click on a display it auto fills (how?)
then
user adds a number (as hours)
after adding the number.. it should execute and send notification