Javascript: Cheerio and the Return of jQuery
04/03/15
So, I'm working on tools to improve my organizational system, which is my website. I really like that I made this decision, because it means I'm making tools for my website. The one I'm currently working on is parsing through my blogposts so I can pull out a set of them for any reason. The current reason is to grab all posts since the day of my last weekly review, and automatically set up a list of headers that link to each post for commentary purposes.
So, I could hack something together that does this (like I did at work with python), or I could use a javascript library that reads html documents. Enter Cheerio, a node library that gives the user a jQuery-like API to interact with input html. This is the best-supported of such a node library that I know of, so I suppose it is time to readopt jQuery into my toolkit. I mean, I could still go pure javascript on the browser-side, but that would mean I interacted with the html differently on different sides of the browser. I don't have to worry about jQuery being slower or using more bandwidth or whatever, as those problems don't affect me, yet. Might as well use the same syntax on both sides of the Internet.
And so returns jQuery, something I abandoned because I felt I used it for no reason. Which, I mean, maybe was a flimsy reason to abandon it, but now I have a reason, and have been using javascript for a while and may better appreciate the things that jQuery does.
Let's see where this goes.
Cheerio.