|
9 | 9 | [](http://godoc.org/github.com/go-easygen/wireframe) |
10 | 10 |
|
11 | 11 | ## TOC |
| 12 | +- [cascadia - CSS selector CLI tool](#cascadia---css-selector-cli-tool) |
12 | 13 | - [Usage](#usage) |
13 | 14 | - [$ cascadia](#-cascadia) |
14 | 15 | - [Examples](#examples) |
|
18 | 19 | - [Twitter Search](#twitter-search) |
19 | 20 | - [Reconstruct the separated pages](#reconstruct-the-separated-pages) |
20 | 21 | - [More On CSS Selector](#more-on-css-selector) |
21 | | - - [Author(s) & Contributor(s)](#author(s)-&-contributor(s)) |
| 22 | +- [Download/Install](#downloadinstall) |
| 23 | + - [Download binaries](#download-binaries) |
| 24 | + - [Install Source](#install-source) |
| 25 | +- [Author(s) & Contributor(s)](#author(s)-&-contributor(s)) |
| 26 | + |
| 27 | +## cascadia - CSS selector CLI tool |
22 | 28 |
|
23 | 29 | The [Go Cascadia package](https://github.com/andybalholm/cascadia) implements CSS selectors for html. This is the command line tool, started as a thin wrapper around that package, but growing into a better tool to test CSS selectors without writing Go code: |
24 | 30 |
|
25 | | -# Usage |
| 31 | +## Usage |
26 | 32 |
|
27 | 33 | #### $ cascadia |
28 | 34 | ```sh |
29 | 35 | cascadia wrapper |
30 | | -Version 1.2.2 built on 2018-05-22 |
| 36 | +Version 1.2.3 built on 2020-04-20 |
| 37 | +Copyright (C) 2020, Tong Sun |
31 | 38 |
|
32 | 39 | Command line interface to go cascadia CSS selectors package |
33 | 40 |
|
@@ -225,14 +232,35 @@ Collecting as HTML is no trouble either. Here is another example: |
225 | 232 |
|
226 | 233 | The [fifth page is here](http://www.shangxueedu.com/shuxue/ksdg/20170113_162_5.html), and [all pages are collected here](https://docs.google.com/document/d/1StFwP7kChHiGsL-hm3tnY29bsBRQWCU7xdhu2shsGcg/preview). Please check them out. |
227 | 234 |
|
228 | | -# More On CSS Selector |
| 235 | +## More On CSS Selector |
229 | 236 |
|
230 | 237 | I'm not an expert on CSS Selector at all, but the following resources are what I found most helpful to me. |
231 | 238 |
|
232 | 239 | - [CSS Selectors Cheat Sheet](http://butlerccwebdev.net/support/css-selectors-cheatsheet.html) I think It's very good, because it's usage oriented and very practical, i.e., it arranges the Selectors according to their purposes. If that's too dry for you, check out |
233 | 240 | - [The 30 CSS Selectors You Must Memorize](http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048) It only lists those selectors that are important, but it gives concrete examples and explanations |
234 | 241 | - [CSS Selector Reference](http://www.w3schools.com/cssref/css_selectors.asp) from w3schools. This is the one I most often refer to, because the list is comprehensive, and there is also an online [CSS Selector Tester](http://www.w3schools.com/cssref/trysel.asp) that really helped me learn and understand |
235 | 242 |
|
| 243 | +## Download/Install |
| 244 | +
|
| 245 | +
|
| 246 | +### Download binaries |
| 247 | +
|
| 248 | +- The latest binary executables are available right under the github release page |
| 249 | +https://github.com/suntong/cascadia/releases |
| 250 | +as the result of the Continuous-Integration process. |
| 251 | +- I.e., they are built during every git tagged push, automatically by [GitHub Actions](https://github.com/features/actions), right from the source code, truely WYSIWYG. |
| 252 | +- The `.deb`, `.rpm` and `.apk` packages are readily available, as well as the executables for other Linux and Windows as well. |
| 253 | +- Pick & choose the binary executable that suits your OS and its architecture. E.g., for Linux, it would most probably be the `cascadia_ver_linux_amd64.tar.gz` file. |
| 254 | +- Unzip it and put the executable somewhere in the PATH, after downloading it. |
| 255 | +
|
| 256 | +
|
| 257 | +### Install Source |
| 258 | +
|
| 259 | +To install the source code instead: |
| 260 | +
|
| 261 | +``` |
| 262 | +go get github.com/suntong/cascadia |
| 263 | +``` |
236 | 264 |
|
237 | 265 | ## Author(s) & Contributor(s) |
238 | 266 |
|
|
0 commit comments