create account

sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar by inertia

View this thread on: hive.blogpeakd.comecency.com
· @inertia ·
$10.88
sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar
#### Overview

This script (`sob.rb`) allows you to automatically post and update OpenBazaar listings on the STEEM blockchain.

---

#### Install

To use this [Radiator](https://steemit.com/steem/@inertia/radiator-steem-ruby-api-client) script:

##### Linux

```bash
$ sudo apt-get install ruby-full git openssl libssl1.0.0 libssl-dev
$ gem install bundler
```

##### macOS

```bash
$ gem install bundler
```

I've tested it on various versions of ruby.  The oldest one I got it to work was:

`ruby 2.2.5, with native extensions`

First, clone this gist and install the dependencies:

```bash
$ git clone https://gist.github.com/95ff25885035e6c9eae6e97ef84ba591.git sob
$ cd sob
$ bundle install
```

Edit the file `sob.yml` and set your store API information.  Also set the account you want to post with.  You must use the posting-wif.

---

#### Upgrade

Typically, you can upgrade to the latest version by this command, from the original directory you cloned into:

```bash
$ git pull
```

Usually, this works fine as long as you haven't modified anything.  If you get an error, try this:

```
$ git stash --all
$ git pull --rebase
$ git stash pop
```

If you're still having problems, I suggest starting a new clone.

---

#### Usage

To do the actual post/update (this will post all contracts):

```bash
$ ruby sob.rb contract:all broadcast:true
```

The `sob.rb` script will now post all contracts on your store.  If you update any of your contracts, you can run the same script again to update the blockchain.  When updating, in order to avoid blockchain bloat, this script will automatically send a `diff` patch of changes.

To only post/update a single contract, pass the GUID:

```bash
$ ruby sob.rb contract:<contract guid> broadcast:true
```

---

Check here to see an updated version of this script:

https://gist.github.com/inertia186/95ff25885035e6c9eae6e97ef84ba591

---
#### Troubleshooting

##### Problem: What does this error mean?

```
sob.yml:1: syntax error, unexpected ':', expecting end-of-input
```

##### Solution: You ran `ruby sob.yml` but you should run `ruby sob.rb`.

---

<center>
  ![](https://cl.ly/233t0q0v2j0p/obarc-logo.png)
</center>

See my previous Ruby How To posts in: [#radiator](https://steemit.com/created/radiator) [#ruby](https://steemit.com/created/ruby)

## Get in touch!

If you're using sob, I'd love to hear from you.  Drop me a line and tell me what you think!  I'm @inertia on STEEM and [SteemSpeak](http://discord.steemspeak.com).
  
## License

I don't believe in intellectual "property".  If you do, consider sob 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.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 96 others
👎  , ,
properties (23)
authorinertia
permlinksob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar
categoryradiator
json_metadata{"tags":["radiator","ruby","steem","steemdev","openbazaar"],"users":["inertia"],"image":["https://cl.ly/233t0q0v2j0p/obarc-logo.png","http://i.creativecommons.org/p/zero/1.0/80x15.png"],"links":["https://steemit.com/steem/@inertia/radiator-steem-ruby-api-client","https://gist.github.com/inertia186/95ff25885035e6c9eae6e97ef84ba591","https://steemit.com/created/radiator","https://steemit.com/created/ruby","http://discord.steemspeak.com","http://creativecommons.org/publicdomain/zero/1.0/"],"app":"steemit/0.1","format":"markdown"}
created2017-04-09 02:45:51
last_update2017-04-09 02:45:51
depth0
children9
last_payout2017-04-16 02:45:51
cashout_time1969-12-31 23:59:59
total_payout_value9.720 HBD
curator_payout_value1.156 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,726
author_reputation346,568,901,399,561
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id2,974,346
net_rshares25,291,122,072,682
author_curate_reward""
vote details (163)
@ackza ·
Wow now this is a great app idea

I wish I could understand this but one day maybe ill have someone employed who can\
I would love to see a steem open bazaar button on the open bazaar app in the future if it ever happens
properties (22)
authorackza
permlinkre-inertia-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20180605t012004266z
categoryradiator
json_metadata{"tags":["radiator"],"app":"steemit/0.1"}
created2018-06-05 01:20:03
last_update2018-06-05 01:20:03
depth1
children0
last_payout2018-06-12 01:20:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length220
author_reputation287,844,539,178,764
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,292,948
net_rshares0
@christoryan ·
That's badass! Thanks for the tip~:D
👍  
properties (23)
authorchristoryan
permlinkre-inertia-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20170409t031005047z
categoryradiator
json_metadata{"tags":["radiator"],"app":"steemit/0.1"}
created2017-04-09 03:10:42
last_update2017-04-09 03:10:42
depth1
children0
last_payout2017-04-16 03:10:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length36
author_reputation4,253,059,677,623
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,974,418
net_rshares14,005,441,813
author_curate_reward""
vote details (1)
@fminerten1 ·
$0.06
Thank you. Steem and OpenBazaar are good match.
👍  , , ,
properties (23)
authorfminerten1
permlinkre-inertia-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20170409t062639653z
categoryradiator
json_metadata{"tags":["radiator"],"app":"steemit/0.1"}
created2017-04-09 06:26:39
last_update2017-04-09 06:26:39
depth1
children0
last_payout2017-04-16 06:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.048 HBD
curator_payout_value0.016 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length47
author_reputation36,412,535,193,751
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,975,028
net_rshares901,269,338,428
author_curate_reward""
vote details (4)
@framelalife ·
Wow! This is great. Upvoted and re-steemed. Can't wait to try this :)
properties (22)
authorframelalife
permlinkre-inertia-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20170409t153645906z
categoryradiator
json_metadata{"tags":["radiator"],"app":"steemit/0.1"}
created2017-04-09 15:36:45
last_update2017-04-09 15:36:45
depth1
children0
last_payout2017-04-16 15:36:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length69
author_reputation9,706,532,045,387
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,977,409
net_rshares0
@hagbardceline ·
Wow, good job!
properties (22)
authorhagbardceline
permlinkre-inertia-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20170409t100732203z
categoryradiator
json_metadata{"tags":["radiator"],"app":"steemit/0.1"}
created2017-04-09 10:07:39
last_update2017-04-09 10:07:39
depth1
children0
last_payout2017-04-16 10:07:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length14
author_reputation9,539,931,063,329
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,975,754
net_rshares0
@masterthematrix ·
Wow what a great tool. Now open bazaar products can earn Steem if they post it to the Steem Blockchain. In a way something like dstors tries to acomplish but without the need of an own platform, awesome!!!

Posted using [Partiko Android](https://steemit.com/@partiko-android)
properties (22)
authormasterthematrix
permlinkmasterthematrix-re-inertia-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20181224t194540463z
categoryradiator
json_metadata{"app":"partiko"}
created2018-12-24 19:45:42
last_update2018-12-24 19:45:42
depth1
children0
last_payout2018-12-31 19:45:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length275
author_reputation9,868,666,626,842
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id77,333,559
net_rshares0
@matrixdweller ·
really cool
properties (22)
authormatrixdweller
permlinkre-inertia-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20170409t204442398z
categoryradiator
json_metadata{"tags":["radiator"],"app":"steemit/0.1"}
created2017-04-09 20:44:57
last_update2017-04-09 20:44:57
depth1
children0
last_payout2017-04-16 20:44:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11
author_reputation-29,653,420,748,873
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,979,425
net_rshares0
@noganoo ·
This is incredible!  Awesome work @inertia!
properties (22)
authornoganoo
permlinkre-inertia-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20170409t211037485z
categoryradiator
json_metadata{"tags":["radiator"],"users":["inertia"],"app":"steemit/0.1"}
created2017-04-09 21:10:39
last_update2017-04-09 21:10:39
depth1
children0
last_payout2017-04-16 21:10:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length43
author_reputation-12,409,054,499,907
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,979,611
net_rshares0
@poshbot ·
https://twitter.com/inertia186/status/1309504920266006529
properties (22)
authorposhbot
permlinkre-sob-rb-automatically-post-openbazaar-listings-on-steem-openbazaar-20200925t144808z
categoryradiator
json_metadata"{"app": "beem/0.24.8"}"
created2020-09-25 14:48:06
last_update2020-09-25 14:48:06
depth1
children0
last_payout2020-10-02 14:48:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length57
author_reputation5,554,335,374,496
root_title"sob.rb - Automatically Post OpenBazaar Listings on STEEM #openbazaar"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,812,486
net_rshares0