Skip to content

Commit

Permalink
docs: update usage for webui
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Apr 23, 2023
1 parent c9b79b7 commit 4b451d1
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
Binary file added .github/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
# Dependency directories (remove the comment below to include it)
# vendor/

*.conf
*.conf
.DS_Store
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

<img src=".github/logo.png" width="120" >

Nginx configuration formatter under 10MB size.
Nginx configuration formatter under 10MB size, support CLI, WebUI, x86, ARM, Linux, macOS.

<img src=".github/preview.png">

## Download

Expand All @@ -31,12 +33,16 @@ Use default parameters to format all configuration files in the current director
./nginx-formatter
```

### Common Usage (CLI & WebUI)

Use different indentation symbols (You can use spaces, tabs, ` `, `\s`, `\t`) and indentation amounts:

```bash
./nginx-formatter -indent=4 -char=" "
```

### CLI Usage

Format the configuration file in the specified directory:

```bash
Expand All @@ -49,8 +55,19 @@ Format a file somewhere and save it in a new directory:
./nginx-formatter -input=./your-dir-path -output=./your-output-dir
```

### WebUI Usage

Start the web interface:

```bash
./nginx-formatter -web
```

specified the port:

```bash
./nginx-formatter -web -port=8123
```

## Full parameters supported

Expand Down
22 changes: 21 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

<img src=".github/logo.png" width="120" >

一款小巧(几MB)、简洁的 Nginx 格式化工具。
一款小巧(几MB)、简洁的 Nginx 格式化工具,支持命令行、WebUI、Docker、x86、ARM、macOS、Linux。

<img src=".github/preview.png">

## 程序下载

Expand All @@ -31,12 +33,16 @@ docker pull soulteary/nginx-formatter:v0.5.0
./nginx-formatter
```

### 通用玩法 (CLI & WebUI)

使用不同的缩进符号(可以使用空格、制表符、`\s``\t`` `)和缩进量:

```bash
./nginx-formatter -indent=4 -char=" "
```

### 命令行用法(CLI)

格式化指定目录中的配置文件:

```bash
Expand All @@ -49,6 +55,20 @@ docker pull soulteary/nginx-formatter:v0.5.0
./nginx-formatter -input=./your-dir-path -output=./your-output-dir
```

### WebUI 用法

启动 WebUI 界面:

```bash
./nginx-formatter -web
```

指定服务端口:

```bash
./nginx-formatter -web -port=8123
```

## 支持的完整参数列表

```bash
Expand Down

0 comments on commit 4b451d1

Please sign in to comment.