From 01c31536ac074e44890e496cc3d550cbc8de87e2 Mon Sep 17 00:00:00 2001 From: Arthur Cinader <700572+acinader@users.noreply.github.com> Date: Sat, 10 Feb 2018 10:09:40 -0800 Subject: [PATCH 1/5] Add the run argument to the docker command so it'll start and run without a command argument to docker. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6b94d70..6a1499f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,4 +30,4 @@ WORKDIR /app VOLUME /app/templates -CMD ["./go-wkhtmltox"] \ No newline at end of file +CMD ["./go-wkhtmltox", "run"] From a3a34eecf438eebe173dff4af6ad797f35e9e67c Mon Sep 17 00:00:00 2001 From: Arthur Cinader <700572+acinader@users.noreply.github.com> Date: Sat, 10 Feb 2018 10:16:27 -0800 Subject: [PATCH 2/5] Normalize whitespace --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b795153..2686466 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ or service { path = "/v1" - + cors { allowed-origins = ["*"] } @@ -240,12 +240,12 @@ we could add `template` to render as different response, we have another example } ``` -the response is +the response is ```html - + ``` @@ -464,4 +464,4 @@ htmlToX, err := wkhtmltox.New(wkHtmlToXConf) //... //... convData, err := htmlToX.Convert(fetcherOpts, convertOpts) -``` \ No newline at end of file +``` From c4716d1ba657443d36a3ce2457368e0867f05642 Mon Sep 17 00:00:00 2001 From: Arthur Cinader <700572+acinader@users.noreply.github.com> Date: Sat, 10 Feb 2018 10:18:24 -0800 Subject: [PATCH 3/5] nit: fix some typos --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2686466..bcf32f7 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ curl -X POST \ ### Template -The defualt template is +The default template is ``` {"code":{{.Code}},"message":"{{.Message}}"{{if .Result}},"result":{{.Result|Jsonify}}{{end}}} @@ -250,7 +250,7 @@ the response is ``` -So, the template will render at brower directly. you could add more your templates +So, the template will render at browser directly. you could add more your templates #### Template funcs @@ -287,7 +287,7 @@ type ConvertResponse struct { Name|Usage :--|:-- - |default template, retrun `code`,`message`, `result` + |default template, return `code`,`message`, `result` render-html|render data to html binary|you cloud use curl to download directly @@ -328,7 +328,7 @@ curl -X POST \ ### Fetcher -fetcher is an external source input, sometimes we could not fetch data by url, or the wkthmltox could not access the url because of some auth options +fetcher is an external source input, sometimes we could not fetch data by url, or the wkhtmltox could not access the url because of some auth options ##### Data fetcher @@ -430,7 +430,7 @@ func NewDataFetcher(conf config.Configuration) (dataFetcher fetcher.Fetcher, err ``` -step 2: Reigister your driver +step 2: Register your driver ```go func init() { @@ -455,7 +455,7 @@ import ( -# Use this package as libary +# Use this package as library Just import `github.com/gogap/go-wkhtmltox/wkhtmltox` From aefce126b0585f3dcecf73e76c338cb15ae299dc Mon Sep 17 00:00:00 2001 From: Arthur Cinader <700572+acinader@users.noreply.github.com> Date: Sat, 10 Feb 2018 10:18:53 -0800 Subject: [PATCH 4/5] Conform readme to not dockerfile change: no need to command with argument. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bcf32f7..f15bf54 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ go-wkhtmltox ```bash docker pull idocking/go-wkhtmltox:latest - docker run -it -d -p 8080:8080 idocking/go-wkhtmltox:latest ./go-wkhtmltox run + docker run -it -d -p 8080:8080 idocking/go-wkhtmltox:latest ``` or @@ -26,7 +26,7 @@ or ``` > then you could access the 8080 port -> in osx, you could get the docker ip by command `docker-machine ip`, +> in osx, you could get the docker ip by command `docker-machine ip`, > and the access service by IP:8080 ## Config @@ -287,7 +287,7 @@ type ConvertResponse struct { Name|Usage :--|:-- - |default template, return `code`,`message`, `result` + |default template, retrun `code`,`message`, `result` render-html|render data to html binary|you cloud use curl to download directly From bdd02cd5677974a7233df34efac69e85693e379b Mon Sep 17 00:00:00 2001 From: Arthur Cinader <700572+acinader@users.noreply.github.com> Date: Sat, 10 Feb 2018 10:21:44 -0800 Subject: [PATCH 5/5] oops. missed a typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f15bf54..afa5253 100644 --- a/README.md +++ b/README.md @@ -287,7 +287,7 @@ type ConvertResponse struct { Name|Usage :--|:-- - |default template, retrun `code`,`message`, `result` + |default template, return `code`,`message`, `result` render-html|render data to html binary|you cloud use curl to download directly