Sitemap Parser

2023-12-24 Thread termer
I'd suggest using dot syntax whenever you want something to look like it would in OOP, or if it's a property. For example: var player = getPlayer("Robert") player.kill() # kill(player) # ^ This wouldn't be as idiomatic since this is an action on the player, and

Sitemap Parser

2023-12-20 Thread coneonthefloor
Thank you, that is really helpful feedback. I have seen the "dot" syntax, I wasn't sure of how/when to use it. So I'll look into that. Good to know about the `error` too.

Sitemap Parser

2023-12-20 Thread ElegantBeef
Looking at the code there are a few things I'd suggest although relatively opinionated. Modules imported from stdlib should be prefixed with `std/[a, b, c,]`. proc hasURLSet(sitemapContent: string): bool = let doc = q(sitemapContent) let urlset = doc.select("urlset")

Sitemap Parser

2023-12-20 Thread coneonthefloor
Hi. I wrote this sitemap parser as a way to learn more about Nim and it's ecosystem. I would appreciate a code review and some general feedback, if anyone has time. Also it may be useful someone out there. <https://github.com/coneonthefloor/nim-sitemap-parser> Thank you, Brian