Open 6a7070 opened 6 years ago
take a look at issue32, so no, until you provide a patch for it, I would be happy to have this too :)
some experiments, and inspiration
which is about basically using feedparser to parse and reassign each variables to the feedgen model.
I do understand the desire to import an existing feed and create a feedgen object out of that, however an alternative solution would be to just use pickle
and save the object, then load it again when needed. I'm doing this with my own use of feedgen and it works well.
Once you have your fg
object ready to save just do:
with open('feed.obj', 'wb') as f:
pickle.dump(fg, f)
And to reload the object later:
with open('feed.obj', 'rb') as f:
fg = pickle.load(f)
Might be handy to document this for others somewhere.
I do understand the desire to import an existing feed and create a feedgen object out of that, however an alternative solution would be to just use
pickle
and save the object, then load it again when needed. I'm doing this with my own use of feedgen and it works well.Once you have your
fg
object ready to save just do:with open('feed.obj', 'wb') as f: pickle.dump(fg, f)
And to reload the object later:
with open('feed.obj', 'rb') as f: fg = pickle.load(f)
Might be handy to document this for others somewhere.
Legend.
Does this library offer a way to add entries to existing RSS files? I am able to generate new RSS files and append items to it during the initial setup of the file. However, when I don't see a mechanism to read a file, add content, and then resave. Am I missing something obvious? Thanks.