11////////////////////////////////////////////////////////////////////////////
22// Program: html2md
33// Purpose: HTML to Markdown
4- // Authors: Tong Sun (c) 2020, All rights reserved
4+ // Authors: Tong Sun (c) 2020-2023 , All rights reserved
55////////////////////////////////////////////////////////////////////////////
66
77package main
@@ -35,7 +35,8 @@ type rootT struct {
3535 OptEmDelimiter string `cli:"opt-em-delimiter" usage:"Option EmDelimiter"`
3636 OptStrongDelimiter string `cli:"opt-strong-delimiter" usage:"Option StrongDelimiter"`
3737 OptLinkStyle string `cli:"opt-link-style" usage:"Option LinkStyle"`
38- OptLinkReferenceStyle string `cli:"opt-link-reference-style" usage:"Option LinkReferenceStyle\n"`
38+ OptLinkReferenceStyle string `cli:"opt-link-reference-style" usage:"Option LinkReferenceStyle"`
39+ OptEscapeMode string `cli:"opt-escape-mode" usage:"Option EscapeMode\n"`
3940 PluginConfluenceAttachments bool `cli:"A,plugin-conf-attachment" usage:"Plugin ConfluenceAttachments"`
4041 PluginConfluenceCodeBlock bool `cli:"C,plugin-conf-code" usage:"Plugin ConfluenceCodeBlock"`
4142 PluginFrontMatter bool `cli:"F,plugin-frontmatter" usage:"Plugin FrontMatter"`
@@ -51,11 +52,11 @@ type rootT struct {
5152var root = & cli.Command {
5253 Name : "html2md" ,
5354 Desc : "HTML to Markdown\n Version " + version + " built on " + date +
54- "\n Copyright (C) 2020, Tong Sun" ,
55+ "\n Copyright (C) 2020-2023 , Tong Sun" ,
5556 Text : "HTML to Markdown converter on command line" +
5657 "\n \n Usage:\n html2md [Options...]" ,
5758 Argv : func () interface {} { return new (rootT ) },
58- Fn : html2md ,
59+ Fn : Html2md ,
5960
6061 NumOption : cli .AtLeast (1 ),
6162}
@@ -79,6 +80,7 @@ var root = &cli.Command{
7980// OptStrongDelimiter string
8081// OptLinkStyle string
8182// OptLinkReferenceStyle string
83+ // OptEscapeMode string
8284// PluginConfluenceAttachments bool
8385// PluginConfluenceCodeBlock bool
8486// PluginFrontMatter bool
@@ -98,7 +100,7 @@ var root = &cli.Command{
98100// var (
99101// progname = "html2md"
100102// version = "0.1.0"
101- // date = "2020-08-09 "
103+ // date = "2023-05-02 "
102104
103105// rootArgv *rootT
104106// // Opts store all the configurable options
@@ -110,9 +112,7 @@ var root = &cli.Command{
110112
111113// Function main
112114// func main() {
113- // cli.SetUsageStyle(cli.DenseNormalStyle) // left-right, for up-down, use ManualStyle
114- // //NOTE: You can set any writer implements io.Writer
115- // // default writer is os.Stdout
115+ // cli.SetUsageStyle(cli.DenseNormalStyle)
116116// if err := cli.Root(root,).Run(os.Args[1:]); err != nil {
117117// fmt.Fprintln(os.Stderr, err)
118118// os.Exit(1)
@@ -124,7 +124,8 @@ var root = &cli.Command{
124124//==========================================================================
125125// Dumb root handler
126126
127- // func html2md(ctx *cli.Context) error {
127+ // Html2md - main dispatcher dumb handler
128+ // func Html2md(ctx *cli.Context) error {
128129// ctx.JSON(ctx.RootArgv())
129130// ctx.JSON(ctx.Argv())
130131// fmt.Println()
0 commit comments