From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75776 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: typeset rss feed Date: Fri, 20 Apr 2012 17:14:42 -0400 (EDT) Message-ID: References: <4F91C3FF.6010802@jhnet.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1334956450 30865 80.91.229.3 (20 Apr 2012 21:14:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Apr 2012 21:14:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 20 23:14:08 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SLL9b-0001fj-VC for gctc-ntg-context-518@m.gmane.org; Fri, 20 Apr 2012 23:14:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 14B7A1020E; Fri, 20 Apr 2012 23:14:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id R5Yr3braLNDD; Fri, 20 Apr 2012 23:14:04 +0200 (CEST) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 173AA101FB; Fri, 20 Apr 2012 23:14:04 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BFCD2101FB for ; Fri, 20 Apr 2012 23:14:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DQ6BN5dYdpwZ for ; Fri, 20 Apr 2012 23:14:00 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 9CCEF101F9 for ; Fri, 20 Apr 2012 23:14:00 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q3KLDvEH015072 for ; Fri, 20 Apr 2012 23:13:58 +0200 Original-Received: FROM LP533.ECE.McGill.CA (Mismatch [132.206.69.142]) By hellskitchen.mr.itd.umich.edu ID 4F91D193.B51B8.5656 ; Authuser adityam; 20 Apr 2012 17:13:55 EDT In-Reply-To: <4F91C3FF.6010802@jhnet.nl> User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.82; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0LH0ldVgv - 59f1a41b0fdd - 20120420 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:75776 Archived-At: On Fri, 20 Apr 2012, Jelle Huisman wrote: > I'd like to typeset an RSS feed I was also recently thinking along these lines (set a cron job to typeset RSS feed into pdf and email to kindle). So, please release your code once you are done. > and I was wondering whether I could > instruct ConTeXt to fetch the contents of a url like: > http://feeds.bbci.co.uk/news/rss.xml Suppose you write a macro \processrssfile{...} that takes a local rss file and typesets it, then you can simply call \processrssfile{\locfilename{http://feeds.bbci.co.uk/news/rss.xml}} to process a remote file. ConTeXt downloads and caches the file. On subsequent calls, the cached file is used. IIRC, the cache remains valid for a day and it is possible to change the threshold after which a new file is fetched. FWIW, I have added this to t-vim.tex so it can pretty-print remote files. This only works with http:// or ftp:// and not with https:// Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________