Tuesday, February 28, 2012

vnote to text converter

I sometimes want the vnotes from my Androd Galaxy on my laptop. The file transfer is trivial, but the notes are sent in vnote 1.1 format.

I only want the note text, so I need to strip away the meta-info. Also, the text contains the unicode control characters =0A and =0D. I prefer to have line feeds.

The following BASH pipeline does the job:

grep 'BODY' $1 | awk -F: '{$1="";print $0}' | sed -e 's/=0D//g' -e 's/=0A/\n/g'

where the $1 in the grep command refers to the vnote I want to extract.

I save the script in a file (vnoteextracter.sh) and make it executable.

Results are written to the command line.

No comments:

Post a Comment