Revision: 1513
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1513&view=rev
Author: jcsjcs
Date: 2007-05-31 07:43:57 -0700 (Thu, 31 May 2007)
Log Message:
-----------
* scripts/sync-tomboy.sh
scripts/sync-notes.sh: fixes by Oliver Sherouse
* scripts/sync-abook.sh
scripts/sync-webcalendar.sh:
set more reasonable default path.
Modified Paths:
--------------
gtkpod/trunk/ChangeLog_detailed
gtkpod/trunk/scripts/sync-abook.sh
gtkpod/trunk/scripts/sync-notes.sh
gtkpod/trunk/scripts/sync-tomboy.sh
gtkpod/trunk/scripts/sync-webcalendar.sh
Modified: gtkpod/trunk/ChangeLog_detailed
===================================================================
--- gtkpod/trunk/ChangeLog_detailed 2007-05-31 14:02:42 UTC (rev 1512)
+++ gtkpod/trunk/ChangeLog_detailed 2007-05-31 14:43:57 UTC (rev 1513)
@@ -3,6 +3,13 @@
* src/autodetection.c: fix non-responsive buttons introduced
with automounting.
+ * scripts/sync-tomboy.sh
+ scripts/sync-notes.sh: fixes by Oliver Sherouse
+
+ * scripts/sync-abook.sh
+ scripts/sync-webcalendar.sh:
+ set more reasonable default path.
+
2007-05-30 P.G. Richardson <phantom_sf at users.sourceforge.net>
* display_coverart.c
Modified: gtkpod/trunk/scripts/sync-abook.sh
===================================================================
--- gtkpod/trunk/scripts/sync-abook.sh 2007-05-31 14:02:42 UTC (rev 1512)
+++ gtkpod/trunk/scripts/sync-abook.sh 2007-05-31 14:43:57 UTC (rev 1513)
@@ -10,7 +10,7 @@
# with the following defaults:
IPOD_MOUNT='/mnt/ipod' # mount point of ipod
-DATAFILE='/home/daniel/.abook/addressbook' # the abook db
+DATAFILE='~/.abook/addressbook' # the abook db
ENCODING_FROM=UTF-8 # encoding used by abook
ENCODING=ISO-8859-15 # encoding used by ipod
@@ -38,6 +38,10 @@
# 2005/06/15 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
# Received original script from Daniel Kercher and added character
# conversion and command line options.
+#
+# 2007/05/31 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
+# Set a more reasonable default datafile.
+#
# overwrite default settings with optional command line arguments
while getopts i:d:e:f: option; do
Modified: gtkpod/trunk/scripts/sync-notes.sh
===================================================================
--- gtkpod/trunk/scripts/sync-notes.sh 2007-05-31 14:02:42 UTC (rev 1512)
+++ gtkpod/trunk/scripts/sync-notes.sh 2007-05-31 14:43:57 UTC (rev 1513)
@@ -4,16 +4,16 @@
# Usage:
#
-# sync-notes.sh [-i <ipod mountpoint>] [-p <path to folder containing notes
(~/ipod_notes by default)>]
+# sync-notes.sh [-i <ipod mountpoint>] [-d <path to folder containing notes
(~/ipod_notes by default)>]
# ... [-e <encoding>]
#
# with the following defaults:
-IPOD_MOUNT=/media/PERLIPOD # mountpoint of ipod
-NOTESPATH=~/Desktop/Notizen # path to folder containing notes
-ENCODING=ISO-8859-15 # encoding used by ipod
+IPOD_MOUNT=/media/ipod # mountpoint of ipod
+NOTESPATH=~/Desktop/notes # path to folder containing notes
+ENCODING=ISO-8859-15 # encoding used by ipod
-# Unless called with "-e none" this script requires "iconv" available
+# Unless called with "-e=none" this script requires "iconv" available
# from http://www.gnu.org/software/libiconv/
# About the encoding used by the iPod (by Jorg Schuler):
@@ -50,7 +50,7 @@
# Added Usage-line, added check for vcard file, rearranged source
#
# 2004/07/03 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
-# Made "iconv" optional (call with "-e none")
+# Made "iconv" optional (call with "-e=none")
#
# Removed "dos2unix" as my iPod (firmware 1.3) happily accepted
# DOS-type vcards as well. Instead changed the "grep" pattern to
@@ -70,7 +70,13 @@
# 2005/06/12 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
# * added patch by Alexey Dokuchaev to replace recode by iconv
# * changed check for recode to check of iconv
+#
+# 2007/05/31 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
+# Corrections By Oliver Sherouse <oliver.sherouse AT gmail DOT com>
+# (replaced some arithmetic expressions), fixed "-e=none", correctly
+# indicate "-d" in 'usage' instead of "-p")
+
# overwrite default settings with optional command line arguments
while getopts i:d:e: option; do
case $option in
@@ -122,8 +128,8 @@
find -type f |
(
read FILE
- while [ "$?" == "0" ]; do
- ((++I))
+ while [ "$?" = "0" ]; do
+ I=`expr $I + 1`
mkdir -p "$IPOD_MOUNT/Notes/`dirname "$FILE"`/"
cat "$FILE" | $RECODE > "$IPOD_MOUNT/Notes/$FILE"
read FILE
Modified: gtkpod/trunk/scripts/sync-tomboy.sh
===================================================================
--- gtkpod/trunk/scripts/sync-tomboy.sh 2007-05-31 14:02:42 UTC (rev 1512)
+++ gtkpod/trunk/scripts/sync-tomboy.sh 2007-05-31 14:43:57 UTC (rev 1513)
@@ -6,16 +6,16 @@
# Usage:
#
-# sync-notes.sh [-i <ipod mountpoint>] [-p <path to folder containing notes
(~/ipod_notes by default)>]
+# sync-notes.sh [-i <ipod mountpoint>] [-d <path to folder containing notes
(~/ipod_notes by default)>]
# ... [-e <encoding>]
#
# with the following defaults:
-IPOD_MOUNT=/media/disk-1 # mountpoint of ipod
+IPOD_MOUNT=/media/ipod # mountpoint of ipod
NOTESPATH=~/.tomboy # path to folder containing notes
-ENCODING=ISO-8859-15 # encoding used by ipod
+ENCODING=ISO-8859-15 # encoding used by ipod
-# Unless called with "-e none" this script requires "iconv" available
+# Unless called with "-e=none" this script requires "iconv" available
# from http://www.gnu.org/software/libiconv/
# About the encoding used by the iPod (by Jorg Schuler):
@@ -52,7 +52,7 @@
# Added Usage-line, added check for vcard file, rearranged source
#
# 2004/07/03 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
-# Made "iconv" optional (call with "-e none")
+# Made "iconv" optional (call with -e="none")
#
# Removed "dos2unix" as my iPod (firmware 1.3) happily accepted
# DOS-type vcards as well. Instead changed the "grep" pattern to
@@ -72,6 +72,11 @@
# 2005/06/12 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
# * added patch by Alexey Dokuchaev to replace recode by iconv
# * changed check for recode to check of iconv
+#
+# 2007/05/31 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
+# Corrections By Oliver Sherouse <oliver.sherouse AT gmail DOT com>
+# (replaced some arithmetic expressions, improved conversion, correctly
+# indicate "-d" in 'usage' instead of "-p")
# overwrite default settings with optional command line arguments
while getopts i:d:e: option; do
@@ -124,8 +129,8 @@
ls *.note |
(
read FILE
- while [ "$?" == "0" ]; do
- ((++I))
+ while [ "$?" = "0" ]; do
+ I=`expr $I + 1`
# Get the starting and ending lines for the data
LIMITS=`cat $FILE | grep -n note-content | cut -d ":" -f 1 | tr "\n" "
"`
@@ -138,10 +143,10 @@
# Get the Lines with the useful data
DATA=`cat "$FILE" | cut -d "
-" -f $((START+2))-$END`
+" -f $(( $START + 2 ))-$END`
# Strip the tomboy stuff :(
- for i in "<\/note-content>" "<\/text>" "<link:broken>"
"<\/link:broken>" "<link:internal>" "<\/link:internal>" "<link:external>"
"<\/link:external>"; do
+ 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
Modified: gtkpod/trunk/scripts/sync-webcalendar.sh
===================================================================
--- gtkpod/trunk/scripts/sync-webcalendar.sh 2007-05-31 14:02:42 UTC (rev
1512)
+++ gtkpod/trunk/scripts/sync-webcalendar.sh 2007-05-31 14:43:57 UTC (rev
1513)
@@ -10,8 +10,8 @@
# mount point of ipod
IPOD_MOUNT='/mnt/ipod'
-# uri for webcalendar
-DATAFILE='
https://native.intern.net/projekte/webcalendar/publish.php/daniel.ics'
+# uri for webcalendar (example)
+DATAFILE='https://somewhere.local/calendar.ics'
# calendar name
CALENDAR='webcalendar'
# special options for wget
@@ -42,6 +42,9 @@
# Received original script from Daniel Kercher and added command line
# options
#
+# 2007/05/31 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>):
+# Set a more reasonable default datafile.
+#
# FIXME: some way to convert the character set
# overwrite default settings with optional command line arguments
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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2