-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathreadme Generation.py
52 lines (33 loc) · 1.46 KB
/
readme Generation.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
51
52
'''
######################################################
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
fs = open("README.md", "w")
fs.write("# *Welcome To Coding Club*\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("- [ Whatsapp Group Link ](https://chat.whatsapp.com/FUV7H9SIBYKD3C5tgDluI6) \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]] = urllib.quote_plus(("./"+"%20".join(list(files.split(" ")))).replace("?","%3F"))
fs.write("- [ "+files[:-3]+" ]("+dic[files[:-3]]+") \n")
else:
dic[files[:-4]] = urllib.quote_plus(("./"+"%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"### Total Code Count : {c}")
fs.close()