-- Leo's gemini proxy

-- Connecting to republic.circumlunar.space:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Bulk adding items to Wunderlist using wunderline on Ubuntu MATE


If you use Wunderlist and want to be able to bulk-add tasks from a text file, first install and set up wunderline.


Now, to be able to right-click a text file containing one task per line on Ubuntu MATE, create a file called "wunderlist-bulk-add" in ~/.config/caja/scripts/ and make it executable. Paste the code below into that file.


Wunderlist

wunderline


(Note: it's possible that this would work in GNOME if you replaced "caja" with "nautius" in that path - let me know in the comments.)


#!/usr/bin/env bash

set -o pipefail

function nonblank()
{
   grep -v -e '^[[:space:]]*$' "$@"
}

for F in "$@"; do
{
   COUNT=$(nonblank "$F" | wc -l | awk '{print $1}')
   if [ "$COUNT" = "" ]; then
   {
       zenity --info --no-wrap --text="File $F does not exist"
   }
   else
   {
       zenity --question --no-wrap \
           --text="Add $COUNT items from $F to Wunderlist?"
       ANSWER=$?

       if [ "$ANSWER" = "0" ]; then
       {
           nonblank "$F" | \
               wunderline add --stdin | \
               zenity --progress --text "Adding $COUNT items to Wunderlist"
           SUCCEEDED=$?
           if [ "$SUCCEEDED" = "0" ]; then
           {
               zenity --info --no-wrap --text "Added $COUNT items."
           }
           else
           {
               zenity --error --no-wrap \
                   --text "Failed to add some or all of these items."
           }; fi
       }; fi
   }; fi
}; done


Originally posted at 2018-09-06 18:53:04+00:00. Automatically generated from the original post : apologies for the errors introduced.


original post

-- Response ended

-- Page fetched on Sun May 19 03:45:27 2024