Skip to content

Commit

Permalink
- [+] add excluding control wireframe
Browse files Browse the repository at this point in the history
  • Loading branch information
suntong committed May 3, 2023
1 parent 4c67b36 commit 51354af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions html2md_cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ Options:
Usage: "CSS/goquery selectors"
Value: "body"

- Name: Excl
Type: '[]string'
Flag: 'x,excl'
Usage: "Excluding CSS/goquery selectors"

- Name: ExclChildren
Type: bool
Flag: "xc"
Usage: Excluding all children nodes

- Name: Verbose
Type: cli.Counter
Flag: v,verbose
Expand Down
6 changes: 5 additions & 1 deletion html2md_cliDef.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ type rootT struct {
Filei *clix.Reader `cli:"*i,in" usage:"The html/xml file to read from (or stdin)"`
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"`
Excl []string `cli:"x,excl" usage:"Excluding CSS/goquery selectors"`
ExclChildren bool `cli:"xc" usage:"Excluding all children nodes"`
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"`
Expand Down Expand Up @@ -70,6 +72,8 @@ var root = &cli.Command{
// Filei *clix.Reader
// Domain string
// Sel string
// Excl []string
// ExclChildren bool
// Verbose cli.Counter
// OptHeadingStyle string
// OptHorizontalRule string
Expand Down Expand Up @@ -100,7 +104,7 @@ var root = &cli.Command{
// var (
// progname = "html2md"
// version = "0.1.0"
// date = "2023-05-02"
// date = "2023-05-03"

// rootArgv *rootT
// // Opts store all the configurable options
Expand Down

0 comments on commit 51354af

Please sign in to comment.