Revision: 1799
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1799&view=rev
Author:   jcsjcs
Date:     2007-11-23 00:36:05 -0800 (Fri, 23 Nov 2007)

Log Message:
-----------
    Fixes by Javier Kohen: "First, it escapes the mount point to allow
    white space in it. Second, it removes tags from the whole note
    contents so that links in the title don't end up in the file
    name. Last, but not least, colons are converted to hyphens, since
    the former are not valid characters in the FAT family of file
    systems, which the iPod uses."

Modified Paths:
--------------
    gtkpod/trunk/ChangeLog_detailed
    gtkpod/trunk/scripts/sync-tomboy.sh

Modified: gtkpod/trunk/ChangeLog_detailed
===================================================================
--- gtkpod/trunk/ChangeLog_detailed     2007-11-17 16:12:06 UTC (rev 1798)
+++ gtkpod/trunk/ChangeLog_detailed     2007-11-23 08:36:05 UTC (rev 1799)
@@ -1,3 +1,14 @@
+2007-11-23 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+  * scripts/sync-tomboy.sh:
+
+    Fixes by Javier Kohen: "First, it escapes the mount point to allow
+    white space in it. Second, it removes tags from the whole note
+    contents so that links in the title don't end up in the file
+    name. Last, but not least, colons are converted to hyphens, since
+    the former are not valid characters in the FAT family of file
+    systems, which the iPod uses."
+
 2007-11-17 Jorg Schuler <jcsjcs at users.sourceforge.net>
 
   * src/display_spl.c:

Modified: gtkpod/trunk/scripts/sync-tomboy.sh
===================================================================
--- gtkpod/trunk/scripts/sync-tomboy.sh 2007-11-17 16:12:06 UTC (rev 1798)
+++ gtkpod/trunk/scripts/sync-tomboy.sh 2007-11-23 08:36:05 UTC (rev 1799)
@@ -110,7 +110,7 @@
 fi
 
 # check if iPod mountpoint exists
-if [ ! -d $IPOD_MOUNT/Notes ]; then
+if [ ! -d "$IPOD_MOUNT/Notes" ]; then
     echo "Error: Cannot find iPod at $IPOD_MOUNT"
     exit 1
 fi
@@ -120,7 +120,7 @@
 # Seeing all notes should be under 4K, easier to delete and recopy rather than 
checking all files sizes
 
 echo -n "Syncing iPod ... [Notes] "
-rm -rf $IPOD_MOUNT/Notes/*
+rm -rf "$IPOD_MOUNT/Notes/*"
 rm -f $NOTESPATH/*~
 cd $NOTESPATH
 
@@ -137,19 +137,21 @@
        START=`echo $LIMITS | cut -d " " -f 1`
        END=`echo $LIMITS | cut -d " " -f 2`
 
-       # Get the notes titles, we can use this as the filename
-       TITLE=`cat "$FILE" | cut -d "
-" -f $START | cut -d ">" -f 3`
-       
-       # Get the Lines with the useful data
-       DATA=`cat "$FILE" | cut -d "
-" -f $(( $START + 2 ))-$END`
+       DATA=`cat "$FILE"`
 
        # Strip the tomboy stuff :(
        for i in "<\/note-content>" "<\/text>" "<link:broken>" 
"<\/link:broken>" "<link:internal>" "<\/link:internal>" "<link:external>" 
"<\/link:external>" "<\/list>" "<list>" "<\/list-item>" "<list-item 
dir=\"ltr\">"; do
                DATA=`printf "$DATA" | sed "s/$i//g"`
        done
 
+       # Get the notes titles, we can use this as the filename
+       TITLE=`echo "$DATA" | cut -d "
+" -f $START | cut -d ">" -f 3 | tr : -`
+
+       # Get the Lines with the useful data
+       DATA=`echo "$DATA" | cut -d "
+" -f $(( $START + 2 ))-$END`
+
        printf "$DATA" | $RECODE > "$IPOD_MOUNT/Notes/$TITLE"
 
        read FILE


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to