{"id":653,"date":"2014-12-18T16:50:52","date_gmt":"2014-12-18T12:50:52","guid":{"rendered":"http:\/\/irenica.com\/?p=653"},"modified":"2015-04-17T01:01:47","modified_gmt":"2015-04-16T21:01:47","slug":"budilnik-s-google","status":"publish","type":"post","link":"https:\/\/irenica.com\/?p=653","title":{"rendered":"\u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u0441 google"},"content":{"rendered":"<p>\u0411\u0443\u0434\u0443 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u0430. \u041d\u0430\u043a\u043b\u0435\u043f\u0430\u043b\u0430 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043d\u0430 \u0431\u0430\u0448\u0435. <\/p>\n<p>\u0427\u0442\u043e \u0443\u043c\u0435\u0435\u0442 &#8212; \u0432\u0435\u0449\u0430\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u043c \u0433\u0443\u0433\u043b\u0430 \u043f\u043e\u0433\u043e\u0434\u0443 \u0441 \u0440\u0430\u043c\u0431\u043b\u0435\u0440\u0430. \u0423 \u043d\u0438\u0445 \u0442\u0430\u043c \u0432\u0441\u044f\u043a\u0438\u0435 \u043c\u0438\u043b\u044b\u0435 \u0444\u0440\u0430\u0437\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u044e\u0442, \u0432 \u0434\u0443\u0445\u0435 &#171;\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0448\u0430\u0440\u0444&#187;, &#171;\u043e\u0434\u0435\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0442\u0435\u043f\u043b\u0435\u0435&#187;. \u041c\u0438\u043b\u043e\u0442\u0430.<br \/>\n\u0418 \u0435\u0449\u0435 \u0433\u0440\u0435\u043f\u0430\u0435\u0442 \u043f\u043e \u0442\u0432\u0438\u0442\u0442\u0435\u0440\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0447\u043f \u0432 \u043c\u0435\u0442\u0440\u043e \u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u043f\u043e\u0432\u0435\u0441\u0442\u0438\u0442 \u043c\u0435\u043d\u044f \u0441 \u0443\u0442\u0440\u0430 \u043e\u0431 \u044d\u0442\u043e\u043c. \u0411\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u0439 \u043f\u043e\u0432\u043e\u0434 \u0434\u043e\u043c\u0430 \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 mplayer. \u0410 \u0436\u0438\u0432\u0435\u0442 \u044d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u0438\u043a\u0435. <\/p>\n<p>\u0421\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. 1 \u043f\u0430\u0440\u0441\u0438\u0442 \u0438 \u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u043e\u0433\u043e\u0434\u0443, \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u0441\u0438\u0442 \u043c\u0435\u0442\u0440\u043e, \u0432 \u043a\u0440\u043e\u043d \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0430.<\/p>\n<p>\u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043f\u043e\u0433\u043e\u0434\u044b \u0438 \u0447\u0442\u0435\u043d\u0438\u044f<br \/>\n<code>#!\/bin\/bash <\/p>\n<p>n=`curl http:\/\/weather.rambler.ru\/ | cat -n  | grep \"dayName: '\u0441\u0435\u0433\u043e\u0434\u043d\u044f'\" | awk '{print $1}'`;<br \/>\nlet \"n = $n - 1\";<br \/>\ntxt=`curl http:\/\/weather.rambler.ru\/ | cat -n | sed -n \"$n,135 p\"`<\/p>\n<p>day=`echo $txt | tr \",\" \"\\n\" | awk '{ sub($1.\" \",\"\"); print $0 }' | grep -E \"^day:\" | awk '{print $2}'`<br \/>\nmonth=`echo $txt | tr \",\" \"\\n\" | awk '{ sub($1.\" \",\"\"); print $0 }' | grep -E \"month:\" | awk '{print $2}' | sed -e \"s;';;g;\/^$\/d\"`<br \/>\ndayname=`echo $txt | tr \",\" \"\\n\" | awk '{ sub($1.\" \",\"\"); print $0 }' | grep -E \"weekday:\" | awk '{print $2}' | sed -e \"s;';;g;\/^$\/d\"`<br \/>\ndescription=`echo $txt | tr \",\" \"\\n\" | awk '{ sub($1.\" \",\"\"); print $0 }' | grep -E \"description:\" | sed -e \"s;';;g;\/^$\/d\" | awk '{ sub($1.\" \",\"\"); print $0 }'`<br \/>\nwet=`echo $txt | tr \"{\" \"\\n\"  | grep \u0412\u0435\u0442\u0435\u0440 | sed -e 's;.*speed: ;;g' | awk '{print $1}' | head -1`<br \/>\ntoolTip=`echo $txt | tr \",\" \"\\n\" | awk '{ sub($1.\" \",\"\"); print $0 }' | grep -E \"toolTip\" | sed -e \"s;';;g;\/^$\/d\" | awk '{ sub($1.\" \",\"\"); print $0 }' | tr \"\\n\" \" \" | sed -e 's;.*\\.;;g'`<br \/>\ntoolTip1=`echo $txt | tr \",\" \"\\n\" | awk '{ sub($1.\" \",\"\"); print $0 }' | grep -E \"toolTip\" | sed -e \"s;';;g;\/^$\/d\" | awk '{ sub($1.\" \",\"\"); print $0 }' | tr \"\\n\" \" \" | sed -e 's;\\..*;;g'`<br \/>\nif [ \"$dayname\" == \"\u043f\u043d\" ]<br \/>\nthen<br \/>\n  dayname=\"\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a\"<br \/>\nfi<\/p>\n<p>if [ \"$dayname\" == \"\u0432\u0442\" ]<br \/>\nthen<br \/>\n  dayname=\"\u0432\u0442\u043e\u0440\u043d\u0438\u043a\"<br \/>\nfi<\/p>\n<p>if [ \"$dayname\" == \"\u0441\u0440\" ]<br \/>\nthen<br \/>\n  dayname=\"\u0441\u0440\u0435\u0434\u0430\"<br \/>\nfi<\/p>\n<p>if [ \"$dayname\" == \"\u0447\u0442\" ]<br \/>\nthen<br \/>\n  dayname=\"\u0447\u0435\u0442\u0432\u0435\u0440\u0433\"<br \/>\nfi<\/p>\n<p>if [ \"$dayname\" == \"\u043f\u0442\" ]<br \/>\nthen<br \/>\n  dayname=\"\u043f\u044f\u0442\u043d\u0438\u0446\u0430\"<br \/>\nfi<\/p>\n<p>if [ \"$dayname\" == \"\u0441\u0431\" ]<br \/>\nthen<br \/>\n  dayname=\"\u0441\u0443\u0431\u0431\u043e\u0442\u0430\"<br \/>\nfi<\/p>\n<p>if [ \"$dayname\" == \"\u0432\u0441\" ]<br \/>\nthen<br \/>\n  dayname=\"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435\"<br \/>\nfi<br \/>\nmin=`echo $txt | tr \"}\" \"\\n\" | cat -n |  grep \" t: {\" | tr \",\" \"\\n\" | grep min | sed -e 's;.*min:;;g'`<br \/>\nmax=`echo $txt | tr \"}\" \"\\n\" | cat -n |  grep \" t: {\" | tr \",\" \"\\n\" | grep max | awk '{print $3}'`<\/p>\n<p>count=`cat ~\/weather\/metro.info | sort | uniq | wc -l`<\/p>\n<p>mplayer ~\/weather \/1.mp3<br \/>\nmplayer \"http:\/\/translate.google.com\/translate_tts?tl=ru&ie=UTF-8&q=\u0441\u0435\u0433\u043e\u0434\u043d\u044f $dayname, $day $month\"<br \/>\nmplayer \"http:\/\/translate.google.com\/translate_tts?tl=ru&ie=UTF-8&q=\u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043e\u0442 $min \u0434\u043e $max, \u0412\u0435\u0442\u0435\u0440 $wet \u043c\/\u0441.\"<br \/>\nmplayer \"http:\/\/translate.google.com\/translate_tts?tl=ru&ie=UTF-8&q=$description\"<br \/>\nmplayer \"http:\/\/translate.google.com\/translate_tts?tl=ru&ie=UTF-8&q=$toolTip1\"<br \/>\nmplayer \"http:\/\/translate.google.com\/translate_tts?tl=ru&ie=UTF-8&q=$toolTip\"<br \/>\nmplayer \/root\/weather\/1.mp3<br \/>\nif [ \"$count\" -ge  \"5\" ]<br \/>\nthen<br \/>\nmplayer \"http:\/\/translate.google.com\/translate_tts?tl=ru&ie=UTF-8&q=\u043c\u0435\u0442\u0440\u043e \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c, \u0441\u043c\u043e\u0442\u0440\u0438 \u0442\u0432\u0438\"<br \/>\nmplayer ~\/weather\/1.mp3<br \/>\nfi<\/p>\n<p>:>~\/weather\/metro.info<br \/>\n<\/code><\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043c\u0435\u0442\u0440\u043e. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0438 \u0441\u0442\u0440\u0430\u0448\u043d\u0430\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0430. <\/p>\n<p><code>#!\/bin\/bash<\/p>\n<p>curl -ssl \"https:\/\/twitter.com\/search?f=realtime&q=%23%D0%BC%D0%B5%D1%82%D1%80%D0%BE&src=typd\" | grep -E -o \"js-tweet-text tweet-text.*< \\\/p>\" | sed -e 's;[>< \\\"=-]; ;g;s;js tweet text tweet text  lang  ru  data aria label part  0;;g;s;\/a;;g;s;\\\/\\(a\\|p\\); ;g;s;\\(.span\\|.strong\\|class\\|twitter\\|timeline\\|link\\|js display url\\|invisible|\\tco ellipsis\\|href\\|nofollow\\|dir\\|ltr\\|data\\|expanded\\|url\\|invisible\\|tco\\|ellipsis\\|google&#038;amp\\;utm_medium\\|banner&#038;amp\\;utm_campaign\\|business_news\\|target\\|_blank\\|title\\|atreply\\|pretty\\|&#038;nbsp\\;\\|rel\\|s\\|?utm_source\\|draggable\\|false\\|alt\\|aria\\|label\\|u\\|hidden\\|pre\\|embedded|\\true\\|b\\|a\\|qery\\|orce\\|hahtag_click\\|hahtag\\|j\\|nav\\|emedded\\|tre\\|&#038;qot\\;\\|emedded\\|tre\\|rc\\|hh\\|qery\\|orce\\|hhtg_click\\|hhtg\\|img\\);;g;s;     ; ;g;s;&#038;#10\\; ;;g;s;&#038;qot\\;;;g;s;emedded;;g;s;tre;;g;s; \\\/ ;;g;s;hhtg_click hhtg;;g;s;hh;;g;s;qery oe;;g;s;\\\/tg\\\/[a-zA-Z]*;;g;s;tweet;;g;s;text;;g;s;lng;;g;s;nd;;g;s;prt;;g;s;#;;g;s;http:\/\/intgrm.com\\s\\\/[a-zA-Z0-9]*\\\/;;g;s; http:\/\/intgrm.com;;g;s;http:\/\/   intgrm.com \\\/;;g;s;%[a-zA-Z0-9%]*?;;g;s;  *; ;g' | grep -E -i  \"\u0436\u0435\u0440\u0442\u0432|\u0430\u0432\u0430\u0440\u0438|\u0427\u041f|\u0447\u043f|\u043d\u0435\u043f\u043e\u043b\u0430\u0434\u043a\u0438|\u043f\u0435\u0440\u0435\u0431\u043e\u0438|\u043b\u0438\u043a\u0432\u0438\u0434\u0430\u0446\u0438|\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b|\u0441\u0432\u0435\u0442\u043e\u0444\u043e\u0440|\u0441\u0442\u0440\u0435\u043b\u043a\u0430|\u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430|\u0447\u0430\u0441 \u043f\u0438\u043a|\u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442|\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d|\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b|\u043d\u0435 \u0445\u043e\u0434\u044f\u0442|\u0440\u0435\u043c\u043e\u043d\u0442|\u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e|\u0441\u0431\u043e\u0439|\u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432|\u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f \u043f\u043e\u0435\u0437\u0434|\u0431\u043e\u043c\u0431|\u0432\u0437\u0440\u044b\u0432|\u0442\u0435\u0440\u0430\u043a\u0442|\u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d|\u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\" >> ~\/weather\/metro.info<\/code><\/p>\n<p>\u0432 \u0440\u043e\u043b\u0438 1.mp3 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0437\u0432\u0443\u043a, \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f<\/p>\n<p>https:\/\/www.youtube.com\/watch?v=CEKR-RcRTOA<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0411\u0443\u0434\u0443 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u0430. \u041d\u0430\u043a\u043b\u0435\u043f\u0430\u043b\u0430 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043d\u0430 \u0431\u0430\u0448\u0435. \u0427\u0442\u043e \u0443\u043c\u0435\u0435\u0442 &#8212; \u0432\u0435\u0449\u0430\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u043c \u0433\u0443\u0433\u043b\u0430 \u043f\u043e\u0433\u043e\u0434\u0443 \u0441 \u0440\u0430\u043c\u0431\u043b\u0435\u0440\u0430. \u0423 \u043d\u0438\u0445 \u0442\u0430\u043c \u0432\u0441\u044f\u043a\u0438\u0435 \u043c\u0438\u043b\u044b\u0435 \u0444\u0440\u0430\u0437\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u044e\u0442, \u0432 \u0434\u0443\u0445\u0435 &#171;\u043d\u0435\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159],"tags":[154,15,153],"class_list":["post-653","post","type-post","status-publish","format-standard","hentry","category-google-budilnik","tag-cron","tag-linux-2","tag-metro"],"_links":{"self":[{"href":"https:\/\/irenica.com\/index.php?rest_route=\/wp\/v2\/posts\/653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irenica.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irenica.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irenica.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/irenica.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=653"}],"version-history":[{"count":2,"href":"https:\/\/irenica.com\/index.php?rest_route=\/wp\/v2\/posts\/653\/revisions"}],"predecessor-version":[{"id":789,"href":"https:\/\/irenica.com\/index.php?rest_route=\/wp\/v2\/posts\/653\/revisions\/789"}],"wp:attachment":[{"href":"https:\/\/irenica.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irenica.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irenica.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}