mirror of
				https://github.com/walkxcode/dashboard-icons.git
				synced 2025-10-27 13:39:03 +08:00 
			
		
		
		
	Co-authored-by: Bjorn Lammers <walkxnl@gmail.com> Co-authored-by: Prakash Palanisamy <prakash_gitea@itsprakash.in> Co-authored-by: Prakash Palanisamy <51423001+itsprakashp@users.noreply.github.com> Co-authored-by: Dashboard Icons Bot <noreply@walkx.fyi>
This commit is contained in:
		
							
								
								
									
										10
									
								
								_ci.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								_ci.py
									
									
									
									
									
								
							| @@ -2,8 +2,8 @@ import pathlib | ||||
| from pathlib import Path | ||||
|  | ||||
| root = pathlib.Path(__file__).parent.resolve() | ||||
| template_path = root / "_TEMPLATE.md" | ||||
| readme_path = root / "README.md" | ||||
| icons_template_path = root / "_ICONS_TEMPLATE.md" | ||||
| icons_path = root / "ICONS.md" | ||||
|  | ||||
|  | ||||
| def generate_img_tag(file): | ||||
| @@ -15,7 +15,7 @@ img_tags = [generate_img_tag(x) for x in imgs] | ||||
| line_number = 0 | ||||
|  | ||||
| # Read the template file | ||||
| with open(template_path, "r", encoding="UTF-8") as f: | ||||
| with open(icons_template_path, "r", encoding="UTF-8") as f: | ||||
|     lines = f.readlines() | ||||
| # Find the line that starts with "<!-- ICONS -->" | ||||
| for line in lines: | ||||
| @@ -25,8 +25,8 @@ for line in lines: | ||||
| # Insert the icons after the line | ||||
| lines.insert(line_number + 1, " ".join(img_tags)) | ||||
| # Write the new file | ||||
| with open(readme_path, "w", encoding="UTF-8") as f: | ||||
| with open(icons_path, "w", encoding="UTF-8") as f: | ||||
|     f.write("".join(lines)) | ||||
|     f.write("\n") | ||||
| print("Done!") | ||||
| print("Please commit the new README.md file.") | ||||
| print("Please commit the new ICONS.md file.") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Bjorn Lammers
					Bjorn Lammers