Skip to content

Commit 51354af

Browse files
committed
- [+] add excluding control wireframe
1 parent 4c67b36 commit 51354af

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

html2md_cli.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ Options:
3131
Usage: "CSS/goquery selectors"
3232
Value: "body"
3333

34+
- Name: Excl
35+
Type: '[]string'
36+
Flag: 'x,excl'
37+
Usage: "Excluding CSS/goquery selectors"
38+
39+
- Name: ExclChildren
40+
Type: bool
41+
Flag: "xc"
42+
Usage: Excluding all children nodes
43+
3444
- Name: Verbose
3545
Type: cli.Counter
3646
Flag: v,verbose

html2md_cliDef.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ type rootT struct {
2626
Filei *clix.Reader `cli:"*i,in" usage:"The html/xml file to read from (or stdin)"`
2727
Domain string `cli:"d,domain" usage:"Domain of the web page, needed for links when --in is not url"`
2828
Sel string `cli:"s,sel" usage:"CSS/goquery selectors" dft:"body"`
29+
Excl []string `cli:"x,excl" usage:"Excluding CSS/goquery selectors"`
30+
ExclChildren bool `cli:"xc" usage:"Excluding all children nodes"`
2931
Verbose cli.Counter `cli:"v,verbose" usage:"Verbose mode (Multiple -v options increase the verbosity.)\n"`
3032
OptHeadingStyle string `cli:"opt-heading-style" usage:"Option HeadingStyle"`
3133
OptHorizontalRule string `cli:"opt-horizontal-rule" usage:"Option HorizontalRule"`
@@ -70,6 +72,8 @@ var root = &cli.Command{
7072
// Filei *clix.Reader
7173
// Domain string
7274
// Sel string
75+
// Excl []string
76+
// ExclChildren bool
7377
// Verbose cli.Counter
7478
// OptHeadingStyle string
7579
// OptHorizontalRule string
@@ -100,7 +104,7 @@ var root = &cli.Command{
100104
// var (
101105
// progname = "html2md"
102106
// version = "0.1.0"
103-
// date = "2023-05-02"
107+
// date = "2023-05-03"
104108

105109
// rootArgv *rootT
106110
// // Opts store all the configurable options

0 commit comments

Comments
 (0)