uxCATling - rudimentary, dear Watson, parsing account history with nothing but that bash and dash - parseaccounthistory v0.01steemCreated with Sketch.

in #rudyardcatling6 years ago (edited)

long story short (yes i still use curl, otherwise its bare shell in linux mint 18 , im not sure if wget can handle it but functionality first, i'll look into that after)

So, as daylight draws near and the dishes are done, dinner is ready to cook just turn up the heat, the laundry is ... OH! ... gotta turn that on first brb ...
good you made me remember precious
ofcourse cat, need pantsss are proper
and so i sit , for a few minutes at a time, sitting in one place for more than ten minutes unless lying down watching anime or something is REALLY hard

at home ... i dont even wanna know somewhere i dont wanna be

and i think while doing the main body for @ubasti next post manually
to myself hmz, maybe i made an error in how much it distributed so far

so a bit of automation without an actual bot would take a bit of the boring load off and lo and behold, the mighty linux comes with conditionals and case statements by default, which leads to a first babystep from script to actual program

#!/bin/bash

##################################
ACCOUNTHANDLE=$1
##################################
METHOD=$2
##################################

bla='{"jsonrpc": "2.0", "method": "condenser_api.get_account_history", "params": ["'
bla2='",  10000, 10000], "id": 1 }'
bla3=$bla$ACCOUNTHANDLE$bla2

echo $ACCOUNTHANDLE
echo $METHOD
echo $bla3

curl --silent --data "$bla3" https://api.steemit.com >testest

case $2 in
"sbi")
grep -Po '(?<=("to":"steembasicincome",)).*?(?=(}))' testest > testestttt
;;
"transfers")
echo "parsing all outgoing transfers"
grep -Po '(?<=("transfer",{"from":"ubasti",)).*?(?=(","memo"))' testest > testestttt
;;
*)
echo "UNKNOWN COMMAND "$2
;;
esac
#ho-kiez, next up conditional where $2 is command ? transfer / sbi
cat testestttt


that didnt take long compared to the last times, maybe theres still a few synapses popping inthere. Basically this is the base structure for command line parsing where $1 is accountname and $2 is command , which can be anything really all i need is the zbelling (or syntax) of any kind of transaction to pull it out

so i can

./anyinteractionwith_wrk.sh ubasti sbi
to see all shares the account gave out to someone on @steembasicincome

or i can

./anyinteractionwith_wrk.sh ubasti transfers

to see all outgoing transfers of actual steem and sbd

which should be easy enough to add

./anyinteractionwith_wrk.sh ubasti transfers SBD
or even later
./anyinteractionwith_wrk.sh ubasti upvotes 100 (or upvotes all)

to get all or the last 100 upvotes for instance, i think i'm starting to get the hang of it, slightly, in my own chaotic way, which is nowhere near structured daily hours on set hours but thats the least of my concerns really, im warding off evil in 10 feet radiusses all the time here

but this , at least, satisfies both my need to check it and my need to have some actual content for this post

YO-lo

01530f7c642264b786a57435a3724ebd.jpg
probably best if she doesn't grow TOO fast or everyone will be left with 0.001 sbd and theres only three upvotes at 15sp to be raffled but if it comes it comes i kinda like the little project so far


other wip :
insert youtube video here lol but not today im tired and its too early to sleep i need to move some or i lose the night again

72.png
#steemscript

Sort:  

Congratulations @rudyardcatling,
Your post "uxCATling - rudimentary, dear Watson, parsing account history with nothing but that bash and dash - parseaccounthistory v0.01" hast just been Resteemed !!! 🙂😉🙂
You have achived this service by following me.


😝😝😝 Thank you for using our FREE Resteem Service @tow-heed🙂🙂🙂

Congratulations @rudyardcatling! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You published 4 posts in one day

Click on any badge to view your own Board of Honor on SteemitBoard.

To support your work, I also upvoted your post!
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

correction btw : the curl needs to be outside of the case switch ofcourse ... you can call me retard now for the remainder of the day lol.png

i shall edit since that's not worth a new post ALLTHOUGH since every edit is stored in the chain ANYWAY forever (talk about building volume there) ... that is somewhat debatable, but for teh case of spemz and to not overdistro my sbi shares i will ofcourse not

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 64455.55
ETH 3147.84
USDT 1.00
SBD 3.94