aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTong Sun <[email protected]>2023-05-03 12:10:00 -0400
committerTong Sun <[email protected]>2023-05-03 12:10:00 -0400
commit51354af1c274f0d93e3d2275e15f261d8a542482 (patch)
tree9bdb8e0af195359c25285791ee80628df809fdac
parentMerge pull request #14 from suntong/all-contributors/add-magnusviri (diff)
downloadhtml2md-51354af1c274f0d93e3d2275e15f261d8a542482.tar.xz
html2md-51354af1c274f0d93e3d2275e15f261d8a542482.zip
- [+] add excluding control wireframe
-rw-r--r--html2md_cli.yaml10
-rw-r--r--html2md_cliDef.go6
2 files changed, 15 insertions, 1 deletions
diff --git a/html2md_cli.yaml b/html2md_cli.yaml
index 642b72c..7c4ebbc 100644
--- a/html2md_cli.yaml
+++ b/html2md_cli.yaml
@@ -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
diff --git a/html2md_cliDef.go b/html2md_cliDef.go
index 6a7dc21..d6abdef 100644
--- a/html2md_cliDef.go
+++ b/html2md_cliDef.go
@@ -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"`
@@ -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
@@ -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