New Project: Steemit Exif Microservice

in #utopian-io7 years ago (edited)

Motivation


I recently developed a bot to scour the steemit blockchain for images and post comments containing exif information. This experience taught me something.

  1. Bots are not always perfect
  2. Users may find this feature more useful if it were less automatic

Sure, getting exif information is really useful; however, it's kinda spam. Given, it's information that should automatically be in the post already, but it's not (Maybe I will contribute it to condenser). The bot is an afterthought kind of thing where it comes in after a post is already made and updates a very visible comment (something that it would be nice to optionally hide/show).

I started to re-examine priorities and I found that it's probably not readers that will find the bot so useful as other programmers that want to get at that data; therefore, posting it in a comment as markdown is also a very ineffective feature. It also dawned on me that all I've been contributing is bots. Bots are pretty much spam machines. I came to realize that real contributions are probably microservices that make data more available/obvious to programmers that want to use it when building better user interfaces, features, etc...

I have made a microservice that makes exif data readily available. Developers have but to use an http client to query the data. jQuery or NodeJS can be used to query from the server or a browser. This makes this very useful.

Technical Details

This project was built using:

  • Typescript
  • Docker
  • ExifReader
  • Bluebird
  • Got
  • Docker

It is then deployed to Heroku via Docker.

Usage

You can use this microservice in a couple ways:

  1. Run the microservice locally and offer it to other users
  2. Use the microservice via a client

Running

This describes how to run the microservice locally

To install and use this bot, you will be required to install Docker.

When Docker is installed and the environment variables are set, installation and execution are a single docker command:

docker run --rm -p 3000:3000 r351574nc3/steem-exif-spider-bot:latest

Running on a different port

export PORT=8090
docker run --rm -e PORT=$PORT -p $PORT:$PORT r351574nc3/steem-exif-spider-bot:latest

Getting records with curl

The url is made up of the author and permlink of the post you want exif details about. For example, for an author (alexanderfluke) and permlink (quarry-5-pics), my command is:

curl https://steemit-exif-ms.herokuapp.com/alexanderfluke/quarry-5-pics

Using JQ

Pretty Printing

curl https://steemit-exif-ms.herokuapp.com/alexanderfluke/quarry-5-pics | jq .

Fetch Make and Model

curl https://steemit-exif-ms.herokuapp.com/alexanderfluke/quarry-5-pics | jq '.[] | { make: .Make.description, model: .Model.description }'
{
  "make": "Canon",
  "model": "Canon EOS 450D"
}
{
  "make": "Canon",
  "model": "Canon EOS 450D"
}
{
  "make": "Canon",
  "model": "Canon EOS 450D"
}
{
  "make": "Canon",
  "model": "Canon EOS 450D"
}

Roadmap

  • Create a plugin to make it accessible from javascript frameworks in browser.
  • Browser extensions that allow viewing exif data for images in steemit on mouseover.

Contributing




Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @decebal2dac, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @r351574nc3 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

There is an interesting bot called remind.bot that you may want to examine that let's you call it like originalworks used to. I also like how steemitworldmap works in this calling way. It would be helpful if the exif bot let you call it within a post or comment instead of spidering. Sometimes people have exif data they don't want revealed also. I know there have been many updates to it by now. I will have another look at it. I started scrolling back through your blog trying to find info about creating steemconnect apps. :) Better late than never :)

This isn't spidering. This is a microservice that you put a url and gives you straight exif data for images on that post. It's intended to be a utility for someone that wants to make the bot you're describing.

Coin Marketplace

STEEM 0.23
TRX 0.21
JST 0.036
BTC 98081.40
ETH 3419.35
USDT 1.00
SBD 3.24