Skip to content

Commit 8a32de9

Browse files
authored
Merge pull request #7 from LinJHS/dev
2 parents 4836304 + be2e61e commit 8a32de9

9 files changed

Lines changed: 50 additions & 8 deletions

File tree

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div align="center">
44

55
[![PyPI version](https://img.shields.io/pypi/v/win-folder-manager.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/win-folder-manager/)
6-
[![Docker Pulls](https://img.shields.io/docker/pulls/linjhs/manager.svg?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/r/linjhs/manager)
6+
[![Docker Pulls](https://img.shields.io/docker/pulls/linjhs/win-folder-manager.svg?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/r/linjhs/win-folder-manager)
77
[![Build Status](https://github.com/LinJHS/win-folder-manager/actions/workflows/publish.yml/badge.svg)](https://github.com/LinJHS/win-folder-manager/actions)
88
[![Python Versions](https://img.shields.io/pypi/pyversions/win-folder-manager.svg?style=flat-square&logo=python&logoColor=white)](https://pypi.org/project/win-folder-manager/)
99
[![License](https://img.shields.io/github/license/LinJHS/win-folder-manager.svg?style=flat-square)](https://github.com/LinJHS/win-folder-manager/blob/main/LICENSE)
@@ -28,6 +28,14 @@
2828
- 🚀 **Web 界面**:基于 Flask 的简单 UI,通过浏览器即可访问。
2929
- 💾 **持久化配置**:配置文件自动保存到 `%APPDATA%`,更新不丢失。
3030

31+
## 📸 界面预览
32+
33+
| 管理主页 | 属性编辑 |
34+
| :---: | :---: |
35+
| <img src="imgs/02-dashboard.png" width="100%"> | <img src="imgs/03-edit-attributes.png" width="100%"> |
36+
| **配置页面** | **资源管理器效果** |
37+
| <img src="imgs/01-configuration.png" width="100%"> | <img src="imgs/04-explorer-preview.png" width="100%"> |
38+
3139
## 📦 安装
3240

3341
### 通过 PyPI 安装 (推荐)
@@ -99,7 +107,11 @@ win-folder-manager --no-browser
99107
您可以使用 Docker 运行 Win Folder Manager。
100108

101109
```bash
102-
docker run -d -p 6800:6800 -v /path/to/your/folders:/data linjhs/manager
110+
docker run -d \
111+
-p 6800:6800 \
112+
-v /path/to/your/folders:/data \
113+
-v win-folder-manager-config:/root/.config/win-folder-manager \
114+
linjhs/win-folder-manager
103115
```
104116

105117
> **注意**:本应用依赖 Windows 特有的命令 (`attrib`) 来设置文件夹属性(系统/隐藏/只读),这是 `desktop.ini` 自定义生效的必要条件。在 Linux 容器中运行可能会限制部分功能,除非用于特定环境或仅作查看用途。
@@ -121,4 +133,4 @@ docker run -d -p 6800:6800 -v /path/to/your/folders:/data linjhs/manager
121133

122134
## 📄 许可证
123135

124-
本项目采用 MIT 许可证 - 详情请参阅 [LICENSE](LICENSE) 文件。
136+
本项目采用 GNU General Public License v3.0 许可证 - 详情请参阅 [LICENSE](LICENSE) 文件。

README_EN.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div align="center">
44

55
[![PyPI version](https://img.shields.io/pypi/v/win-folder-manager.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/win-folder-manager/)
6-
[![Docker Pulls](https://img.shields.io/docker/pulls/linjhs/manager.svg?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/r/linjhs/manager)
6+
[![Docker Pulls](https://img.shields.io/docker/pulls/linjhs/win-folder-manager.svg?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/r/linjhs/win-folder-manager)
77
[![Build Status](https://github.com/LinJHS/win-folder-manager/actions/workflows/publish.yml/badge.svg)](https://github.com/LinJHS/win-folder-manager/actions)
88
[![Python Versions](https://img.shields.io/pypi/pyversions/win-folder-manager.svg?style=flat-square&logo=python&logoColor=white)](https://pypi.org/project/win-folder-manager/)
99
[![License](https://img.shields.io/github/license/LinJHS/win-folder-manager.svg?style=flat-square)](https://github.com/LinJHS/win-folder-manager/blob/main/LICENSE)
@@ -28,6 +28,14 @@
2828
- 🚀 **Web Interface**: Simple Flask-based UI accessible from your browser.
2929
- 💾 **Persistent Config**: Configuration saved automatically in `%APPDATA%`.
3030

31+
## 📸 Screenshots
32+
33+
| Home Dashboard | Edit Attributes |
34+
| :---: | :---: |
35+
| <img src="imgs/02-dashboard.png" width="100%"> | <img src="imgs/03-edit-attributes.png" width="100%"> |
36+
| **Configuration** | **Explorer Preview** |
37+
| <img src="imgs/01-configuration.png" width="100%"> | <img src="imgs/04-explorer-preview.png" width="100%"> |
38+
3139
## 📦 Installation
3240

3341
### via PyPI (Recommended)
@@ -99,7 +107,11 @@ You can configure the root path to scan for folders directly in the Web UI.
99107
You can run Win Folder Manager using Docker.
100108

101109
```bash
102-
docker run -d -p 6800:6800 -v /path/to/your/folders:/data linjhs/manager
110+
docker run -d \
111+
-p 6800:6800 \
112+
-v /path/to/your/folders:/data \
113+
-v win-folder-manager-config:/root/.config/win-folder-manager \
114+
linjhs/win-folder-manager
103115
```
104116

105117
> **Note**: This application relies on Windows-specific commands (`attrib`) to set folder attributes (System/Hidden/ReadOnly) which are required for `desktop.ini` customizations to take effect. Running this in a Linux container may limit functionality unless used in a specific environment or for viewing purposes.
@@ -121,4 +133,4 @@ docker run -d -p 6800:6800 -v /path/to/your/folders:/data linjhs/manager
121133

122134
## 📄 License
123135

124-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
136+
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.

imgs/01-configuration.png

103 KB
Loading

imgs/02-dashboard.png

122 KB
Loading

imgs/03-edit-attributes.png

134 KB
Loading

imgs/04-explorer-preview.png

119 KB
Loading

manager/app.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,19 @@
66
from .logic import FolderManager
77

88
# Use APPDATA for persistent config storage
9-
APPDATA_DIR = os.path.join(os.environ.get('APPDATA', os.path.expanduser('~')), 'win-folder-manager')
9+
def get_config_dir():
10+
if os.name == 'nt':
11+
# Windows: %APPDATA%\win-folder-manager
12+
return os.path.join(os.environ.get('APPDATA', os.path.expanduser('~')), 'win-folder-manager')
13+
else:
14+
# Linux/Docker: ~/.config/win-folder-manager
15+
# Respect XDG_CONFIG_HOME
16+
xdg_config = os.environ.get('XDG_CONFIG_HOME')
17+
if xdg_config:
18+
return os.path.join(xdg_config, 'win-folder-manager')
19+
return os.path.join(os.path.expanduser('~'), '.config', 'win-folder-manager')
20+
21+
APPDATA_DIR = get_config_dir()
1022
if not os.path.exists(APPDATA_DIR):
1123
os.makedirs(APPDATA_DIR)
1224

manager/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Folder Master Pro</title>
6+
<title>Win Folder Manager</title>
77
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
88
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
99
<style>

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,10 @@ def read_requirements():
1919
install_requires=read_requirements(),
2020
python_requires='>=3.8',
2121
entry_points={'console_scripts': ['win-folder-manager=manager.app:main']},
22+
license='GPLv3',
23+
classifiers=[
24+
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
25+
'Programming Language :: Python :: 3',
26+
'Operating System :: Microsoft :: Windows',
27+
],
2228
)

0 commit comments

Comments
 (0)