File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 33=====
44
55
6- ``csv ``
7- =======
6+ ``read- csv ``
7+ ==============
88
99Read a csv file into Python dicts. Given a csv like this:
1010
1919
2020.. code-block :: bash
2121
22- $ mario csv << EOF
22+ $ mario read- csv << EOF
2323 name,age
2424 Alice,21
2525 Bob,25
@@ -43,23 +43,23 @@ Create json objects with a simple syntax.
4343 {"name": "Alice", "age": 21, "hobbies": ["running"]}
4444
4545
46- ` ` jsonl` `
47- =========
46+ ` ` read- jsonl` `
47+ =================
4848
4949Read line-separated json.
5050
5151.. code-block:: bash
5252
53- $ mario jsonl <<< $'{"a":1, "b":2}\n{"a": 5, "b":9}'
53+ $ mario read- jsonl <<< $'{"a":1, "b":2}\n{"a": 5, "b":9}'
5454 {'a': 1, 'b': 2}
5555 {'a': 5, 'b': 9}
5656
5757
58- The new command ` ` jsonl` ` can be used in pipelines as well. To get the maximum value in a sequence of jsonlines objects:
58+ The new command ` ` read- jsonl` ` can be used in pipelines as well. To get the maximum value in a sequence of jsonlines objects:
5959
6060.. code-block:: bash
6161
62- $ mario jsonl map 'x["a"]' apply max <<< $'{"a":1, "b":2}\n{"a": 5, "b":9}'
62+ $ mario read- jsonl map 'x["a"]' apply max <<< $'{"a":1, "b":2}\n{"a": 5, "b":9}'
6363 5
6464
6565
Original file line number Diff line number Diff line change @@ -185,4 +185,4 @@ options={code="toml.dumps"}
185185invocation = [" stack" , " json.loads" , " write-toml" ]
186186input = ''' {"x": 1}
187187'''
188- output = """ x = 1\n """
188+ output = """ x = 1\n\n """
You can’t perform that action at this time.
0 commit comments