From 5e2c21dd274be5198979c25304bf54759fd26ec1 Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Wed, 14 Sep 2022 20:24:55 +0200 Subject: [PATCH] Optionally download attachments --- main.go | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 98 insertions(+), 9 deletions(-) diff --git a/main.go b/main.go index 5050dc6..b697528 100644 --- a/main.go +++ b/main.go @@ -25,10 +25,11 @@ type Node struct { } type Arguments struct { - Baseurl string `arg:"required" help:"Base URL of the Confluence instance (required)"` - Spacekey string `arg:"required" help:"Spacekey to export (required)"` - User string `arg:"required" help:"User used for authentication (required)"` - Token string `arg:"required" help:"Token used for authentication (required)"` + Baseurl string `arg:"required" help:"Base URL of the Confluence instance (required)"` + Spacekey string `arg:"required" help:"Spacekey to export (required)"` + User string `arg:"required" help:"User used for authentication (required)"` + Token string `arg:"required" help:"Token used for authentication (required)"` + WithAttachments bool `arg:"-a,--attachments" help:"Download attachments"` } func (n *Node) writeIndex(w io.Writer) { @@ -38,7 +39,7 @@ func (n *Node) writeIndex(w io.Writer) {