mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-06-24 14:45:49 +02:00
Deletion of sys
as it is unuseed
Also: * Fixing flake8 issue
This commit is contained in:
parent
deed6786ef
commit
a49fc7af44
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
from string import Template
|
from string import Template
|
||||||
|
|
||||||
|
@ -75,17 +74,15 @@ def main():
|
||||||
with open(os.path.join(data[key]["location"],
|
with open(os.path.join(data[key]["location"],
|
||||||
README_FILENAME), "wt") as out:
|
README_FILENAME), "wt") as out:
|
||||||
for line in open(README_TEMPLATE):
|
for line in open(README_TEMPLATE):
|
||||||
line = line.replace('@GEN_DATE@', time.strftime("%B %d %Y",
|
line = line.replace('@GEN_DATE@', time.strftime("%B %d %Y", time.gmtime()))
|
||||||
time.gmtime()))
|
line = line.replace('@EXTENSIONS@', extensions_str)
|
||||||
line = line.replace('@EXTENSIONS@',extensions_str)
|
|
||||||
line = line.replace('@EXTENSIONS_HEADER@', extensions_header)
|
line = line.replace('@EXTENSIONS_HEADER@', extensions_header)
|
||||||
line = line.replace('@NUM_ENTRIES@',
|
line = line.replace('@NUM_ENTRIES@', "{:,}".format(data[key]["entries"]))
|
||||||
"{:,}".format(data[key]["entries"]))
|
line = line.replace('@SUBFOLDER@', os.path.join(data[key]["location"], ''))
|
||||||
line = line.replace('@SUBFOLDER@', os.path.join(
|
|
||||||
data[key]["location"], ''))
|
|
||||||
line = line.replace('@TOCROWS@', toc_rows)
|
line = line.replace('@TOCROWS@', toc_rows)
|
||||||
line = line.replace('@SOURCEROWS@', source_rows)
|
line = line.replace('@SOURCEROWS@', source_rows)
|
||||||
out.write(line)
|
out.write(line)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user