Re: Frozen pyds install
Ian Bicking <[email protected]> Fri, 19 Mar 2004 10:43:02 -0600
| Newsgroups | gmane.comp.python.pyds.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks for all the help, by the way.
Georg Bauer wrote:
>>Saved file? Like a backup? I never set up any backups :( Is there
>>some other way of getting those out? I suppose I could find a mk
>>browser of some sort.
>
>
> You can just write a short script in Python to pull out the data you
> need. Something like:
>
> #!/usr/bin/python
>
> import metakit
>
> db = metakit.storage('aggregator.data', 1)
> feeds = db.view('feeds')
>
> for feed in feeds:
> print feed.url
This works fine, which is good enough. Though, as I recreate my
subsriptions, I'm reminded that the "http://" that is put in the
subscription text field is a little annoying -- I have to delete it and
then repaste (on X, I suppose on Windows or Mac it wouldn't be as bad).
> This will print you all feeds you are subscribed too. Adding them to a
> new pyds aggregator database can be done with cut-and-paste.
>
> Or you modify the script a bit:
>
> import metakit
>
> dbin = metakit.storage('aggregator.data', 1)
> dbout = metakit.storage('aggregator.new', 1)
>
> # this is one long line
> feeds =
> dbout.getas("feeds[url:S,title:S,link:S,desc:S,author:S,ready:I,message:
> S,lastrun:I,parsehook:S,skiphours:S,maxdays:I,maxposts:I,interval:I,
> shared:I]").ordered(1)
>
> for feed in db.view('feeds'):
> feeds.append({
> 'url':feed.url,
> 'title':feed.title,
> .... add all attributes here ....
> })
>
> dbout.commit()
Huh... I get a segfault. That's annoying. It appears to be when I
access the title in the subscription to
http://apple.slashdot.org/slashdot.rss
Oh well, it's all working anyway. Thanks again.
Ian