-
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.
- Loading branch information
Showing
59 changed files
with
109 additions
and
91 deletions.
There are no files selected for viewing
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.
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
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']}_WICL1st.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 = 'Web3-URL.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.
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,57 @@ | ||
Name,GitHubID | ||
beavnvvv,Beavnvvv | ||
Akagi201,Akagi201 | ||
Oscar,luffythink | ||
YuKirasawa,YuKirasawa | ||
Simon,huanghaox | ||
DawnBlackA,DawnBlackA | ||
k1one,K1ones | ||
Punkcan,punkcanyang | ||
kevin,ztm0929 | ||
ARMIN,ARMIN76L | ||
Jacqueese,Jacqueese | ||
jasonchen,flytiny | ||
ZhaoHong,coderprepares | ||
HAPPY,happyishappy666 | ||
Loxia,DasNarrenschiff | ||
Helios,HeliosLz | ||
Ric-Li-C,linghuccc | ||
Junhua,XieJunhua | ||
hython,joyc | ||
Box,nishuzumi | ||
Peter,coder-blockchain | ||
An,An | ||
Q,mon1y | ||
Bruce,brucexu-eth | ||
Totie,TotieTao | ||
Zedz,zedz | ||
RuoYan,cmu-ruoyan-lgl | ||
Tiào,notthere-2023 | ||
Marcus,MRzzz-cyber | ||
Antigone4224,antigone4224 | ||
Cora,CHENFANGC | ||
alivez,alive-z | ||
Kero,keroro520 | ||
dylan,cherry-yl-sh | ||
AricRedemption,AricRedemption | ||
Cheney,CheneyWong | ||
coconal,coconal | ||
windwh1sper,windwh1sper | ||
CureDreams,CureDreams | ||
Ziicu2019,ziicu2019 | ||
KeShin,xiaoyuanxun | ||
Ray,rayjun | ||
Herschel,Herschel123 | ||
huayun,victoss | ||
Tommy,Tommy-LXDAO | ||
XiaoLSMX,QingzhiXiao | ||
Ache,wodeche | ||
monnaliya,monnaliya | ||
Muxin,muxin-web3 | ||
Jason,zhuyansen | ||
Iyi,jjeejj | ||
wayhome,wayhome | ||
Max,0xdiymax | ||
Derick,DerickIT | ||
Bugmaker,PINKPIG-17 | ||
Coooder,Coooder-Crypto |
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.
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.