Skip to content

jimsander/asanatotaskwarrior

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Asana To Task Warrior

Simple steps to dump Asana For Task Warrior

Won't go into the details of Task Warrior, if you're here then likely already aware.

Converting Asana to TaskWarrior tasks

1. Export Asana tasks as CSV
- Browser Only
1. Select All Items
2. Grab the PullDown
3. Export to CSV
  1. Sidenote Gotcha:
    • Something I ran into was the BOM *(\ufeff) string was in the beginning of the csv
    • Must have been inserted when saving from LibreOffice, who knows
    • Remove that by using vi :set nobomb and save file
  2. convert to json (see cjParse.py)
  3. Run through jq
  4. Run through sed and awk and capture output into a script
  5. Edit the capture script accordingly
  6. Happy with it? Run it.

Long One-Liner

Didn't bother with finessing the jq filter, just ran it through a littany of seds

cat samples/AsanaDump.csv | ./cjParse.py |\
jq  '.[]| @sh "\(.Name)___\(.Projects)"' | \
sed "s/^\"'//" | sed "s/'\"$//" | sed "s/'___'/___/" | sed "s/ ___/___/" |\
awk -F'___' '
  { pro=""; split($2,p,","); 
  for (i in p){ pro=sprintf("pro:%s %s",p[i],pro)  };
  printf("task add %s %s\n", $1, pro ) }' | \
head -3 | tee mynewtasks.sh

Output Sample

There's your sample script

  • Notice the projects were added
  • Cleanup up your output script as needed
task add Sensu Check: Client Keepalive pro:BrainDump pro:DCM-Sensu
task add Sensu Client : remote server configuration setup pro:BrainDump pro:DCM-Sensu
task add Add Install for ec2-ami-tools in imageServer pro:BrainDump

About

Simply task management and get off of Asana

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages