-
Notifications
You must be signed in to change notification settings - Fork 30
/
readme Generation.py
63 lines (39 loc) · 2.55 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
53
54
55
56
57
58
59
60
61
62
63
'''
######################################################
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
f = open("README.md", "w")
f.write("# *Welcome To My Repository*\n")
f.write("### <div style='text-align:right'><sub> - Rahul Surana</sub></div>\n")
f.write("### Going To Update This Repo Time To Time As I Continue My Journey To Competitive Programming\n")
f.write("#### This Repository also contents my journey to corporate life along with the interview questions from lots of companys like Amazon , Juspay , oneCode , Relevel , Wissen , ThoughtWorks , Flyo , Clippd and many more ... \n")
f.write("#### Here are links to some of my profile \n")
f.write('</a> <!-- Leetcode --><a href="https://leetcode.com/rasuru04/" target="_blank"> <img src="https://miro.medium.com/max/1838/1*gBkMCGTAdSk4tu17SCa7RQ.png" alt="leetcode" width="100" height="45"/> </a>')
f.write(' <!-- CodeChef --><a href="https://www.codechef.com/users/suru_4851" target="_blank"> <img src="https://cdn.codechef.com/sites/all/themes/abessive/cc-logo.png" alt="codechef" width="100" height="45"/> </a>')
f.write(' <!-- Hacker Earth --><a href="https://www.hackerearth.com/@Rahul_surana" target="_blank"> <img src="https://static-fastly.hackerearth.com/newton/static/images/he-header-logo.svg" alt="hackerearth" width="150" height="45"/> </a>')
f.write(' <!-- Code Forces --><a href="https://codeforces.com/profile/suru_4851" target="_blank"> <img src="https://codeforces.org/s/55900/images/codeforces-sponsored-by-ton.png" alt="codeforce" width="150" height="45"/> </a>\n')
f.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")
f.write("### HYPERLINK To Code\n***\n")
dic = {}
ml = 0
f.write("| Platform | Problem Count |\n")
f.write("| -------- | ------------- |\n")
for dirs in list(os.listdir(".")):
if "." not in dirs:
dic[dirs] = ("./"+"%20".join(list(dirs.split(" "))))
x = f"[ {dirs} ]({dic[dirs]})"
y = f" {str(len(list(os.listdir(dirs))))}"
# print(len(dirs))
s = f"| {x} | {y} |\n"
ml+=int(y)
f.write(s)
# print(dic)
c = ml
print(f"### Total Code Count : {c}")
f.write(f"\n### Total Code Count : {c}")
f.close()