Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ajmalmsali/49548108f25a379c6fd8a01cc073427b to your computer and use it in GitHub Desktop.
Save ajmalmsali/49548108f25a379c6fd8a01cc073427b to your computer and use it in GitHub Desktop.
harvest - sow
#!/bin/bash
#script for logging harvest from commandline.
if [[ -n $1 ]]
then
PROJECT=$1;
else
#default as free
PROJECT='free';
fi
if [[ -n $2 ]]
then
TIME=$2;
else
#default as 8hrs.
TIME='8';
fi
if [[ -n $3 ]]
then
NOTES=$3;
else
#no notes
NOTES='';
fi
if [[ $PROJECT = "oss" ]]
then
PROJECT_ID=10161390;
TASK_ID=5541452;
#elif
#then
else
PROJECT_ID=10492653;
TASK_ID=5541452;
fi
echo "ScreenInteraction - HarvestLog";
#echo $PROJECT_ID $TASK_ID "+$TIME:00" $NOTES;
sow l $PROJECT_ID $TASK_ID "+$TIME:00" $NOTES;
@ajmalmsali
Copy link
Author

Sow is not able to create alias - as my account doesn't support listing the active projects.

So this is calls the sow with your project_id & task_id,

Steps

  1. npm install sow
  2. sow setup
  3. get your project_id, task_id & replace in this script.
  4. put this in your path & chmod x.
  5. usage : script-name [projectname = free] [hours = 8] [notes]
    e.g si-log oss 6 blahblah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment