Tip: Sincronizar diferentes calendarios en iPod
30 ~ diciembre ~ 08 a las 17:08 | Publicado en Apple, Herramientas de Trabajo, Programación, Tecnología, TIP | 1 comentarioEtiquetas: calendarios, ipod, script, sincronizar
Hace cuatro días me regalé para navidades un fabuloso iPod nano 4rta generación como el de la foto pero en negro.
El caso, es que tras intentar varios programas de sincronización terminé usando el gtkpod y el songbird a la par. El Songbird para música i el gtkpod para imágenes, vídeos y notas y calendarios.
Pero tras ver que no había manera de poder poner diferentes calendarios en el ipod a través del gtkpod me decidí a hacer algo. Así que terminal en pantalla i a hacer-lo!
Lo primero de todo es decir-os que no hace falta tener el gtkpod para usar este script ya que tan solo utiliza bash, asi que si sois fans de amarok, songbird o cualquiera de estos no problemo amigo.
El primer archivo a crear va a ser el de sincronización de calendarios tal como este tiene que quedar:
sudo gedit calendario.sh #!/bin/sh # (c) 2005 Daniel Kercher # sync ipod with webcalendar # Usage: # # sync-webcalendar.sh [-i <ipod mountpoint>] [-d <webcalendar uri>] [-c <calendar name>] # # with the following defaults: # mount point of ipod IPOD_MOUNT='/media/IPOD' # uri for webcalendar (example) DATAFILE='https://somewhere.local/calendar.ics' # calendar name CALENDAR='webcalendar' # special options for wget WGET_OPTIONS='--no-check-certificate' # About the encoding used by the iPod (by Jorg Schuler): # # For some reason the encoding used for the contact files and # calenader files depends on the language you have set your iPod # to. If you set your iPod to German, iso-8859-15 (or -1?) is # expected. If you set it to Japanese, SHIFT-JIS is expected. You need # to reboot the iPod to have the change take effect, however. (I'm # using firmware version 1.3.) # # If you know of more encodings, please let me know, so they can be # added here: # # iPod language encoding expected # ---------------------------------------- # German ISO-8859-15 # Japanese SHIFT-JIS # Changelog # # 2007/02/01 (Giray Devlet <giray@devlet.cc>): Multi Calendar Support # # 2005/06/15 (Jorg Schuler <jcsjcs at users dot sourceforge dot net>): # 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 while getopts i:d:c: option; do case $option in i) IPOD_MOUNT=$OPTARG;; d) DATAFILE=$OPTARG;; c) CALENDAR=$OPTARG;; \?) echo "Usage: `basename $0` [-i <ipod mountpoint>] [-d <webcalendar uri>] [-c <calendar_name>]" exit 1;; esac done echo -n "Syncing Web Calendar \"${CALENDAR}\" to iPod... " wget -q $WGET_OPTIONS -O ${IPOD_MOUNT}/Calendars/${CALENDAR}.ics $DATAFILE echo "done!"
A destacar:
IPOD_MOUNT = es la dirección donde tenéis el IPOD montado, usualmente /media/ipod
DATAFILE = Dirección web del calendario .ics
CALENDAR = El nombre que queréis que reciba el calendario en vuestro iPod, tan solo el nombre del archivo.
Este archivo deberéis guardarlo con un nombre facil de recordar(trabajo.sh, citas.sh, aniversarios.sh…)
Y ya para terminar creamos un ultimo archivo que llame a todos estos.
sudo gedit sincronizar_calendarios.sh #!/bin/sh ./trabajo.sh ./citas.sh ./aniversarios.sh
Le damos permisos de ejecucion:
sudo chmod +x sincronizar_calendarios.sh
Y lo ejecutamos
sh sincronizar_calendarios.sh
El resultado seria algo asi en el terminal:
Syncing Web Calendar "examens" to iPod... /media/IPOD/Calendars/examens.ics: Done!
Y todos los calendarios bien soncronizados con nuestro querido iPod, ahora si queremos que el gtkpod(por ejemplo) nos actualize todos los archivos tan solo debemos indicar-le este script en las opciones de sincronizacion.
Gracias a dani por su ayuda!
1 comentario »
RSS feed for comments on this post. TrackBack URI
Responder
Blog de WordPress.com.
Entries y comentarios feeds.
Then it is important to apply general amount involving any medical cream like Clearasil on your own face.
Once your mole is dry, cut a piece of duct tape three times the size of the mole.
Make certain that the information you get is genuine in order that you
can effectively do away with your warts.
Comment by Wart Removal— 3 ~ mayo ~ 13 #