Skip to content

Commit

Permalink
Merge pull request #195 from web3suggest/main
Browse files Browse the repository at this point in the history
updateuser
  • Loading branch information
muxin-web3 authored Dec 8, 2024
2 parents 612caea + 8527b63 commit 73f5c9a
Show file tree
Hide file tree
Showing 56 changed files with 105 additions and 0 deletions.
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.
50 changes: 50 additions & 0 deletions ReTool.py
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']}_ZICL1st.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 = 'ZK.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.
55 changes: 55 additions & 0 deletions ZK.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Name,GitHubID
ZhaoHong,coderprepares
Neal,Maohua Zhu
XinStar,ludete
Junhua,XieJunhua
Ache,wodeche
Rayerleier,Rayerleier
Lambert,LambertAlpha
Draculabo,Draculabo
Suweet,0530-Suyb
Leo,ququzone
Iyi,jjeejj
cin,kill-er-1
Cora,CHENFANGC
Tim0,tumiao233
YuanboXie,YuanBoXie
AricRedemption,AricRedemption
Derick,DerickIT
Stone,Stonepapa
Xiongyi,WenXiongyi
Oscar,luffythink
Alex,wureny
ChloeZhu,Chloezhu010
Ziicu2019,ziicu2019
Hansen,nocb
xiaodongQ,xiaodongQ
Ray,rayjun
monnaliya,monnaliya
tom_jerry,tomslark123
barry,haobarry
Dust,tmors
Transnature,No-HUL
Antigone4224,antigone4224
Alvan,passer-byzhang
Yiyanwannian,yiyanwannian
GINAYY,GINAYY
Coooder,Coooder-Crypto
liujianyu2022,liujianyu2022
Capybara,Prcentos
billchen-818,billchen-818
hython,joyc
spn,spn21
HazelGong,gongruoz
Punkcan,punkcanyang
Zemmer,Huowuge
Lu,LRlulu
Zedz,zedz
jidalii,jidalii
0xhardman,0xhardman
Kero,keroro520
Warmzhang,zzhenhongg
treesirop,treesirop
btou,btou666
ocean,twiagle
maxwell,maxwell-xing
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.

0 comments on commit 73f5c9a

Please sign in to comment.