OpenWrt/Google Calendar: Difference between revisions

From Wiki
(Die Seite wurde neu angelegt: „<pre> #!/bin/sh # COMPORT=/dev/ttyATH0 rm /tmp/google_calendar.xml wget -O /tmp/google_calendar.xml "http://www.google.com/calendar/feeds/{xxx}.calendar.googl…“)
 
No edit summary
 
Line 1: Line 1:
== manual from xml ==
<pre>
<pre>
#!/bin/sh
#!/bin/sh
Line 6: Line 7:
rm /tmp/google_calendar.xml
rm /tmp/google_calendar.xml
wget -O /tmp/google_calendar.xml "http://www.google.com/calendar/feeds/{xxx}.calendar.google.com/private-{xxx}/basic?futureevents=true&orderby=starttime&sortorder=ascending&max-results=1&singleevents=true"
wget -O /tmp/google_calendar.xml "http://www.google.com/calendar/feeds/{xxx}.calendar.google.com/private-{xxx}/basic?futureevents=true&orderby=starttime&sortorder=ascending&max-results=1&singleevents=true"
string=`cat /tmp/google_cal.xml` # load xml file
string=${string#*startTime} # search for "startTime
string=${string%+*} # remove everything after +
string=${string#*\"*\"} # remove everything before "
string=${string%.*} # remove everything after .
echo
echo $string
echo


</pre>
</pre>
== gcalcli ==
* opkg install python
* Download
** python-setuptools
** python-gdata
** python-dateutil
** python-openssl
** (python-elementtree)
** python-expat

Latest revision as of 18:28, 12 November 2012

manual from xml

#!/bin/sh
#
COMPORT=/dev/ttyATH0

rm /tmp/google_calendar.xml
wget -O /tmp/google_calendar.xml "http://www.google.com/calendar/feeds/{xxx}.calendar.google.com/private-{xxx}/basic?futureevents=true&orderby=starttime&sortorder=ascending&max-results=1&singleevents=true"

string=`cat /tmp/google_cal.xml`	# load xml file
string=${string#*startTime}		# search for "startTime
string=${string%+*}			# remove everything after +
string=${string#*\"*\"}			# remove everything before "
string=${string%.*}			# remove everything after .

echo
echo $string
echo


gcalcli

  • opkg install python
  • Download
    • python-setuptools
    • python-gdata
    • python-dateutil
    • python-openssl
    • (python-elementtree)
    • python-expat