[{"data":1,"prerenderedAt":257},["ShallowReactive",2],{"project-8312249":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":42,"post_text":44,"what":45,"said":77,"maker_in_thread":149,"shape":151,"grid":156,"attempts":221,"same_week":222,"maker_shows":33,"maker_hidden":250,"reader_version":251,"card":252},"8312249","Pup","A command-line HTML parser","title","Show HN: Pup – A command-line HTML parser","https:\u002F\u002Fgithub.com\u002FEricChiang\u002Fpup","github.com","ericchiang",1410613123,2014,126,27,215,2272,10,"notable","dev_tools","command-line html parser","cli",[24,25,26,27,28],"html parser","command line","css selector","scraping","terminal","loved",0.54,{"positive":18,"neutral":32,"mixed":33,"critical":34},3,1,0,14,{"design":37,"idea":38,"performance":40,"execution":41},{"positive":34,"critical":34},{"positive":39,"critical":34},6,{"positive":33,"critical":34},{"positive":33,"critical":34},[32,34,32,34,34,34,34,34,34,34,34,43,43,34,34,43,32,43,34,43,34,43,43,43,32,43,43],5,null,{"problem":46,"audience":44,"pricing":44,"motivation":44,"time_to_build":44,"stack":62,"openness":75,"stage":76,"team_size":76},{"value":47,"source":48,"evidence":49},"Extracting data from HTML on the command line","inferred",[50,54,58],{"id":51,"by":52,"text":53},"8313450","ushi","So getting the front page links is now as easy as: ``` curl https:\u002F\u002Fnews.ycombinator.com | pup td.title a attr{href} ``` Well done and thx for sharing.",{"id":55,"by":56,"text":57},"8313365","morenoh149","very nice. Could replace a bunch of awk and sed one off scripts floating around on people's harddrives.",{"id":59,"by":60,"text":61},"8313471","jkbr","Happy to see this. Pup will be a nice companion to HTTPie[1] as it also works with standard streams: ``` $ http example.org | pup h1 text{} | http httpbin.org\u002Fpost ``` [1]…",[63],{"value":64,"source":65,"evidence":66},"Go","commenter",[67,71],{"id":68,"by":69,"text":70},"8313377","aw3c2","\"I bet it's node or ruby...\" Sees .go file extension. \"Oh nice, I never used a Go program before!\" But then I am supposed to '$ go get github.com\u002Fericchiang\u002Fpup' to install it.…",{"id":72,"by":73,"text":74},"8313401","artursapek","Really great seeing more and more CLI tools being built in Go. :-)","open_source","unknown",{"praise":78,"objections":106,"requests":111,"questions":119,"alternatives":127},[79,91,99],{"value":80,"source":65,"evidence":81},"Useful companion to pipes and tools like httpie and jq",[82,83,87],{"id":59,"by":60,"text":61},{"id":84,"by":85,"text":86},"8313516","kolev","I agree that jq is a must, along with httpie, and now pup. Thanksfully, jq is now in all distros I've tried (except Arch Linux), I think httpie is as well, so, let's hope same…",{"id":88,"by":89,"text":90},"8314460","mholt","cat and pup play well together.",{"value":92,"source":65,"evidence":93},"Good examples and pretty-printing",[94,95],{"id":68,"by":69,"text":70},{"id":96,"by":97,"text":98},"8313394","mdaniel","I agree with your sentiment, but because pup knows CSS selectors and understands the page hierarchy, this will blow the doors off of any line-oriented tool. I'm also stoked about…",{"value":100,"source":65,"evidence":101},"Windows build provided",[102],{"id":103,"by":104,"text":105},"8313548","WorldWideWayne","Looks great! Thank you so much for making a Windows build.",[107],{"value":108,"source":65,"evidence":109},"Install via go get is unfamiliar; binaries in dist not mentioned in readme",[110],{"id":68,"by":69,"text":70},[112],{"value":113,"source":65,"evidence":114},"Support pseudo-selectors such as :last-child",[115],{"id":116,"by":117,"text":118},"8316091","illesim","Is there any way to use pseudo-selectors, like :last-child?",[120],{"value":121,"source":65,"evidence":122},"How is it different from using a Ruby or Python REPL with Nokogiri?",[123],{"id":124,"by":125,"text":126},"8313412","mbesto","Wait, what's the difference between this and using a Ruby\u002FPython\u002Fetc REPL? In other words, normally to achieve this same result I would do: irb -> require 'Nokogiri' and require…",[128,135,142],{"value":129,"source":65,"evidence":130},"w3 html-xml-utils",[131],{"id":132,"by":133,"text":134},"8313633","grannyg00se","Also see w3's html-xml-utils. For example hxextract: http:\u002F\u002Fwww.w3.org\u002FTools\u002FHTML-XML-utils\u002Fman1\u002Fhxextract.html",{"value":136,"source":65,"evidence":137},"Nokogiri command-line tool",[138],{"id":139,"by":140,"text":141},"8313475","dashesyan","Nokogiri comes with a command-line tool for just that purpose: https:\u002F\u002Fgithub.com\u002Fsparklemotion\u002Fnokogiri\u002Fblob\u002Fmaster\u002Fbin\u002Fnokogiri Example: nokogiri https:\u002F\u002Fnews.ycombinator.com…",{"value":143,"source":65,"evidence":144},"goquery",[145],{"id":146,"by":147,"text":148},"8313390","Gys","Did you know of goquery (github.com\u002FPuerkitoBio\u002Fgoquery) ?",{"comments":34,"answered":34,"key":150},[],{"commenters":152,"max_depth":153,"maker_replies":34,"first_comment_mins":154,"lifespan_hours":155},23,4,410,31,[157,161,165,167,169,173,175,178,181,184,187,189,192,193,194,197,199,201,203,204,207,209,211,213,214,217,218],[158,34,32,159,160,34],"8313411","project\u002Fneutral\u002Fdesign","nikital",[162,34,34,163,164,34],"8314151","commenter\u002Fneutral\u002Fnone","userbinator",[68,33,32,166,69,34],"project\u002Fmixed\u002Fidea",[168,33,34,163,73,34],"8313388",[170,33,34,171,172,34],"8313431","other\u002Fneutral\u002Fnone","vinceguidry",[174,33,34,163,69,34],"8313472",[176,33,34,171,177,34],"8313650","plq",[179,33,34,171,180,34],"8314144","yohanatan",[182,33,34,171,183,34],"8314197","nostrademons",[185,33,34,171,186,34],"8314873","collyw",[188,33,34,171,186,34],"8314871",[59,190,43,191,60,34],2,"project\u002Fpositive\u002Fidea",[51,32,43,191,52,34],[132,153,34,171,133,34],[195,153,34,171,196,34],"8314085","NaNaN",[72,43,43,198,73,34],"project\u002Fpositive\u002Fnone",[124,39,32,200,125,34],"project\u002Fneutral\u002Fidea",[202,39,43,191,69,34],"8313427",[139,39,34,171,140,34],[205,39,43,191,206,34],"8313518","mateuszf",[146,208,34,171,147,34],7,[55,210,43,191,56,34],8,[96,210,43,212,97,34],"project\u002Fpositive\u002Fperformance",[84,210,43,198,85,34],[116,215,32,216,117,34],9,"project\u002Fneutral\u002Fnone",[88,18,43,191,89,34],[103,219,43,220,104,34],11,"project\u002Fpositive\u002Fexecution",[],[223,228,232,236,241,245],{"id":224,"name":225,"points":226,"category":227},"8331233","CleverDeck",305,"learning_science",{"id":229,"name":230,"points":231,"category":20},"8315616","Picnic.css",247,{"id":233,"name":234,"points":235,"category":20},"8315224","ContentBuilder.js",189,{"id":237,"name":238,"points":239,"category":240},"8323462","Berlin Hacker News",145,"productivity",{"id":242,"name":243,"points":244,"category":20},"8310137","Upmin",140,{"id":246,"name":247,"points":248,"category":249},"8309848","Hypermasher",85,"creative",false,"v2",{"id":253,"name":5,"line":6,"ai":250,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":254,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":255,"url":9,"mix":256,"praise":80,"objection":108,"sub":21},8312249,[24,25,26,27,28],"303000000005500535050555355",[18,32,33,34],1793990912088]