Last active
December 13, 2020 22:13
-
-
Save davaymne/283e1752ff2c1adac001e483ecd6a462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
with open(sys.argv[1], 'r') as f: | |
n = 0 | |
for line in f: | |
if len(line) > n: | |
n = len(line) | |
with open(sys.argv[1], 'r') as f: | |
for line in f: | |
new = '{}{}'.format(line[0].lower(), line[1:]).strip().ljust(n) | |
l = r"query { %s } => <K> * $EFPRICE * $DAI;" % (new) | |
print(l) | |
with open(sys.argv[1], 'r') as f: | |
for line in f: | |
new = '{}{}s'.format(line[0].lower(), line[1:].strip()).strip().ljust(n+1) | |
l = r"query { %s (first: $first, skip: $skip) } => <K> * $EFPRICE * $DAI;" % (new) | |
print(l) | |
with open(sys.argv[1], 'r') as f: | |
for line in f: | |
new = '{}{}s'.format(line[0].lower(), line[1:].strip()).strip().ljust(n+1) | |
l = r"query { %s } => <K> * $EFPRICE * $DAI;" % (new) | |
print(l) | |
print('default => <K> * $EFPRICE * $DAI;') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment