Query Blog

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@inertia·
0.000 HBD
Query Blog
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](https://hackmd.io).

<center>
<img src="https://gist.github.com/inertia186/398a215668c1fd3e1ae7e7a86ba85e53/raw/41b586a37b9ddc4999c076c5df61d0a2f69afdef/craiyon.png" width="500" height="500" />
</center>

---

### Install Ruby

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

Recommended version: ruby-2.7

### Get this code

```bash
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.

```bash
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:

```bash
ruby query_blog.rb arcange 2018
```

You can also redirect the output to a file:

```bash
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](http://i.creativecommons.org/p/zero/1.0/80x15.png)](http://creativecommons.org/publicdomain/zero/1.0/) License.
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,