Skip to content

Commit

Permalink
Merge branch 'devel' into pure-py
Browse files Browse the repository at this point in the history
# Conflicts:
#	ktoolbox/configuration.py
#	ktoolbox/editor.py
  • Loading branch information
Ljzd-PRO committed Oct 26, 2024
2 parents 4147b92 + 95f091f commit 7d43453
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@

### 💡 Feature

- Added a graphical configuration editor, making configuration editing simple and convenient.
- Added a **graphical configuration editor**, making configuration editing simple and convenient.
- Run `ktoolbox config-editor`
- Added a command to generate a complete sample configuration file.
- Run `ktoolbox example-env`
- **Python** versions below 3.8.1 (**<3.8.1**) are no longer supported

[//]: # (### 🪲 Fix)

- - -

### 💡 新特性

- 新增图形化配置编辑器,配置编辑将变得简单方便
- 新增 **图形化配置编辑器**,配置编辑将变得简单方便
- 运行 `ktoolbox config-editor`
- 新增命令可生成完整的配置文件样例
- 运行 `ktoolbox example-env`
- **Python** 3.8.1 以下 (**<3.8.1**) 的版本不再受支持

[//]: # (### 🪲 修复)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ Goto [Shortcuts for iOS](https://ktoolbox.readthedocs.io/latest/shortcut/) page

Goto [Configuration-Guide](https://ktoolbox.readthedocs.io/latest/configuration/guide/) page for more details.

![KToolBox Configuration Editor](https://cdn.jsdelivr.net/gh/Ljzd-PRO/KToolBox@latest/static/preview-2.png)
![KToolBox Configuration Editor](https://cdn.jsdelivr.net/gh/Ljzd-PRO/KToolBox@latest/static/preview-3.png)
![KToolBox Configuration Editor](static/preview-2.png)
![KToolBox Configuration Editor](static/preview-3.png)

## Other Branches

Expand Down
4 changes: 2 additions & 2 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ ktoolbox sync-creator https://kemono.su/fanbox/user/9016 --start-time=2024-1-1 -

前往 [配置-向导](https://ktoolbox.readthedocs.io/latest/zh/configuration/guide/) 页面查看更多详情。

![KToolBox 配置编辑器](https://cdn.jsdelivr.net/gh/Ljzd-PRO/KToolBox@latest/static/preview-2.png)
![KToolBox 配置编辑器](https://cdn.jsdelivr.net/gh/Ljzd-PRO/KToolBox@latest/static/preview-3.png)
![KToolBox 配置编辑器](static/preview-2.png)
![KToolBox 配置编辑器](static/preview-3.png)

## 其他分支

Expand Down
3 changes: 1 addition & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
| 3.11.x | :white_check_mark: |
| 3.10.x | :white_check_mark: |
| 3.9.x | :white_check_mark: |
| 3.8.x | :white_check_mark: |
| <= 3.7 | :x: |
| < 3.8.1 | :x: |

## Reporting a Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion ktoolbox/action/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

def generate_post_path_name(post: Post) -> str:
"""Generate directory name for post to save."""
if config.job.post_id_as_path or not post.title:
if not post.title:
return post.id
else:
try:
Expand Down
3 changes: 0 additions & 3 deletions ktoolbox/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
import os
import tempfile
import warnings
from pathlib import Path
from typing import Literal, Union, Optional, Any, Set

Expand Down Expand Up @@ -135,7 +134,6 @@ class JobConfiguration(BaseModel):
| ``edited`` | Date |
:ivar count: Number of coroutines for concurrent download
:ivar post_id_as_path: (**Deprecated**) Use post ID as post directory name
:ivar post_dirname_format: Customize the post directory name format, you can use some of the \
[properties][ktoolbox.configuration.JobConfiguration] in ``Post``. \
e.g. ``[{published}]{id}`` > ``[2024-1-1]123123``, ``{user}_{published}_{title}`` > ``234234_2024-1-1_HelloWorld``
Expand All @@ -153,7 +151,6 @@ class JobConfiguration(BaseModel):
:ivar block_list: Not to download files which match these patterns (Unix shell-style), e.g. ``["*.psd","*.zip"]``
"""
count: int = 4
post_id_as_path: bool = False
post_dirname_format: str = "{title}"
post_structure: PostStructureConfiguration = PostStructureConfiguration()
mix_posts: bool = False
Expand Down
Binary file modified static/preview-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/preview-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7d43453

Please sign in to comment.