Skip to content

Commit

Permalink
Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-cq committed Mar 3, 2024
1 parent 57a630e commit dee6272
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Alist 同步工具

## 本地运行

```bash
python -m alist_sync -c "<config-file.yaml>"
```
1. 克隆并cd到存储库: `git clone https://github.com/lee-cq/alist-sync.git && cd alist-sync`
2. 创建配置文件[配置模版](./config-template.yaml)`cp config-template.yaml config.yaml`
3. 配置AList服务端(可以是远程的)
4. Linux: `./bootstrap.sh main sync` Windows: `python -m alist_aync sync`

## Actions 运行

Expand All @@ -30,7 +31,6 @@ python -m alist_sync -c "<config-file.yaml>"

### 1. copy 简单复制 (已实现)


#### 工作原理:

将源目录中的文件分别同步到全部的目标目录中,
Expand Down
4 changes: 2 additions & 2 deletions alist_sync/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def timeout_input(msg, default, timeout=3):

def transfer_speed(size, start: datetime.datetime, end: datetime.datetime) -> str:
"""转换速度"""
speed = size * 2 / (end - start).seconds
speed = (size * 2) / (end - start).seconds
if speed < 1024:
return f"{speed}B/s"
return f"{speed:.2f}B/s"
speed /= 1024
if speed < 1024:
return f"{speed:.2f}KB/s"
Expand Down
2 changes: 1 addition & 1 deletion alist_sync/d_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def checker(
source_path=source_path,
target_path=target_path,
)
logger.debug(f"Checked: [JUMP] {source_path.as_uri()}")
logger.info(f"Checked: [JUMP] {source_path.as_uri()}")
return None


Expand Down
2 changes: 1 addition & 1 deletion alist_sync/notice/_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def send(self, data: str):
"",
json={
"msg_type": "text",
"content": {"text":data},
"content": {"text": data},
},
)

Expand Down

0 comments on commit dee6272

Please sign in to comment.