Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit ccc96f1

Browse files
committed
api decode and Makefile now consistent - no leading slash
1 parent b5c1f60 commit ccc96f1

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

CloudFlare/api_decode_from_web.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ def do_section(section):
2424
if len(cmd) == 0:
2525
continue
2626
action = cmd[0]
27-
cmd = '/' + ''.join(cmd[1:])
2827
if action == '' or action not in API_TYPES:
2928
continue
29+
cmd = ''.join(cmd[1:])
30+
if cmd[0] == '/':
31+
cmd = cmd[1:]
3032
v = {'deprecated': deprecated, 'action': action, 'cmd': cmd}
3133
cmds.append(v)
3234
return cmds

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ lint:
7878

7979
api:
8080
@tmp=/tmp/_$$$$_ ; \
81-
python -m cli4 --dump | sort > $$tmp.1 ; \
82-
python -m cli4 --api | sed -e 's/?.*//' -e 's/.* //' -e 's/\/:[^:\/]*//g' | sort | uniq > $$tmp.2 ; \
81+
python -m cli4 --dump | sed -e 's/^\///' | sort > $$tmp.1 ; \
82+
python -m cli4 --api | sed -e 's/.* //' -e 's/\/:[^:\/]*//g' -e 's/^\///' | sort | uniq > $$tmp.2 ; \
8383
echo "In code:" ; \
8484
diff $$tmp.1 $$tmp.2 | egrep '< ' | sed -e 's/< / /' | sort ; \
8585
echo "In docs:" ; \
86-
diff $$tmp.1 $$tmp.2 | egrep '> ' | sed -e 's/< / /' | sort ; \
86+
diff $$tmp.1 $$tmp.2 | egrep '> ' | sed -e 's/> / /' | sort ; \
8787
rm $$tmp.?
8888

8989
clean:

0 commit comments

Comments
 (0)