Skip to content

Commit

Permalink
Update generate_clash_config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gtxy27 authored Nov 8, 2024
1 parent d7af344 commit 3a0380a
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions generate_clash_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,6 @@
print(f"The current working directory is: {current_directory}")
script_directory = os.path.dirname(os.path.abspath(__file__))
print(f"The script is located in: {script_directory}")
def print_directory_tree(start_path='.'):
# 获取当前工作目录的绝对路径
current_directory = os.getcwd()

for root, dirs, files in os.walk(start_path):
# 计算相对路径
relative_root = os.path.relpath(root, current_directory)

# 打印当前目录路径
level = relative_root.count(os.sep)
indent = ' ' * 4 * level
print(f"{indent}[{relative_root}/]")

# 打印该目录下的文件
sub_indent = ' ' * 4 * (level + 1)
for file in files:
print(f"{sub_indent}{file}")

# 显示当前执行目录的相对路径的目录树
print_directory_tree()
if not rule_files:
print("Error: No .rule files found.")

Expand Down

0 comments on commit 3a0380a

Please sign in to comment.