STEEM-Bash

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@not-a-bird·
0.000 HBD
STEEM-Bash
### New Project
- What is the project about?
This is a project to create a useful set of functions that can be used in Bash scripts to allow accessing the STEEM blockchain.

- Technology Stack
This project makes use of only the most common Unix utilities (wget, grep, cut, etc) to fetch and manipulate content from the STEEM blockchain for use in Bash scripts.  The current features include fetching user profiles, fetching specific data from those profiles, and calculating the worth of a user's wallet in USD.  This calculation uses values from cryptocompare, steemd, and steemit.com.

The intent is that it will be possible to build other tools and make use of elements from STEEM in shell scripts.  The currently implemented example script is for fetching the USD value of a given steem wallet provided any account user name.  This information could be used in the users's shell prompt, tmux, screen, conky, or other commonly used utility that can slurp up and make use of data from bash scripts.

# Using

Currently the only exposed functionality is the script for fetching a given
user's wallet value from the command line.  It can be invoked thusly:

    worth.sh [account-name]

And it will produce the value in USD for the specified account name.

For example:

    $ worth.sh not-a-bird
    1577.120

# Additional Functionality

The project is organized as a single `functions.sh` script that can be sourced
from other scripts, and then the functions within it can be invoked directly.

Current functionality:

 * get_profile
Gets the specified users' profile as JSON.

 * get_bank
Gets the value of the specified user's wallet, including STEEM, SP, SBD, and
savings (but not delegations, since these aren't owned by the user).

 * get_steem_per_mvest
Gets the current rate in STEEM for each million vesting shares.  This is useful
in computing the SP for a given user.

# Requirements

Uses the following programs in addition to Bash:

* bc
* grep
* jq
* wget
* zcat


# Roadmap
Over the new few weeks I plan to create example scripts for:
   * building graphical menus to integrate with FVWM for
       + displaying account value
       + reading steem posts
   * reading posts at the CLI
   * fetching followed users
   * building graphs with graphviz
* enabling other experiments under Bash
* JSON RPC calls from bash for other Steem functionality

I'm an avid user of the command line and the FVWM window manager.  I fully intend to create scripts that integrate basic STEEM blockchain read access into my window menus and various console status indicators.  But these scripts will also make it possible to perform ad-hoc experiments, such as fetching followers/followees, memos, and even experimenting with new weighting methods for listing posts.

- How to contribute?
If this project seems even slightly interesting and you'd like to contribute you can fork it on github, you can contact me via Discord (not-a-bird on Utopian's Discord server), or even contact me through steemit.chat or on the Steem platform by leaving me a comment or tiny transfer with an attached memo.   Sorry, I don't use any other social networks.

If you have a mac and can test the initial scripts, that would be a great place to start.

* Github Location is [here](https://github.com/not-a-bird/steem-bash)

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@not-a-bird/steem-bash">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍 , , , , , , , , , , , , , , , , , ,