Tải bản đầy đủ - 0 (trang)
Hack 77. Subscribe to Google's Feeds

Hack 77. Subscribe to Google's Feeds

Tải bản đầy đủ - 0trang

includingYouTube,GoogleVideoitself,MetaCafe,and

Break.com.TofindGoogleVideo–filteredresultsforonly

asingleoneofthesesites,usethesiteoperatoralong

withyoursearchquery,asin"site:break.comsoccer"

(withoutthequotes)tofindonlysoccer-relatedmaterial

fromBreak.

SubscribetoGoogleWebSearch

WhenyouperformaGooglewebsearchquery,youwillnotfind

anyRSSorAtomfeedlinkontheresultspage.However,there's

helpavailable,intheformofGoogleDocs.

Createanewspreadsheetathttp://docs.google.com.Inthe

firstcell,usetheimportXmlformula[Hack#27]asfollows—

replace"horse+riding"withyourownkeywords,usingtheplus

symbolwhereyouwouldusuallyputaspaceinthesearch

query:

=importXML("http://www.google.com/search?q=horse+riding",

"//a[@class='l']/@href")

ThefirstparameterinthisfunctionistheGoogleresultURL.

ThesecondparameteristheXPath.Inthiscase,theXPath

translatesto"Findallanchorelements'a'inthesource

documentthathavetheclassname'l',andgrabtheirlink

parameter'href'."AsaGoogleresultbydefaulthas10result

links,that'salsothenumberofURLsappearinginyourGoogle

spreadsheetnow.

Asasecondstep,publishthespreadsheetandcheckthe

"Automaticallyre-publish..."box.Click"Morepublishing

options"andpickAtomfromthefileformatdrop-down.Click

theGenerateURLbutton,andcopytheresultingURLasshown

inFigure8-5toaddtoGoogleReader...andvoilà,youare

nowsubscribedtoaGooglewebsearchresult.





PublishingtheresultsofimportXml,wrappedarounda

Googlesearchresult,asanAtomfeed



SubscribetoGmailMessages

GmaildoeshaveanRSSfeedat

http://mail.google.com/mail/feed/atom(seeChapter5).

However,thisfeedrequiresauthentication,asitcontainsyour

privatedata,soyoucan'tsubscribetoitusingGoogleReader

(evenwhenyoutryusingtheformat

https://username:password@gmail.google.com/gmail/feed/atom

YoumightbeabletoaccessitusingotherRSSreaders,though;

forinstance,theWindowsdesktopprogramSharpReaderat

http://sharpreader.netsupportsthis.Aswithanyapplication

thatasksforyourGoogleAccountcredentials,providethese

detailsonlywhenyoutrusttheprogram'screators,aswellas

whateversecuritymodeltheyusetoprotectyourcredentials.

SubscribetoGoogleDocs



Toseenewlypublisheddocuments,spreadsheets,or

presentations,youcanaccesstheGoogleDocs[Hack#1]feed.

Gotohttp://docs.google.comandclicktheSettingslinkontop.

SwitchtotheRSSFeedstabandclickthe"viewfeed"linkto

addittoGoogleReader.Bydefault,onlypublicDocsdocuments

willrevealtheirtitlealongwithasnippet,althoughyoucan

changethissettingintheRSSFeedstab.

Inadditiontosubscribingtoageneralfeedcoveringallyour

documentsinGoogleDocs,youcanalsoopenasingle

documentandsubscribetoitsRSSfeed,whichyouwillfindin

thePublishtab;thelinkisnamedSubscribeandisaccompanied

bytheorangefeedicon.

Thisdocument-specificfeedactsasakindofchangelog,which

isespeciallyusefulifthedocumentisveryimportanttoyou.

SubscribetoGoogleNotebook

YoucanalsosubscribetoyourGoogleNotebook[Hack#14]to

keepuptodateonthiscollaborativenotes-sharingtool.Login

toyournotebookathttp://google.com/notebook/.Ifthe

notebookinquestionisn'talreadyshared,click"Sharing

options"andunderthe"Publishthisnotebook"label,checkthe

YesoptionandclicktheSaveSettingsbutton.

Ifyournotebookispublished,clicktheViewlinkaboveit.A

newbrowserwindowortabopens,containinganHTMLpageof

yournotes.Ifyourbrowserdoesn'tautomaticallyofferyoua

linktosubscribetotheRSSfeedcontainedwithinthisHTML

page,openitssourceandlookforthepartreadingalt=rssand

copytheURLyouseetoaddittoGoogleReader.Theformatof

thefeedURLwillbesimilartothisone:



http://www.google.com/notebook/feeds/12341500972093356787/noteb

BDRRESwoWkbdw5vMh?alt=rss



SubscribetoGoogleGroups



GoogleGroups(http://groups.google.com)isGoogle'sUsenet

discussiongroupdisplayservice.Youcannavigatetoany

group,thensubscribetoitusingtheorangeXMLbuttonatthe

bottomofthepage,whichwilltakeyoutoapagedisplaying

differentfeedformats.

Forinstance,thefeedfortheUsenetgrouprec.arts.comics.misc

(miscellaneousdiscussionofcomicbooksaspartofthe

recreation/artsgroupshierarchy)lookslikethis:



http://groups.google.com/group/rec.arts.comics.misc/feed/atom_v



SubscribetoPicasaWebAlbums

PicasaisGoogle'sonlinephotostorageanddisplayservice.

Navigatetohttp://picasaweb.google.comandthentoanyone

ofyouralbumsortothealbumsofothers,andyouwillfindan

RSSlinkatthebottomrightofthepage.Youcansubscribetoit

usingGoogleReadertotrackthelistofnewphotosbeingadded

tothealbumovertime.

SubscribetoYouTubeVideos

TogettheRSSfeedforanyGoogleYouTubetagresult,replace

theboldpartinthefollowingURLwithyourownkeywordorset

ofkeywords(useapluscharacterasaseparatorbetween

keywords):

http://youtube.com/rss/tag/japanese+show.rss



Thiswillprovideyouwithalistofvideos,andasshownin

Figure8-6,youcaninstantlyplaythemwithinGoogleReader.

ForalistofotherfeedsofferedbyYouTube—includingrecently

added,topfavorites,andmostviewedtoday—check

http://youtube.com/rssls.



AYouTubefeeddisplayedinGoogleReader



Hack78.TakeYourOldSubscriptions

withYou

Switchingyourfeedreaderdoesn'tneedtocausealotof

headaches.

IfyouwereusinganotherfeedreaderbeforeGoogleReader,

youmightwanttotakeyouroldsubscriptionswithyou.

Wouldn'titbenicetomoveallofthematonceinsteadof

havingtoresubscribetofeedURLafterfeedURL?Luckily,

there'saperfectformatforjustthat,calledOPML.OPML,the

OutlineProcessorMarkupLanguage,collectsseveralRSSfeed

addresseswithinasinglefile.

Forinstance,ifyouroldfeedreaderisBloglines

(http://bloglines.com),logintoitandinthelefthand

navigation,clickthe"ExportSubscriptions"link,picturedin

Figure8-7.AnOPMLdownloadwillbeofferedtoyou;saveitto

yourcomputer.Ifyouarecurious,youcanopenthedownload

filewithaplaintexteditor,andyouwillseesomethingalong

thelinesofthefollowing—astructuredlistoffeedURLsinXML

format:









BloglinesSubscriptions

...






text="JohnBattelle's

Searchblog"htmlUrl="http://battellemedia.com/"type="rs

xmlUrl="http://battellemedia.com/index.rdf"/>


text="Fury.com"htmlUrl="http://fury.com/"

type="rss"xmlUrl="http://fury.com/index.rss"/>




text="MetaFilter"htmlUrl="http://www.metafilter.com/"t

xmlUrl="http://xml.metafilter.com/atom.xml"/>

...







NOTE

TheOPMLformatiseasyenoughthatyoucouldadd

newitemswithatexteditor,orcreatesuchafilefrom

scratch.NotethatifyoumanuallyaddURLscontaining

the"&"(ampersand)character,youneedtoescape

thesesotheyareaproperXMLentitybywriting

"&"instead(OPMLisanXMLapplication).This

escapingofampersandcharactersisactuallyeven

neededwhenyouincludelinksinHTML,thoughthe

HTMLformatisusuallymoreforgivingaboutthisissue,

andwillstillrenderinpopularbrowsers(itwillfailthe

testwhenusingvalidatorprograms).Tocheckwhether

youcreatedawell-formedXMLdocument,trydropping

thefileintoabrowserlikeFirefoxandseeifitcorrectly

loads,orthrowsanerrormessage.

Fordetailsonexportoptionsfromavarietyofother

feedreaders,likeFirefoxLiveBookmarks,iGoogle,

Newsgator,NetvibesormyYahoo,checkthehandylist

Googleprovidesat

http://google.com/help/reader/faq.html#export,

Nowthatyou'veexportedtheOPMLfile,importitintoGoogle

Reader.Gotohttp://reader.google.comandclickSettings.

SwitchtotheImport/Exporttab,asshowninFigure8-8,and

provideyourfileintheOPMLuploadbox.Aftertheupload

succeeds,youcancontinueyourRSSreadingwithyour

completelistoffeeds.





Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Hack 77. Subscribe to Google's Feeds

Tải bản đầy đủ ngay(0 tr)

×