Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
api decode and Makefile now consistent - no leading slash
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Jul 13, 2020
1 parent b5c1f60 commit ccc96f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CloudFlare/api_decode_from_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ def do_section(section):
if len(cmd) == 0:
continue
action = cmd[0]
cmd = '/' + ''.join(cmd[1:])
if action == '' or action not in API_TYPES:
continue
cmd = ''.join(cmd[1:])
if cmd[0] == '/':
cmd = cmd[1:]
v = {'deprecated': deprecated, 'action': action, 'cmd': cmd}
cmds.append(v)
return cmds
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ lint:

api:
@tmp=/tmp/_$$$$_ ; \
python -m cli4 --dump | sort > $$tmp.1 ; \
python -m cli4 --api | sed -e 's/?.*//' -e 's/.* //' -e 's/\/:[^:\/]*//g' | sort | uniq > $$tmp.2 ; \
python -m cli4 --dump | sed -e 's/^\///' | sort > $$tmp.1 ; \
python -m cli4 --api | sed -e 's/.* //' -e 's/\/:[^:\/]*//g' -e 's/^\///' | sort | uniq > $$tmp.2 ; \
echo "In code:" ; \
diff $$tmp.1 $$tmp.2 | egrep '< ' | sed -e 's/< / /' | sort ; \
echo "In docs:" ; \
diff $$tmp.1 $$tmp.2 | egrep '> ' | sed -e 's/< / /' | sort ; \
diff $$tmp.1 $$tmp.2 | egrep '> ' | sed -e 's/> / /' | sort ; \
rm $$tmp.?

clean:
Expand Down

0 comments on commit ccc96f1

Please sign in to comment.