You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the arguments PrintQuerysInAllResult and PrintTextInAllResult
PrintQuerysInAllResult:
Enable printing of query conditions in results
PrintTextInAllResult:
Enter a text content for printing in all results. If the content contains "#{serial number}", the content of the specified serial number's result will be automatically printed in all results following that serial number
Copy file name to clipboardExpand all lines: README.md
+69-63Lines changed: 69 additions & 63 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
htmlq v1.0.3
1
+
htmlq v1.0.4
2
2
====
3
3
4
4
`htmlq` is a `command-line` tool that allows you to query HTML using `CSS selectors` or `XPATH` and retrieve the corresponding `text content` (similar to JavaScript's `document.querySelector(query).textContent`).
Copy file name to clipboardExpand all lines: main.go
+28-4Lines changed: 28 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ var (
22
22
results [][]interface{}
23
23
headerMap=make(map[int]interface{})
24
24
// Create new parser object
25
-
parser=argparse.NewParser("htmlq 1.0.3", "A command-line tool that allows you to query HTML using CSS selectors or XPATH and retrieve the corresponding text content (similar to JavaScript's `document.querySelector(query).textContent`)")
25
+
parser=argparse.NewParser("htmlq 1.0.4", "A command-line tool that allows you to query HTML using CSS selectors or XPATH and retrieve the corresponding text content (similar to JavaScript's `document.querySelector(query).textContent`)")
26
26
27
27
// Create filePath flag
28
28
filePath=parser.String("f", "file", &argparse.Options{Help: `Enter the relative or absolute path of the HTML file`})
@@ -41,6 +41,10 @@ var (
41
41
isPrintLastResult=parser.Flag("l", "PrintLastResult", &argparse.Options{Help: `Enable printing the content of the last result in the output when using the "#lastresult" syntax in the query`, Default: false})
42
42
// Create isPrintLastResultTemp flag
43
43
isPrintLastResultTemp=parser.Flag("", "PrintLastResultTemp", &argparse.Options{Help: `Enable printing the temporary content of the source data as last result in the output, when using the "#lastresult" syntax in query`, Default: false})
44
+
// Create isPrintQuerysInAllResult flag
45
+
isPrintQuerysInAllResult=parser.Flag("", "PrintQuerysInAllResult", &argparse.Options{Help: `Enable printing of query conditions in results.`, Default: false})
46
+
// Create PrintTextToAllResult flag
47
+
printTextInAllResult=parser.String("", "PrintTextInAllResult", &argparse.Options{Help: `Enter a text content for printing in all results. If the content contains "#{serial number}", the content of the specified serial number's result will be automatically printed in all results following that serial number.`})
44
48
45
49
// Create headers flag
46
50
headers=parser.StringList("H", "headers", &argparse.Options{Help: `When the query item is a table or multiple td fields, you can enter corresponding names for each individual field in a single query using the format "#{serial number}:header1Name;header2Name;header3Name;...", where the serial number represents the Nth query starting from zero.`})
0 commit comments