mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-22 03:05:13 -04:00
feat: symlink common cursor svg files using svg/link.py
This commit is contained in:
parent
b81a2d7ef1
commit
9bda24f303
50 changed files with 88 additions and 1009 deletions
39
svg/link.py
Normal file
39
svg/link.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from glob import glob
|
||||
|
||||
ignore_files = [
|
||||
# animated
|
||||
"left_ptr_watch.svg",
|
||||
# static
|
||||
"center_ptr.svg",
|
||||
"circle.svg",
|
||||
"context-menu.svg",
|
||||
"copy.svg",
|
||||
"left_ptr.svg",
|
||||
"link.svg",
|
||||
"pointer-move.svg",
|
||||
"right_ptr.svg",
|
||||
]
|
||||
|
||||
|
||||
def link_svg_dir(src_dir, dst_dir) -> None:
|
||||
for src_path in glob(f"{src_dir}/*"):
|
||||
file_name = os.path.basename(src_path)
|
||||
if file_name not in ignore_files:
|
||||
dst = os.path.join(dst_dir, file_name)
|
||||
if os.path.exists(dst):
|
||||
print(f"Removing old symlink of '{file_name}'")
|
||||
os.remove(dst)
|
||||
print(f"Creating symlink of '{file_name}'")
|
||||
os.symlink(
|
||||
os.path.relpath(src_path, f"{dst_dir}/"),
|
||||
dst,
|
||||
)
|
||||
else:
|
||||
print(f"Ignoring file '{file_name}'")
|
||||
|
||||
|
||||
link_svg_dir("original/static", "modern/static")
|
||||
link_svg_dir("original/animated", "modern/animated")
|
Loading…
Add table
Add a link
Reference in a new issue