Skip to content

Commit 8bb5771

Browse files
Merge pull request #2 from Mr-Sunglasses/actions/black
2 parents 7a5df9b + 5bca306 commit 8bb5771

File tree

1 file changed

+33
-9
lines changed

1 file changed

+33
-9
lines changed

script.py

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,38 @@
1-
import os
1+
import os
22
import time
33

44
import argparse as parsing
55

66

7-
parser = parsing.ArgumentParser(description="ReadME.md to .html writer",formatter_class=parsing.ArgumentDefaultsHelpFormatter)
8-
9-
parser.add_argument('-i', '--input', action='store', type=str, required=True, help="name of the input file eg. template.html")
10-
parser.add_argument('-t', '--title', action='store', type=str, default='Progress', help="title of the html page." )
11-
parser.add_argument('-o', '--output', action='store', type=str, required=True, help="the generated output file name , which is generated in dist folder. eg. template.html")
7+
parser = parsing.ArgumentParser(
8+
description="ReadME.md to .html writer",
9+
formatter_class=parsing.ArgumentDefaultsHelpFormatter,
10+
)
11+
12+
parser.add_argument(
13+
"-i",
14+
"--input",
15+
action="store",
16+
type=str,
17+
required=True,
18+
help="name of the input file eg. template.html",
19+
)
20+
parser.add_argument(
21+
"-t",
22+
"--title",
23+
action="store",
24+
type=str,
25+
default="Progress",
26+
help="title of the html page.",
27+
)
28+
parser.add_argument(
29+
"-o",
30+
"--output",
31+
action="store",
32+
type=str,
33+
required=True,
34+
help="the generated output file name , which is generated in dist folder. eg. template.html",
35+
)
1236

1337
args = parser.parse_args()
1438

@@ -17,7 +41,7 @@
1741
OUTPUT_NAME = args.output
1842

1943
try:
20-
os.system('npm install github-readme-to-html')
44+
os.system("npm install github-readme-to-html")
2145
except:
2246
print("NPM is not Installed")
2347
print("Try : sudo apt install nodejs | sudo apt install npm ")
@@ -27,6 +51,6 @@
2751
time.sleep(15)
2852

2953
try:
30-
os.system(f'npx github-readme-to-html -i {FILE_NAME} -t {TITLE} -o {OUTPUT_NAME}')
54+
os.system(f"npx github-readme-to-html -i {FILE_NAME} -t {TITLE} -o {OUTPUT_NAME}")
3155
except:
32-
print("Please Check If file is exit")
56+
print("Please Check If file is exit")

0 commit comments

Comments
 (0)