Improving Nokogiri documentation #3419
Replies: 4 comments 8 replies
-
Hi @BurdetteLamar! Thank you again for being willing to spend your time helping improve Nokogiri. ❤️ I took a look at some of the issues I wrote up at sparklemotion/nokogiri.org/issues and some of those are still valid and valuable, and other maybe not so much ... I think the ones that might be most valuable -- and what's missing from Nokogiri docs today -- are short how-to documents. I was recently introduced to https://diataxis.fr/ which describes some mental models for characterizing and improving technical documentation. This 2x2 in particular helped me think about Nokogiri: Breaking it down:
There is a great book called The Ruby Cookbook which hasn't been revised in nearly a decade, and it has a chapter on XML and HTML but barely mentions Nokogiri (because Nokogiri had not yet been released when the first edition came out in 2006). It's always been an idea in the back of my head to try to rewrite that chapter using Nokogiri instead of REXML. Anyway, that's what's in my head. Is that helpful at all? |
Beta Was this translation helpful? Give feedback.
-
May I also ask on dev.to? (Probably best not on reddit.) |
Beta Was this translation helpful? Give feedback.
-
Hey there! Just found this by way of Short Ruby. I'd be very excited to see expanded/improved Nokogiri documentation! This may or may not be a good fit for what you are thinking, but for one project I work on, we parse and analyze a lot of scraped web pages using Nokogiri. Common tasks for a given page:
Part of the challenge is learning how to use Nokogiri well, but another part is just figuring out how to deal with all the weird things you see in the wild. And that part may be difficult to cover...though I would say it might be the most helpful, because often the recipes I find assume clean/stable markup (e.g. "to find the price on the product page, just extract the text from the Another challenge I've had is learning XPath. Again, this isn't strictly a Nokogiri thing, but I've just not found that many good resources for learning it. I've been surprised by some of the things I could do, for example:
Hope something there is helpful! Let me know if you have questions. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I had hoped that this would be my "year of Nokogiri doc"; we are seven weeks in and I have only three merged PRs and two pending. There won't be many (if any) other such years, as I've just turned 82. I need timely reviews for the doc PRs I put up. I've found (over at ruby/ruby and other ruby/*) that each reviewed PR informs me about what to do next, and, especially, how. Therefore I've learned not to get out over my skis by writing too much at at a time. Which, in turn, means that I should have a very small number of small open PRs at any one time. @flavorjones, I see from the traffic that you are busy. Are there other potential reviewers?
|
Beta Was this translation helpful? Give feedback.
-
I'm thinking to spend time this year with some of the doc here. I see:
Any thoughts about what most people are doing? And what could best use the work?
Beta Was this translation helpful? Give feedback.
All reactions