[{"data":1,"prerenderedAt":452},["ShallowReactive",2],{"i-lucide:menu":3,"i-lucide:arrow-up-right":8,"i-lucide:moon":10,"i-lucide:sun":12,"i-lucide:rss":14,"i-simple-icons:github":16,"i-simple-icons:linkedin":18,"post-\u002F2010\u002F43things-tip":21,"surround-\u002F2010\u002F43things-tip":57,"i-lucide:arrow-left":66,"i-lucide:arrow-right":68,"gist-2656909":70},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M7 7h10v10M7 17L17 7\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":11},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":13},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"12\" r=\"4\"\u002F>\u003Cpath d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":15},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16\"\u002F>\u003Ccircle cx=\"5\" cy=\"19\" r=\"1\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":17},"\u003Cpath fill=\"currentColor\" d=\"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":19,"hidden":20},"\u003Cpath fill=\"currentColor\" d=\"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z\"\u002F>",true,{"id":22,"title":23,"body":24,"category":39,"comments":40,"date":41,"description":30,"excerpt":40,"extension":42,"image":40,"meta":43,"navigation":20,"path":44,"readingTime":45,"seo":46,"stem":47,"subtitle":40,"tags":48,"wordCount":55,"__hash__":56},"posts\u002F2010\u002F43things-tip.md","43things-tip",{"type":25,"value":26,"toc":35},"minimark",[27,31],[28,29,30],"p",{},"A script to display a random goal from 43things.com in Ubuntu's Notify-OSD. Set it up to start on login and you'll get a new goal every day.",[32,33],"gist",{"id":34},"2656909",{"title":36,"searchDepth":37,"depth":37,"links":38},"",2,[],"Projects",null,"2010-07-13","md",{},"\u002F2010\u002F43things-tip","less than 1 minute",{"title":23,"description":30},"2010\u002F43things-tip",[49,50,51,52,53,54],"python","script","tarkvara","Ubuntu","43things","notify",29,"XXyqSBFnlshHRzHHzIWi7-ijxPNOgZw44B6SrashYXg",[58,62],{"title":59,"path":60,"stem":61,"children":-1},"A Python script to fetch info from an URL (Regular expression matching)","\u002F2010\u002Fa-python-script-to-fetch-info-from-an-url-regular-expression-matching","2010\u002Fa-python-script-to-fetch-info-from-an-url-regular-expression-matching",{"title":63,"path":64,"stem":65,"children":-1},"Liitun selle avaliku kirjaga","\u002F2010\u002Fliitun-selle-avaliku-kirjaga","2010\u002Fliitun-selle-avaliku-kirjaga",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":67},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":69},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7l7 7l-7 7\"\u002F>",{"id":71,"title":30,"body":72,"createdAt":443,"description":36,"extension":42,"files":444,"gistId":34,"meta":445,"navigation":20,"owner":446,"path":447,"seo":448,"stem":449,"url":450,"__hash__":451},"gists\u002Fgists\u002F2656909.md",{"type":25,"value":73,"toc":441},[74,437],[75,76,80],"pre",{"className":77,"code":78,"filename":79,"language":49,"meta":36,"style":36},"language-python shiki shiki-themes github-light github-dark","#!\u002Fusr\u002Fbin\u002Fpython -tt\n\n# A script to display a random goal from 43things.com in Ubuntu's Notify-OSD. Set it up to start\n# on login and you'll get a new goal every day.\n# Author: A. Roots\n\nimport urllib, sys\nfrom xml.dom import minidom\nimport random\nimport pynotify\n\ndef main():\n\n  print 'Fetching today's tip...'\n  random.seed()\n  randomNumber = random.randint(1,3000000)\n  url = 'http:\u002F\u002Fwww.43things.com\u002Fservice\u002Fget_goal_by_id?api_key=2939451@43hKaaBzWkJ8&amp;id='+str(randomNumber)\n\n  xmlFile = urllib.urlopen(url).read()\n\n  dom = minidom.parseString(xmlFile)\n  objektid = dom.getElementsByTagName('name')\n  objekt = objektid[0].toxml()\n  objekt = objekt[6:]\n  objekt = objekt[:-7]\n\n  n = pynotify.Notification (\"You should...\", str(objekt))\n  n.show ()\n\n  print 'All done, exiting.'\n  sys.exit(0)\n\nif __name__ == '__main__':\n  main()\n","43_tips.py",[81,82,83,92,97,103,109,115,120,131,145,153,161,166,179,184,204,210,234,254,259,270,275,286,302,319,334,353,358,380,386,390,398,408,413,431],"code",{"__ignoreMap":36},[84,85,88],"span",{"class":86,"line":87},"line",1,[84,89,91],{"class":90},"sJ8bj","#!\u002Fusr\u002Fbin\u002Fpython -tt\n",[84,93,94],{"class":86,"line":37},[84,95,96],{"emptyLinePlaceholder":20},"\n",[84,98,100],{"class":86,"line":99},3,[84,101,102],{"class":90},"# A script to display a random goal from 43things.com in Ubuntu's Notify-OSD. Set it up to start\n",[84,104,106],{"class":86,"line":105},4,[84,107,108],{"class":90},"# on login and you'll get a new goal every day.\n",[84,110,112],{"class":86,"line":111},5,[84,113,114],{"class":90},"# Author: A. Roots\n",[84,116,118],{"class":86,"line":117},6,[84,119,96],{"emptyLinePlaceholder":20},[84,121,123,127],{"class":86,"line":122},7,[84,124,126],{"class":125},"szBVR","import",[84,128,130],{"class":129},"sVt8B"," urllib, sys\n",[84,132,134,137,140,142],{"class":86,"line":133},8,[84,135,136],{"class":125},"from",[84,138,139],{"class":129}," xml.dom ",[84,141,126],{"class":125},[84,143,144],{"class":129}," minidom\n",[84,146,148,150],{"class":86,"line":147},9,[84,149,126],{"class":125},[84,151,152],{"class":129}," random\n",[84,154,156,158],{"class":86,"line":155},10,[84,157,126],{"class":125},[84,159,160],{"class":129}," pynotify\n",[84,162,164],{"class":86,"line":163},11,[84,165,96],{"emptyLinePlaceholder":20},[84,167,169,172,176],{"class":86,"line":168},12,[84,170,171],{"class":125},"def",[84,173,175],{"class":174},"sScJk"," main",[84,177,178],{"class":129},"():\n",[84,180,182],{"class":86,"line":181},13,[84,183,96],{"emptyLinePlaceholder":20},[84,185,187,191,195,198,201],{"class":86,"line":186},14,[84,188,190],{"class":189},"sj4cs","  print",[84,192,194],{"class":193},"sZZnC"," 'Fetching today'",[84,196,197],{"class":129},"s tip",[84,199,200],{"class":189},"...",[84,202,203],{"class":193},"'\n",[84,205,207],{"class":86,"line":206},15,[84,208,209],{"class":129},"  random.seed()\n",[84,211,213,216,219,222,225,228,231],{"class":86,"line":212},16,[84,214,215],{"class":129},"  randomNumber ",[84,217,218],{"class":125},"=",[84,220,221],{"class":129}," random.randint(",[84,223,224],{"class":189},"1",[84,226,227],{"class":129},",",[84,229,230],{"class":189},"3000000",[84,232,233],{"class":129},")\n",[84,235,237,240,242,245,248,251],{"class":86,"line":236},17,[84,238,239],{"class":129},"  url ",[84,241,218],{"class":125},[84,243,244],{"class":193}," 'http:\u002F\u002Fwww.43things.com\u002Fservice\u002Fget_goal_by_id?api_key=2939451@43hKaaBzWkJ8&amp;id='",[84,246,247],{"class":125},"+",[84,249,250],{"class":189},"str",[84,252,253],{"class":129},"(randomNumber)\n",[84,255,257],{"class":86,"line":256},18,[84,258,96],{"emptyLinePlaceholder":20},[84,260,262,265,267],{"class":86,"line":261},19,[84,263,264],{"class":129},"  xmlFile ",[84,266,218],{"class":125},[84,268,269],{"class":129}," urllib.urlopen(url).read()\n",[84,271,273],{"class":86,"line":272},20,[84,274,96],{"emptyLinePlaceholder":20},[84,276,278,281,283],{"class":86,"line":277},21,[84,279,280],{"class":129},"  dom ",[84,282,218],{"class":125},[84,284,285],{"class":129}," minidom.parseString(xmlFile)\n",[84,287,289,292,294,297,300],{"class":86,"line":288},22,[84,290,291],{"class":129},"  objektid ",[84,293,218],{"class":125},[84,295,296],{"class":129}," dom.getElementsByTagName(",[84,298,299],{"class":193},"'name'",[84,301,233],{"class":129},[84,303,305,308,310,313,316],{"class":86,"line":304},23,[84,306,307],{"class":129},"  objekt ",[84,309,218],{"class":125},[84,311,312],{"class":129}," objektid[",[84,314,315],{"class":189},"0",[84,317,318],{"class":129},"].toxml()\n",[84,320,321,323,325,328,331],{"class":86,"line":5},[84,322,307],{"class":129},[84,324,218],{"class":125},[84,326,327],{"class":129}," objekt[",[84,329,330],{"class":189},"6",[84,332,333],{"class":129},":]\n",[84,335,337,339,341,344,347,350],{"class":86,"line":336},25,[84,338,307],{"class":129},[84,340,218],{"class":125},[84,342,343],{"class":129}," objekt[:",[84,345,346],{"class":125},"-",[84,348,349],{"class":189},"7",[84,351,352],{"class":129},"]\n",[84,354,356],{"class":86,"line":355},26,[84,357,96],{"emptyLinePlaceholder":20},[84,359,361,364,366,369,372,375,377],{"class":86,"line":360},27,[84,362,363],{"class":129},"  n ",[84,365,218],{"class":125},[84,367,368],{"class":129}," pynotify.Notification (",[84,370,371],{"class":193},"\"You should...\"",[84,373,374],{"class":129},", ",[84,376,250],{"class":189},[84,378,379],{"class":129},"(objekt))\n",[84,381,383],{"class":86,"line":382},28,[84,384,385],{"class":129},"  n.show ()\n",[84,387,388],{"class":86,"line":55},[84,389,96],{"emptyLinePlaceholder":20},[84,391,393,395],{"class":86,"line":392},30,[84,394,190],{"class":189},[84,396,397],{"class":193}," 'All done, exiting.'\n",[84,399,401,404,406],{"class":86,"line":400},31,[84,402,403],{"class":129},"  sys.exit(",[84,405,315],{"class":189},[84,407,233],{"class":129},[84,409,411],{"class":86,"line":410},32,[84,412,96],{"emptyLinePlaceholder":20},[84,414,416,419,422,425,428],{"class":86,"line":415},33,[84,417,418],{"class":125},"if",[84,420,421],{"class":189}," __name__",[84,423,424],{"class":125}," ==",[84,426,427],{"class":193}," '__main__'",[84,429,430],{"class":129},":\n",[84,432,434],{"class":86,"line":433},34,[84,435,436],{"class":129},"  main()\n",[438,439,440],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":37,"depth":37,"links":442},[],"2012-05-11T01:17:24Z",[79],{},"anroots","\u002Fgists\u002F2656909",{"title":30,"description":36},"gists\u002F2656909","https:\u002F\u002Fgist.github.com\u002Fanroots\u002F2656909","izbQpZ_sCLm7WGJooxhTYvxRbQWnDYqUr_0-W3T9WAY",1790886933921]