Skip to content

Commit

Permalink
Merge pull request #9 from mxlt02/main
Browse files Browse the repository at this point in the history
Feat: Config sample in Chinese Simplified
  • Loading branch information
pluveto authored Jan 31, 2022
2 parents a3f1fdf + 432b782 commit b91344d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
pat = "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

# The file name formatting template was uploaded
# The following example generates a file name preview: 2022/01/upgit_20220131_1643617626.png
rename = "{year}/{month}/upgit_{year}{month}{day}_{unix_ts}{ext}"

# The name of your public Github repository
# Because we use the "raw.githubusercontent.com", so Gtihub warehouse has to be public.
# Attention: Because we use the "raw.githubusercontent.com", so Gtihub repository has to be public.
repo = "repo-name"

# "username" enter your Github username
Expand Down
34 changes: 34 additions & 0 deletions config.sample.zh-CN.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# branch = "master"

# 您的拥有"repo"权限的Github令牌
# 获取Github Token连接: https://github.com/settings/tokens
pat = "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

# 上传文件名的格式模板
# {year} 年份, 例如: 2022
# / 目录分隔符, 作用: 是区分目录
# {month} 月份, 例如: 2
# {day} 天, 例如: 1
# {unix_ts} 时间戳, 例如: 1643617626
# {ext} 文件后缀名, 例如.png
# 下面的例子生成的文件名预览: 2022/01/upgit_20220131_1643617626.png
rename = "{year}/{month}/upgit_{year}{month}{day}_{unix_ts}{ext}"

# 您的公共Github存储库的名称
# 注意: 因为我们使用了 "raw.githubusercontent.com", 所有Github仓库一定要是公开的.
repo = "repo-name"

# 请输入您的Gtihub用户名
username = "username"

# 如果您的网络访问Github异常或者缓慢,您可以尝试下面的配置以开启CDN加速
# [replacements]
# "raw.githubusercontent.com" = "cdn.jsdelivr.net/gh"
# "/master" = "@master"

# 自定义输出格式
# {url} 图片文件的网络URL地址
[output-formats]
"bbcode" = "[img]{url}[/img]"
"html" = '<img src="{url}" />'
"markdown-simple" = "![]({url})"
4 changes: 2 additions & 2 deletions docs/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

### 配置

在程序的同一目录创建 `config.toml` 文件,内容按照[此示例配置文件](https://github.com/pluveto/upgit/blob/main/config.sample.toml) 填写即可.
在程序的同一目录创建 `config.toml` 文件,内容按照[此示例配置文件](https://github.com/pluveto/upgit/blob/main/config.sample.zh-CN.toml) 填写即可.

### 使用

Expand Down Expand Up @@ -206,4 +206,4 @@ username = "username"
```
upgit :clipboard -o clipboard -f bbcode
```
```

0 comments on commit b91344d

Please sign in to comment.