Hive Developer logo

Hive Developer Portal

RB: Blog Feed

This example will output blog details to the terminal for the author specified, limited to five results.

Full, runnable src of Blog Feed can be downloaded as part of: tutorials/ruby.


The script parses the creation date, assuming Zulu timezone (AKA UTC).

The output will be the latest five posts/reblogs for the account specified. If the author is the same as the account specified, it is assumed to be a post by this account. Otherwise, it is assumed to be a reblog.

It also counts the words in the content body by splitting the text into an array of strings, delimited by whitespace.

Finally, it creates the canonical URL by combining parent_permlink, author, and permlink.

To Run

First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

git clone
cd devportal-tutorials-rb/tutorials/01_blog_feed
bundle install
ruby blog_feed.rb steemitblog

Example Output

2018-03-24 17:30:36 UTC
  Post: Happy 2nd Birthday Hive Blockchain
  By: steemitblog
  Words: 301
2018-03-07 20:56:36 UTC
  Post: Join Team Hive at TokenFest!
  By: steemitblog
  Words: 104
2018-02-27 20:18:36 UTC
  Post: Smart Media Token Development
  By: steemitblog
  Words: 699
2018-02-25 20:55:24 UTC
  Reblog: I filmed this video of @ned @pkattera and @sneak talking about the SMTs and the future of Hive
  By: ruwan
  Words: 89
2018-02-22 17:41:00 UTC
  Post: HIVE 및 HBD가 GOPAX에 상장되었습니다
  By: steemitblog
  Words: 317