generated from IntensiveCoLearning/template
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from web3suggest/main
updategithubid
- Loading branch information
Showing
42 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Name,GitHubID | ||
Elemen,404ll | ||
Muxin,muxin-web3 | ||
Zemmer,Huowuge | ||
alex_lee,alex lee | ||
mark,markerup | ||
wayhome,wayhome | ||
Lu,LRlulu | ||
gills,gillsgills | ||
Ray,rayjun | ||
Nova_Notes,novac42code | ||
Xue-L,Chen-XueLing | ||
Affe,imaffe | ||
yuxing,yuxing11 | ||
leokkk,leokkk88 | ||
Ric-Li-C,linghuccc | ||
WENDY123,WENDY1233211991 | ||
lyi,jjeejj | ||
Defi 残酷共学-Mark,markerup | ||
唐三水,Tunnelai | ||
haomiao,mmssddss | ||
Derick,DerickIT | ||
xiaodongQ,xiaodongQ | ||
Young-Jeff,Young-Jeff | ||
qiaopengjun,qiaopengjun5162 | ||
Punkcan,punkcanyang | ||
YuKirasawa,YuKirasawa | ||
hython,joyc | ||
Anchor,TheHeBoy | ||
Sifotd,Sifotd | ||
Stella,LunaWang5209 | ||
Helios,HeliosLz | ||
dethan3,dethan3 | ||
John,Joan1caster | ||
btou,btou666 | ||
Ellen,Ellenp2p | ||
char,charlottyge | ||
Kristin,L1rul1n | ||
Coooder,Coooder-Crypto | ||
Neal,snaildarter | ||
wureny,wureny | ||
evilgenius,Glances | ||
Q,mon1y | ||
Naomi,boombb12138 | ||
breeze,weifengHuang | ||
Harris,Harriswww | ||
hansen,nocb | ||
wzl,wzl521 | ||
tiao,notthere-2023 | ||
wodeche,wodeche | ||
Oscar,luffythink | ||
zedz,zedz |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import pandas as pd | ||
import os | ||
|
||
def read_csv_data(file_path): | ||
""" | ||
读取CSV文件并返回包含name和GitHubid的字典列表 | ||
""" | ||
try: | ||
df = pd.read_csv(file_path) | ||
return df[['Name', 'GitHubID']].to_dict(orient='records') | ||
except Exception as e: | ||
print(f"Error reading CSV: {e}") | ||
return None | ||
|
||
def rename_md_files(csv_data): | ||
""" | ||
根据CSV数据重命名.md文件 | ||
""" | ||
if not csv_data: | ||
print("No CSV data available for renaming files.") | ||
return | ||
|
||
for item in csv_data: | ||
old_filename = f"{item['Name']}.md" | ||
new_filename = f"{item['GitHubID']}.md" | ||
|
||
if os.path.exists(old_filename): | ||
try: | ||
os.rename(old_filename, new_filename) | ||
print(f"Renamed {old_filename} to {new_filename}") | ||
except Exception as e: | ||
print(f"Error renaming {old_filename}: {e}") | ||
else: | ||
print(f"File not found: {old_filename}") | ||
|
||
def main(): | ||
# CSV文件路径 | ||
csv_file_path = 'DeFi.csv' # 请确保这是正确的CSV文件路径 | ||
|
||
# 读取CSV文件 | ||
csv_data = read_csv_data(csv_file_path) | ||
|
||
# 重命名文件 | ||
if csv_data: | ||
rename_md_files(csv_data) | ||
else: | ||
print("Failed to read CSV data. File renaming process aborted.") | ||
|
||
if __name__ == "__main__": | ||
main() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.