Created
July 24, 2020 06:09
-
-
Save tcmhoang/6c3cee18856750b69f97d5f5d12ce07a 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
def loadHTMLCode(): | |
print('Loading codes form HTML files') | |
res = [] | |
with open("input.txt",'r') as inFile: | |
for line in inFile: | |
s = line.strip(); | |
words = s.split("\\") | |
tmp = "\\\\".join(words) | |
tmpWords = tmp.split('"') | |
res.append('\\"'.join(tmpWords)) | |
print(len(res), "lines loaded.") | |
return res | |
def convertHTMLtoJPSCode(res): | |
print(*("out.println(\"{0}\");".format(line) for line in res), sep="\n") | |
convertHTMLtoJPSCode(loadHTMLCode()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment