-
Notifications
You must be signed in to change notification settings - Fork 30
/
readme Generation for folders.py
50 lines (32 loc) · 1.34 KB
/
readme Generation for folders.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'''
######################################################
Welcome to coder club
A fully self made repo by Rahul Surana
You can use any of these files and twig them to your use
have fun and also star mark this repo more to come
########################################################
'''
import os
from os.path import isfile, join
import urllib.parse
fs = open("README.md", "w")
fs.write("# *Welcome To My Repository*\n")
fs.write("### <div style='text-align:right'><sub> - Rahul Surana</sub></div>\n")
fs.write("### Going To Update This Repo Time To Time As I Continue My Journey To Competitive Programming\n")
fs.write("### Please Do Star the Repo if it ever helps you. Also Would Like to Form a Community So we all can grow Together\n")
fs.write("### HYPERLINK To Code\n***\n")
dic = {}
for r,d,f in list(os.walk(os.getcwd())):
# print(f)
for files in f:
if files[-3:] == ".py":
dic[files[:-3]] = (("./"+"%20".join(list(files.split(" ")))).replace("?","%3F"))
fs.write("- [ "+files[:-3]+" ]("+dic[files[:-3]]+")\n")
else:
dic[files[:-4]] = (("./"+"%20".join(list(files.split(" ")))).replace("?","%3F"))
fs.write("- [ "+files[:-4]+" ]("+dic[files[:-4]]+")\n")
# print(dic)
c = len(dic)
print(f"### Total Code Count : {c}")
fs.write(f"\n### Total Code Count : {c}")
fs.close()