Fork me on GitHub
#babashka
<
2023-09-03
>
teodorlu13:09:59

Hi! Are there any recommended babashka-compatible libraries for parsing Atom feeds? I didn’t find anything mentioned in the https://babashka.org/toolbox/ or in the https://book.babashka.org/.

2
borkdude13:09:39

clojure.data.xml

borkdude13:09:14

here's a reverse example of making a podcast rss xml from some mp3 files https://github.com/borkdude/generate-podcast/blob/master/generate_podcast.clj

👍 2
teodorlu13:09:29

Amazing, thank you!

teodorlu13:09:44

I don’t think I’ll ever stop getting surprised by how far one can get with the right bit of Clojure code! 63 lines to generate an Atom feed from scratch. of those, about half are the CLI interface. And no libraries (other than XML handling) are required. Before seeing this I was kind of convinced that I needed something between me and the XML. Now I’m not so sure! 😄

😆 2
borkdude13:09:01

"just data" man (takes another drag from his Clojure e-cigarette)

😎 18
7tupel16:09:58

What a coincident, I need to parse some Changelogs that come as RSS/atom feeds for work and that might be a good chance to introduce a bit of Clojure/Babashka since I have the freedom of choice regarding the technology for this tool 😁

🙌 2
❤️ 2
teodorlu19:09:42

@UJVLQNY5P feel free to share any code you might come up with if you can! I might be able to learn a thing or two from it :)

jackrusher06:09:24

@U3X7174KS if you’re working in a language that makes it hard to generate an atom feed, you are working in the wrong language 🙂

👍 2
😄 2
teodorlu07:09:49

Easier to be convinced that it's doable for me after seeing someone else do it! Reading good clojure code bases has been really helpful for me here.

👍 2
emccue13:09:28

@U04V15CAJ If Clojure ever took out a superbowl ad, that would work

emccue13:09:01

just a guy taking a really fat hit of something - "Its just data man", clojure logo, fade to black

😆 6