You are viewing a single comment's thread from:

RE: Draft list of all API calls within the Steem codebase

in #dawn-network9 years ago

find steem|grep api.cpp$|xargs cat|grep api::|grep -v ASSERT|grep -v '^ '|grep -v '^/'|sed 's/ / /g'|sed 's/ / /g'|sed 's/^ //g'

Just for fun, thought I'd take a swipe at removing some of the pipelines. I think this is more or less the same thing...

find steem -name \*api.cpp -exec sed -n '/ASSERT/ d;/^\// d;/^ / d;s/  */ /g;/api\:\:/ p' {} \;
Sort:  

btw, two of the functions get chopped out of the code, one of them has a very long parameter list one to a line, and another one with a break. I used grep \($ to isolate them so I could manually add their parameters.

Yeah, so many pipes is just an easy way to build up the correct substitutions and filters bit by bit until you have the right lines coming out.