From ff17a4034cdb98b51dc0f842a0569c5a772c9881 Mon Sep 17 00:00:00 2001 From: Egor Kovetskiy Date: Fri, 4 Dec 2020 00:31:44 +0300 Subject: [PATCH] 3.5, get rid of duplicated docs in help --- README.md | 2 +- main.go | 88 ++----------------------------------------------------- 2 files changed, 4 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 84382c7..74c9d76 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mark -Mark — tool for syncing your markdown documentation with Atlassian Confluence +Mark — a tool for syncing your markdown documentation with Atlassian Confluence pages. Read the blog post discussing the tool — https://samizdat.dev/use-markdown-for-confluence/ diff --git a/main.go b/main.go index 0418b2d..9ac0fdd 100644 --- a/main.go +++ b/main.go @@ -19,91 +19,9 @@ import ( ) const ( - usage = `mark - tool for updating Atlassian Confluence pages from markdown. + usage = `mark - a tool for updating Atlassian Confluence pages from markdown. -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" - base_url = "http://confluence.local" -where 'smith' it's your username, 'matrixishere' it's your password and -'http://confluence.local' is base URL for your Confluence instance. - -Mark understands extended file format, which, still being valid markdown, -contains several metadata headers, which can be used to locate page inside -Confluence instance and update it accordingly. - -File in extended format should follow specification: - - - - - - - - -There can be any number of 'Parent' headers, if mark can't find specified -parent by title, it will be created. - -Also, optional following headers are supported: - - * - - - (default) article: content will be put in narrow column for ease of - reading; - - plain: content will fill all page; - -Mark supports Go templates, which can be included into article by using path -to the template relative to current working dir, e.g.: - - - -Templates may accept configuration data in YAML format which immediately -follows include tag: - - - -Mark also supports macro definitions, which are defined as regexps which will -be replaced with specified template: - - - -Capture groups can be defined in the macro's which can be later -referenced in the using ${} syntax, where is -number of a capture group in regexp (${0} is used for entire regexp match), for -example: - - - -By default, mark provides several built-in templates and macros: - -* template 'ac:status' to include badge-like text, which accepts following - parameters: - - Title: text to display in the badge - - Color: color to use as background/border for badge - - Grey - - Yellow - - Red - - Blue - - Subtle: specify to fill badge with background or not - - true - - false - - See: https://confluence.atlassian.com/conf59/status-macro-792499207.html - -* template 'ac:jira:ticket' to include JIRA ticket link. Parameters: - - Ticket: Jira ticket number like BUGS-123. - -* macro '@{...}' to mention user by name specified in the braces. +Docs: https://github.com/kovetskiy/mark Usage: mark [options] [-u ] [-p ] [-k] [-l ] -f @@ -133,7 +51,7 @@ Options: ) func main() { - args, err := docopt.Parse(usage, nil, true, "3.4", false) + args, err := docopt.Parse(usage, nil, true, "3.5", false) if err != nil { panic(err) }