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
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ NetBSD builds are tested in CI against the latest stable release. `celq` aims to
180
180
npm install celq
181
181
```
182
182
183
-
This adds celq to `package.json` and makes it available for scripts. It's also possible to run single commands with [npx](https://docs.npmjs.com/cli/v8/commands/npx):
183
+
This adds celq to `package.json` and makes it available for scripts. It is also possible to run single commands with [npx](https://docs.npmjs.com/cli/v8/commands/npx):
184
184
185
185
```bash
186
186
npx celq -n '"Hello World"'
@@ -276,7 +276,7 @@ All the documentation in the manual has been hand-crafted. That was done to keep
276
276
277
277
## License
278
278
279
-
This project is dual-licensed under the MIT License and Apache 2.0 licenses. See [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) file for details.
279
+
This project is dual-licensed under the MIT License and Apache 2.0 licenses. See [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) files for details.
280
280
281
281
The `install.sh` published with each GitHub release and its template at the root of the repository (`template_install.sh`) are licensed independently. Those files are under the CC0-1.0 license. They are the original work of Casey Rodarmor from [just](https://github.com/casey/just) and have been adapted for celq.
Copy file name to clipboardExpand all lines: docs/comparison_with_other_tools.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@
34
34
35
35
*[jo](https://github.com/jpmens/jo) is less verbose than celq for creating JSON output from the CLI
36
36
* jo doesn't read from the input by default. celq needs the `-n` flag to ignore the input.
37
-
* jo can created nested objects by composing calls e.g. `jo github=$(jo user=get-celq repo=homebrew-tap)`. At the moment, celq's arguments don't support maps yet
37
+
* jo can create nested objects by composing calls e.g. `jo github=$(jo user=get-celq repo=homebrew-tap)`. At the moment, celq's arguments don't support maps yet
38
38
39
39
## gron vs celq
40
40
@@ -53,11 +53,11 @@
53
53
54
54
## jql vs celq
55
55
56
-
*[jql](https://github.com/yamafaktory/jql) uses its own syntax to query JSON with selectors. celq is closer to how imperative programming languges access JSON fields.
56
+
*[jql](https://github.com/yamafaktory/jql) uses its own syntax to query JSON with selectors. celq is closer to how imperative programming languages access JSON fields.
57
57
* jql did not support JSON5, YAML, and TOML when celq was originally written.
58
58
59
59
## DuckDB JSON vs celq
60
60
61
61
*[DuckDB](https://duckdb.org/docs/stable/data/json/overview) excels at querying JSON with schemas using SQL
62
-
* celq and jq excel at querying unstructed JSON
62
+
* celq and jq excel at querying unstructured JSON
63
63
* DuckDB did not support JSON5, YAML, and TOML when celq was originally written (and that is probably a good thing)
Copy file name to clipboardExpand all lines: docs/installation_guide.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,9 +109,9 @@ cargo binstall celq
109
109
run: echo ${{ steps.exampleID.outputs.result }}
110
110
```
111
111
112
-
The best practice for GitHub Actions is to select both the version for the tool:
112
+
The best practice for GitHub Actions is to select both versions:
113
113
* The tool version is specified by the optional `version` parameter
114
-
* The action version is specified `celq-action@actionVersion`
114
+
* The action version is specified by `celq-action@actionVersion`
115
115
116
116
For example:
117
117
```yaml
@@ -190,7 +190,7 @@ NetBSD builds are tested in CI against the latest stable release. `celq` aims to
190
190
npm install celq
191
191
```
192
192
193
-
This adds celq to `package.json` and makes it available for scripts. It's also possible to run single commands with [npx](https://docs.npmjs.com/cli/v8/commands/npx):
193
+
This adds celq to `package.json` and makes it available for scripts. It is also possible to run single commands with [npx](https://docs.npmjs.com/cli/v8/commands/npx):
194
194
195
195
```bash
196
196
npx celq -n '"Hello World"'
@@ -240,7 +240,7 @@ Alternatively, add this to `mise.toml`:
240
240
241
241
## Integrity and Authenticity
242
242
243
-
`celq`publishes a `SHA256SUMS` file for each of its release in the [GitHub Releases page](https://github.com/IvanIsCoding/celq/releases). The checksum can be used to verify integrity of the downloaded files.
243
+
`celq`publishes a `SHA256SUMS` file for each of its releases on the [GitHub Releases page](https://github.com/IvanIsCoding/celq/releases). The checksum can be used to verify the integrity of the downloaded files.
244
244
245
245
The `celq` installer supports the `--verify-checksum` flag to ensure the integrity of the pre-built binaries:
246
246
@@ -290,4 +290,4 @@ Special thanks to the maintainers of:
290
290
- **[maturin](https://github.com/PyO3/maturin)** for providing the code to help us build for the Python Package Index
291
291
- **[vidmerger](https://github.com/tgotwig/vidmerger)** for providing details on how to package for Chocolatey ([including this blog post](https://dev.to/tgotwig/publish-a-simple-executable-from-rust-on-chocolatey-2pbl))
292
292
293
-
Thanks also go to [quentinmit@](https://github.com/quentinmit) for guidance on packaging for Nix.
293
+
Thanks also go to [quentinmit@](https://github.com/quentinmit) for guidance on packaging for Nix.
Slicing follows Python conventions: it is 0-indexed and works with negative indices. The `.slice()`calls always requires two arguments. If you need to slice until the end of the list, do `this.slice(pos, size(this.slice))`. Similarly, do `this.slice(0, pos)` to start from the beginning.
254
+
Slicing follows Python conventions: it is 0-indexed and works with negative indices. The `.slice()`call always requires two arguments. If you need to slice until the end of the list, do `this.slice(pos, size(this.slice))`. Similarly, do `this.slice(0, pos)` to start from the beginning.
255
255
256
-
If you want to keep your CEL code portable, pass the `--no-extensions`arguments to disable slicing and all other extensions.
256
+
If you want to keep your CEL code portable, pass the `--no-extensions`argument to disable slicing and all other extensions.
257
257
258
258
### Dealing with NDJSON
259
259
260
260
`celq` can deal with [Newline-Delimited JSON (NDJSON)](https://web.archive.org/web/20231218162511/https://ndjson.org/). That format is also called [JSON Lines (JSONL)](https://web.archive.org/web/20251130123805/https://jsonlines.org./).
261
261
262
-
`celq` detects the content of multi-line files. Firstly, it tries to parse the input as a NDJSON where each line is a JSON value. If that fails, we parse the input as a single JSON file.
262
+
`celq` detects the content of multi-line files. First, it tries to parse the input as NDJSON where each line is a JSON value. If that fails, it parses the input as a single JSON file.
263
263
264
264
Take for example the following file, `example.ndjson`:
265
265
@@ -293,7 +293,7 @@ For example:
293
293
cat example.json | celq --slurp "this"
294
294
```
295
295
296
-
Outputs: `[{"y":2.5,"x":1.5},{"y":4.5,"x":3.5}]`. In short, it concatenated the input in a single list.
296
+
Outputs: `[{"y":2.5,"x":1.5},{"y":4.5,"x":3.5}]`. In short, it concatenates the input into a single list.
297
297
298
298
That can be convenient. Let's say we want to access all values of `x`:
Outputs: `"Apple Inc."`. This feature can be handy when reusing CEL snippets accross different environments, as they will not use `this` as a variable. That becomes particularly useful with the `--from-file` feature.
330
+
Outputs: `"Apple Inc."`. This feature can be handy when reusing CEL snippets across different environments, as they will not use `this` as a variable. That becomes particularly useful with the `--from-file` feature.
331
331
332
332
### Boolean output
333
333
@@ -357,7 +357,7 @@ fi
357
357
358
358
Will print: `apple contains the letter a`.
359
359
360
-
Often, the `--boolean` flag plays nicely with the `--void` flag. The `--void` flag ommits all outputs to stdout, which can be handy to hide unnecessary `true` or `false` outputs for intermediary steps in bash scripts.
360
+
Often, the `--boolean` flag plays nicely with the `--void` flag. The `--void` flag omits all output to stdout, which can be handy to hide unnecessary `true` or `false` outputs for intermediary steps in bash scripts.
361
361
362
362
Note that for NDJSON inputs, `celq` sets the value based on the value of the last JSON in the NDJSON input.
363
363
@@ -389,7 +389,7 @@ Notice that passing the `--from-json5` clashes with the `--slurp` flag and with
389
389
390
390
### TOML Support
391
391
392
-
`celq` supports [TOML](https://toml.io/en/), another popular configuration format. For example, `celq` can query it's own manifest file:
392
+
`celq` supports [TOML](https://toml.io/en/), another popular configuration format. For example, `celq` can query its own manifest file:
Will always outputs`"apples"` with quotes. If you want to save it in an envrionment variable, the quotes will be included. To bypass that, the `--raw-output` option is convenient:
529
+
Will always output`"apples"` with quotes. If you want to save it in an environment variable, the quotes will be included. To bypass that, the `--raw-output` option is convenient:
@@ -575,7 +575,7 @@ For NDJSON inputs, `--greppable` outputs only the last line. This happens to pre
575
575
576
576
### Reverting filtered grep output
577
577
578
-
`celq` also has a `--from-gron` flag that parsers the output of `gron` and `celq --greppable`. It is equivalent to `gron -u`. That can be useful for converting output filtered by grep back to JSON.
578
+
`celq` also has a `--from-gron` flag that parses the output of `gron` and `celq --greppable`. It is equivalent to `gron -u`. That can be useful for converting output filtered by grep back to JSON.
579
579
580
580
For example:
581
581
@@ -618,4 +618,4 @@ Outputs:
618
618
619
619
## Pronunciation
620
620
621
-
`celq` is pronounced *“selk”* / *“selq”*. Kind of like the word `silk` but with an `e` instead.
621
+
`celq` is pronounced *“selk”* / *“selq”*. Kind of like the word `silk` but with an `e` instead.
0 commit comments