Query Blog

@inertia · 2022-11-12 01:46 · HiveDevs

Have you ever wanted to read the entire blog of a particular author? It's actually not that easy with the current tools. You can scroll and scroll, but that's not a very fun experience.

This script allows you to output an index of an author's blog by querying HiveSQL, optionally limited to a year at a time. Then, you can save the output and view the file with a markdown reader or open it in hackmd.


Install Ruby

https://www.ruby-lang.org/en/documentation/installation/

Recommended version: ruby-2.7

Get this code

gem install bundler
git clone https://gist.github.com/398a215668c1fd3e1ae7e7a86ba85e53.git query_blog
cd query_blog
bundle install

Setup HiveSQL

Register here: https://hivesql.io/registration/

Edit authorize_hive_sql.sh and provide your credentials.

source authorize_hive_sql.sh

ruby query_blog.rb inertia

Or you can provide a year to focus on, which is useful for prolific bloggers:

ruby query_blog.rb arcange 2018

You can also redirect the output to a file:

ruby query_blog.rb dan > dan.md
open dan.md

Get in touch!

If you're using Query Blog, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on Hive.

License

I don't believe in intellectual "property". If you do, consider Query Blog as licensed under a Creative Commons CC0 License.

#ruby #hivesql #blog #tools #hive-139531
Payout: 0.000 HBD
Votes: 81
More interactions (upvote, reblog, reply) coming soon.