Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create BUG反馈.md #38

Closed
wants to merge 1 commit into from
Closed

Create BUG反馈.md #38

wants to merge 1 commit into from

Conversation

konglquan
Copy link

No description provided.

@konglquan
Copy link
Author

BUG反馈.md

@konglquan
Copy link
Author

他不会扫描所有的子目录,只要是嵌套多层的文件夹就无法正常更新

@Cp0204
Copy link
Owner

Cp0204 commented Sep 28, 2024

你好,感谢反馈!

这个“bug”是程序逻辑,在这个项目中,是符合正则规则的文件/文件夹才转存,随后才是替换。

在你的案例中 /【16】陈八十25年国考粉笔27季度解析 目录不含公众号字符,所以(.+)公众号(.+)不会转存,而(.+)粉笔(.+)可以。

重命名也是一样:

if re.search(pattern, dir_file["file_name"]):
save_name = (
re.sub(pattern, replace, dir_file["file_name"])
if replace != ""
else dir_file["file_name"]
)

另外,嵌套目录的更新通过 update_subdir 键值配置。

实际上程序设计得非常灵活,这份配置可能符合你需求:

    {
      "taskname": "【16】陈八十25年国考粉笔27季度解析",
      "shareurl": "https://pan.quark.cn/s/27c3a8221f69",
      "savepath": "/【16】陈八十25年国考粉笔27季度解析",
      "pattern": "(.+)公众号(.+)|(.*)",
      "replace": "\\1\\2\\3",
      "enddate": "",
      "emby_id": "",
      "ignore_extension": false,
      "runweek": [
        1,
        2,
        3,
        4,
        5,
        6,
        7
      ],
      "update_subdir": ".*"
    }

@Cp0204
Copy link
Owner

Cp0204 commented Sep 28, 2024

image

image

@konglquan
Copy link
Author

大佬牛逼 太感谢了!!!

@Cp0204 Cp0204 closed this Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants