diff options
| author | Tong Sun <[email protected]> | 2023-05-02 13:27:10 -0400 |
|---|---|---|
| committer | Tong Sun <[email protected]> | 2023-05-02 13:27:10 -0400 |
| commit | f584bf775faa77901bac27e1ab3416c4712544e8 (patch) | |
| tree | caa6405732977f148724cdc762d13f781d45ebbb /html2md_main.go | |
| parent | - [#] only install cloudsmith cli when necessary (diff) | |
| download | html2md-f584bf775faa77901bac27e1ab3416c4712544e8.tar.xz html2md-f584bf775faa77901bac27e1ab3416c4712544e8.zip | |
- [+] add --opt-escape-mode; build with latest; closes #2 #4 #8
Diffstat (limited to 'html2md_main.go')
| -rw-r--r-- | html2md_main.go | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/html2md_main.go b/html2md_main.go index 2bb6225..bd4b7f5 100644 --- a/html2md_main.go +++ b/html2md_main.go @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////// // Program: html2md // Purpose: HTML to Markdown -// Authors: Tong Sun (c) 2020, All rights reserved +// Authors: Tong Sun (c) 2020-2023, All rights reserved //////////////////////////////////////////////////////////////////////////// package main @@ -13,48 +13,20 @@ import ( "os" "github.com/mkideal/cli" - clix "github.com/mkideal/cli/ext" ) //////////////////////////////////////////////////////////////////////////// // Constant and data type/structure definitions -// The OptsT type defines all the configurable options from cli. -type OptsT struct { - Filei *clix.Reader - Sel string - OptHeadingStyle string - OptHorizontalRule string - OptBulletListMarker string - OptCodeBlockStyle string - OptFence string - OptEmDelimiter string - OptStrongDelimiter string - OptLinkStyle string - OptLinkReferenceStyle string - PluginConfluenceAttachments bool - PluginConfluenceCodeBlock bool - PluginFrontMatter bool - PluginGitHubFlavored bool - PluginStrikethrough bool - PluginTable bool - PluginTaskListItems bool - PluginVimeoEmbed bool - PluginYoutubeEmbed bool - Verbose int -} - //////////////////////////////////////////////////////////////////////////// // Global variables definitions var ( progname = "html2md" - version = "0.2.01" - date = "2020-08-08" + version = "1.0.0" + date = "2023-05-02" rootArgv *rootT - // Opts store all the configurable options - Opts OptsT ) //////////////////////////////////////////////////////////////////////////// @@ -62,9 +34,7 @@ var ( // Function main func main() { - cli.SetUsageStyle(cli.DenseNormalStyle) // left-right, for up-down, use ManualStyle - //NOTE: You can set any writer implements io.Writer - // default writer is os.Stdout + cli.SetUsageStyle(cli.DenseNormalStyle) if err := cli.Root(root).Run(os.Args[1:]); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) |