Changes

From Amahi Wiki
Jump to: navigation, search
3 bytes removed ,  00:07, 29 May 2020
==Weather==
<pre>#!/bin/sh
 
METRIC<nowiki>=</nowiki>0 # 0 for F, 1 for C
# Find your own code at the end of the url here http://www.accuweather.com/rss-center.asp
# If code has a space; replace with %20
LOCCOD<nowiki>=</nowiki>"95113" #Example: ASI<nowiki>|</nowiki>RU<nowiki>|</nowiki>RS055<nowiki>|</nowiki>NIZHNY%20NOVGOROD
 
if [ -z $1 ] && [ -x $LOCCOD ] ; then
echo
LOCCOD<nowiki>=</nowiki>$1
fi
 
curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\<nowiki>=</nowiki>${METRIC}\&locCode\<nowiki>=</nowiki>$LOCCOD \
<nowiki>|</nowiki> sed -n '/Currently:/ s/.*: \(.*\): \([0-9]*\)\([CF]\).*/\2°\3, \1/p'</pre>
12,424

edits