Won't go into the details of Task Warrior, if you're here then likely already aware.
| 1. Export Asana tasks as CSV | ![]() |
|---|---|
| - Browser Only | |
| 1. Select All Items | |
| 2. Grab the PullDown | |
| 3. Export to CSV |
- 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 nobomband save file
- convert to json (see cjParse.py)
- Run through jq
- Run through sed and awk and capture output into a script
- Edit the capture script accordingly
- Happy with it? Run it.
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
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
