Skip to content

Commit 4836304

Browse files
authored
Merge pull request #6 from LinJHS/dev
2 parents 4891cbb + e963dec commit 4836304

5 files changed

Lines changed: 21 additions & 4 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM python:3.11-slim
22
WORKDIR /app
33

4-
COPY requirements.txt ./
4+
COPY requirements-docker.txt ./requirements.txt
55
RUN pip install --no-cache-dir -r requirements.txt
66

77
COPY . .

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
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)
1010

11-
**一个轻量级的、基于 Web 的 Windows 文件夹自定义工具(desktop.ini 管理器)**
11+
**一个轻量级的、基于 Web 的 Windows 文件夹自定义工具。**
1212

1313
[English Version](README_EN.md) | [Wiki](https://github.com/LinJHS/win-folder-manager/wiki) | [功能特性](#-功能特性)[安装](#-安装)[使用](#-使用)[Docker](#-docker-支持)[开发](#-开发)
1414

1515
</div>
1616

1717
---
1818

19-
**Win Folder Manager** 允许您通过简洁的 Web 界面轻松自定义 Windows 文件夹,修改其 `desktop.ini` 文件。无需手动编辑隐藏的系统文件,即可设置自定义图标、别名(本地化名称)和提示信息。
19+
**Win Folder Manager** 允许您通过简洁的 Web 界面轻松自定义 Windows 文件夹。无需手动编辑隐藏的系统文件,即可设置自定义图标、别名(本地化名称)和提示信息。
2020

2121
## ✨ 功能特性
2222

@@ -44,6 +44,11 @@ cd win-folder-manager
4444
pip install .
4545
```
4646

47+
> **注意**:如果您在 Linux 或 Docker 环境下开发,请使用 `requirements-docker.txt` 安装依赖,以避免 `pywin32` 安装失败:
48+
> ```bash
49+
> pip install -r requirements-docker.txt
50+
> ```
51+
4752
## 🚀 使用
4853
4954
安装完成后,只需运行:

README_EN.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
---
1818

19-
**Win Folder Manager** allows you to easily customize Windows folders by modifying their `desktop.ini` files through a clean Web UI. Set custom icons, aliases (localized names), and info tips without manually editing hidden system files.
19+
**Win Folder Manager** allows you to easily customize Windows folders through a clean Web UI. Set custom icons, aliases (localized names), and info tips without manually editing hidden system files.
2020

2121
## ✨ Features
2222

@@ -44,6 +44,11 @@ cd win-folder-manager
4444
pip install .
4545
```
4646

47+
> **Note**: If you are developing on Linux or Docker, use `requirements-docker.txt` to avoid `pywin32` installation errors:
48+
> ```bash
49+
> pip install -r requirements-docker.txt
50+
> ```
51+
4752
## 🚀 Usage
4853
4954
Once installed, simply run:

manager/logic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def set_attributes(self, folder_path, ini_path):
1616
核心操作:设置文件为系统+隐藏,文件夹为只读。
1717
这是Windows识别自定义图标的必要条件。
1818
"""
19+
if os.name != 'nt':
20+
return
21+
1922
if os.path.exists(ini_path):
2023
subprocess.run(['attrib', '+s', '+h', ini_path], shell=True)
2124

@@ -24,6 +27,9 @@ def set_attributes(self, folder_path, ini_path):
2427

2528
def remove_attributes_before_write(self, ini_path):
2629
"""写入前必须移除系统和隐藏属性,否则无法写入"""
30+
if os.name != 'nt':
31+
return
32+
2733
if os.path.exists(ini_path):
2834
subprocess.run(['attrib', '-s', '-h', ini_path], shell=True)
2935

requirements-docker.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flask

0 commit comments

Comments
 (0)