diff options
| author | Tong Sun <[email protected]> | 2020-07-26 11:34:25 -0400 |
|---|---|---|
| committer | Tong Sun <[email protected]> | 2020-07-26 11:34:25 -0400 |
| commit | bc50ae281345adfaaa860c603cbd3c4176266794 (patch) | |
| tree | e3f13994dd8431465911f0d0fd6d438bca2558b7 | |
| parent | - [*] use cli handling and clis functionalities (diff) | |
| download | html2md-bc50ae281345adfaaa860c603cbd3c4176266794.tar.xz html2md-bc50ae281345adfaaa860c603cbd3c4176266794.zip | |
- [*] updated _cli.yaml
| -rw-r--r-- | html2md_cli.yaml | 35 | ||||
| -rw-r--r-- | html2md_cliDef.go | 26 |
2 files changed, 40 insertions, 21 deletions
diff --git a/html2md_cli.yaml b/html2md_cli.yaml index 6252dae..81af3db 100644 --- a/html2md_cli.yaml +++ b/html2md_cli.yaml @@ -19,10 +19,23 @@ Options: Flag: "*i,in" Usage: 'The html/xml file to read from (or stdin)' + - Name: Domain + Type: 'string' + Flag: 'd,domain' + Usage: "Domain of the web page, needed for links when --in is not url" + - Name: Sel Type: 'string' Flag: 's,sel' - Usage: "CSS/goquery selectors\\n" + Usage: "CSS/goquery selectors" + Value: "body" + + - Name: Verbose + Type: cli.Counter + Flag: v,verbose + Usage: "Verbose mode (Multiple -v options increase the verbosity.)\\n" + +# Options - Name: OptHeadingStyle Type: "string" @@ -69,47 +82,49 @@ Options: Flag: "opt-link-reference-style" Usage: "Option LinkReferenceStyle\\n" +# Plugins + - Name: PluginConfluenceAttachments Type: bool - Flag: "plugin-conf-attachment" + Flag: "A,plugin-conf-attachment" Usage: Plugin ConfluenceAttachments - Name: PluginConfluenceCodeBlock Type: bool - Flag: "plugin-conf-code" + Flag: "C,plugin-conf-code" Usage: Plugin ConfluenceCodeBlock - Name: PluginFrontMatter Type: bool - Flag: "plugin-frontmatter" + Flag: "F,plugin-frontmatter" Usage: Plugin FrontMatter - Name: PluginGitHubFlavored Type: bool - Flag: "plugin-gfm" + Flag: "G,plugin-gfm" Usage: Plugin GitHubFlavored - Name: PluginStrikethrough Type: bool - Flag: "plugin-strikethrough" + Flag: "S,plugin-strikethrough" Usage: Plugin Strikethrough - Name: PluginTable Type: bool - Flag: "plugin-table" + Flag: "T,plugin-table" Usage: Plugin Table - Name: PluginTaskListItems Type: bool - Flag: "plugin-task-list" + Flag: "L,plugin-task-list" Usage: Plugin TaskListItems - Name: PluginVimeoEmbed Type: bool - Flag: "plugin-vimeo" + Flag: "V,plugin-vimeo" Usage: Plugin VimeoEmbed - Name: PluginYoutubeEmbed Type: bool - Flag: "plugin-youtube" + Flag: "Y,plugin-youtube" Usage: Plugin YoutubeEmbed diff --git a/html2md_cliDef.go b/html2md_cliDef.go index 8afc467..04b9490 100644 --- a/html2md_cliDef.go +++ b/html2md_cliDef.go @@ -24,7 +24,9 @@ import ( type rootT struct { cli.Helper Filei *clix.Reader `cli:"*i,in" usage:"The html/xml file to read from (or stdin)"` - Sel string `cli:"s,sel" usage:"CSS/goquery selectors\n"` + Domain string `cli:"d,domain" usage:"Domain of the web page, needed for links when --in is not url"` + Sel string `cli:"s,sel" usage:"CSS/goquery selectors" dft:"body"` + Verbose cli.Counter `cli:"v,verbose" usage:"Verbose mode (Multiple -v options increase the verbosity.)\n"` OptHeadingStyle string `cli:"opt-heading-style" usage:"Option HeadingStyle"` OptHorizontalRule string `cli:"opt-horizontal-rule" usage:"Option HorizontalRule"` OptBulletListMarker string `cli:"opt-bullet-list-marker" usage:"Option BulletListMarker"` @@ -34,15 +36,15 @@ type rootT struct { OptStrongDelimiter string `cli:"opt-strong-delimiter" usage:"Option StrongDelimiter"` OptLinkStyle string `cli:"opt-link-style" usage:"Option LinkStyle"` OptLinkReferenceStyle string `cli:"opt-link-reference-style" usage:"Option LinkReferenceStyle\n"` - PluginConfluenceAttachments bool `cli:"plugin-conf-attachment" usage:"Plugin ConfluenceAttachments"` - PluginConfluenceCodeBlock bool `cli:"plugin-conf-code" usage:"Plugin ConfluenceCodeBlock"` - PluginFrontMatter bool `cli:"plugin-frontmatter" usage:"Plugin FrontMatter"` - PluginGitHubFlavored bool `cli:"plugin-gfm" usage:"Plugin GitHubFlavored"` - PluginStrikethrough bool `cli:"plugin-strikethrough" usage:"Plugin Strikethrough"` - PluginTable bool `cli:"plugin-table" usage:"Plugin Table"` - PluginTaskListItems bool `cli:"plugin-task-list" usage:"Plugin TaskListItems"` - PluginVimeoEmbed bool `cli:"plugin-vimeo" usage:"Plugin VimeoEmbed"` - PluginYoutubeEmbed bool `cli:"plugin-youtube" usage:"Plugin YoutubeEmbed"` + PluginConfluenceAttachments bool `cli:"A,plugin-conf-attachment" usage:"Plugin ConfluenceAttachments"` + PluginConfluenceCodeBlock bool `cli:"C,plugin-conf-code" usage:"Plugin ConfluenceCodeBlock"` + PluginFrontMatter bool `cli:"F,plugin-frontmatter" usage:"Plugin FrontMatter"` + PluginGitHubFlavored bool `cli:"G,plugin-gfm" usage:"Plugin GitHubFlavored"` + PluginStrikethrough bool `cli:"S,plugin-strikethrough" usage:"Plugin Strikethrough"` + PluginTable bool `cli:"T,plugin-table" usage:"Plugin Table"` + PluginTaskListItems bool `cli:"L,plugin-task-list" usage:"Plugin TaskListItems"` + PluginVimeoEmbed bool `cli:"V,plugin-vimeo" usage:"Plugin VimeoEmbed"` + PluginYoutubeEmbed bool `cli:"Y,plugin-youtube" usage:"Plugin YoutubeEmbed"` } var root = &cli.Command{ @@ -64,7 +66,9 @@ var root = &cli.Command{ // The OptsT type defines all the configurable options from cli. // type OptsT struct { // Filei *clix.Reader +// Domain string // Sel string +// Verbose cli.Counter // OptHeadingStyle string // OptHorizontalRule string // OptBulletListMarker string @@ -92,7 +96,7 @@ var root = &cli.Command{ // var ( // progname = "html2md" // version = "0.1.0" -// date = "2020-07-25" +// date = "2020-07-26" // rootArgv *rootT // // Opts store all the configurable options |