rust-syndication / rss

Library for serializing the RSS web content syndication format
https://crates.io/crates/rss
Apache License 2.0
427 stars 52 forks source link

Add pretty-printing support. #65

Closed bwinton closed 6 years ago

bwinton commented 6 years ago

I'm trying to use rss to generate a couple of rss feeds for some stuff I listen to, and it's really hard to see what's changed when everything is on a single line with no indentation, and the metadata is split between the top and the bottom of the file…

frewsxcv commented 6 years ago

seems like this could be done upstream in the quick-xml crate? https://github.com/tafia/quick-xml

tafia commented 6 years ago

https://docs.rs/quick-xml/0.11.0/quick_xml/writer/struct.Writer.html#method.new_with_indent

Might be as simple as using it.

bwinton commented 6 years ago

Yeah, I've got a fork that does that (although the error handling isn't quite right), and it seems to work pretty well. Lemme know if you'd like me to fix it up and make a PR! 🙂

frewsxcv commented 6 years ago

i'd be in favor of adding pretty-printing functionality in this crate, but don't let that pressure you! only do it if you have time

frewsxcv commented 6 years ago

done in https://github.com/rust-syndication/rss/pull/66