diff --git a/README.md b/README.md new file mode 100644 index 0000000..83d6987 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# Mark + +Mark it's tool for syncing your markdown documentation with Atlassian Confluence pages. + +This is very usable if you store documentation to your orthodox software in git +repository and don't want to do a handjob with updating Confluence page using +fucking tinymce wysiwyg enterprise core editor. + +You can store a user credentials in the configuration file, which should be +located in ~/.config/mark with following format: +``` +username = "smith" +password = "matrixishere" +``` + +Mark can read Confluence page URL and markdown file path from another specified +configuration file, which you can specify using -c flag. It is very +usable for git hooks. That file should have following format: +```toml +url = "http://confluence.local/pages/viewpage.action?pageId=123456" +file = "docs/README.md" +``` + +## Usage: +``` +mark [-u ] [-p ] -l -f +mark [-u ] [-p ] -c +mark -v | --version +mark -h | --help +``` + +- `-u ` - Use specified username for updating Confluence page. +- `-p ` - Use specified password for updating Confluence page. +- `-l ` - Edit specified Confluence page. +- `-f ` - Use specified markdown file for converting to html. +- `-c ` - Specify configuration file which should be used for reading Confluence page URL and markdown file path. +- `-v | --version` - Show version. +- `-h | --help` - Show help screen and call 911. diff --git a/main.go b/main.go index ba17f85..621ea74 100644 --- a/main.go +++ b/main.go @@ -18,29 +18,39 @@ import ( const ( usage = `Mark +Mark it's tool for syncing your markdown files with Atlassian Confluence pages. + +This is very usable if you store documentation to your orthodox software in git +repository and don't want to do a handjob with updating Confluence page using +fucking tinymce wysiwyg enterprise core editor. + You can store a user credentials in the configuration file, which should be located in ~/.config/mark with following format: - user = "smith" - password = "matrixishere" + username = "smith" + password = "matrixishere" where 'smith' it's your username, and 'matrixishere' it's your password. Mark can read Confluence page URL and markdown file path from another specified configuration file, which you can specify using -c flag. It is very usable for git hooks. That file should have following format: - url = "http://confluence.local/pages/viewpage.action?pageId=123456" - file = "docs/README.md" + url = "http://confluence.local/pages/viewpage.action?pageId=123456" + file = "docs/README.md" Usage: - mark [-u ] [-p ] -l -f - mark [-u ] [-p ] -c + mark [-u ] [-p ] -l -f + mark [-u ] [-p ] -c + mark -v | --version + mark -h | --help Options: - -u Use specified username for updating Confluence page. - -p Use specified password for updating Confluence page. - -l Edit specified Confluence page. - -f Use specified markdown file for converting to html. - -c Specify configuration file which should be used for reading - Confluence page URL and markdown file path. + -u Use specified username for updating Confluence page. + -p Use specified password for updating Confluence page. + -l Edit specified Confluence page. + -f Use specified markdown file for converting to html. + -c Specify configuration file which should be used for reading + Confluence page URL and markdown file path. + -h --help Show this screen and call 911. + -v --version Show version. ` ) @@ -52,7 +62,7 @@ type PageInfo struct { } func main() { - args, err := docopt.Parse(usage, nil, true, "mark 1.0", true, true) + args, err := docopt.Parse(usage, nil, true, "mark 1.0", false, true) if err != nil { panic(err) }