Skip to content

Commit

Permalink
📝 docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zrr1999 committed Nov 4, 2024
1 parent ba9472d commit a99a82c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ pip install .
```

## 使用说明
首先创建一个配置文件,例如 `sdns.json`,内容如下:
```json
{
"domain": "mydomain.com",
"records": [
首先创建一个配置文件,例如类似 `examples/simple.toml` 文件中的内容,内容如下:
```toml
[test]
domain = "mydomain.com"
setter_name = "cloudflare"
records = [
[
"test", // 也就是 test.mydomain.com 指向的路径
"baidu.com" // 解析值,目前只支持 A 记录和 CNAME 记录,会根据此处的值自动判断
],
]
}
"test", # 也就是 test.mydomain.com 指向的路径
"baidu.com" # 解析值,目前只支持 A 记录和 CNAME 记录,会根据此处的值自动判断
]
]
```
然后执行以下命令:
```shell
dns-manager update ~/.config/dns-manager/sdns.json
# dnsm update ~/.config/dns-manager/sdns.json
dns-manager update examples/simple.toml
# dnsm update examples/simple.toml
```
此时,你的解析记录就会增加一条 `test.mydomain.com` 的 CNAME 记录指向 `baidu.com`

Expand Down
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ dependencies = [
requires-python = ">=3.9"
readme = "README.md"
license = { text = "MIT" }
classifiers = [
"Environment :: Console",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Typing :: Typed",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
]

[project.optional-dependencies]
watch = ["watchfiles"]
Expand Down

0 comments on commit a99a82c

Please sign in to comment.