-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
39 lines (32 loc) · 1015 Bytes
/
main.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
import os
from datetime import date, time, datetime
import datetime
total_day = 366 #total days back
commit_frequency = 10 #commit time per day
repo_link = "https://github.com/AmericanSoprano/gas.git"
tl = total_day #time day
ctr = 1
now = datetime.datetime.now()
f = open("commit.txt", "w")
os.system("git config user.name")
os.system("git config user.email")
os.system("git init")
pointer = 0
while tl > 0:
ct = commit_frequency
while ct > 0:
f = open("commit.txt", "a+")
l_date = now + datetime.timedelta(days=-pointer)
formatdate = l_date.strftime("%Y-%m-%d")
f.write(f"commit ke {ctr}: {formatdate}\n")
f.close()
os.system("git add .")
os.system(f"git commit --date=\"{formatdate} 12:15:10\" -m \"commit ke {ctr}\"")
print(f"commit ke {ctr}: {formatdate}")
ct-=1
ctr+=1
pointer+=1
tl-=1
os.system(f"git remote add origin {repo_link}")
os.system("git branch -M main")
os.system("git push -u origin main -f")