zk/tests/cmd-list-format-predefined.tesh
2022-01-10 14:28:14 +01:00

69 lines
5.6 KiB
Plaintext

$ cd full-sample
# The default format is `short`.
$ zk list --debug-style -q inbox/dld4.md
><title>When to prefer PUT over POST HTTP method?</title> <path>inbox/dld4.md</path> ({{match '[0-9]+'}} years ago)
>
> - `PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.
>
# `path` format.
$ zk list --debug-style -qfpath inbox/dld4.md
>inbox/dld4.md
# `link` format.
$ zk list --debug-style -qflink inbox/dld4.md
>[When to prefer PUT over POST HTTP method?](inbox/dld4)
# `oneline` format.
$ zk list --debug-style -qfoneline inbox/dld4.md
><title>When to prefer PUT over POST HTTP method?</title> <path>inbox/dld4.md</path> ({{match '[0-9]+'}} years ago)
# `short` format.
$ zk list --debug-style -qfshort inbox/dld4.md
><title>When to prefer PUT over POST HTTP method?</title> <path>inbox/dld4.md</path> ({{match '[0-9]+'}} years ago)
>
> - `PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.
>
# `medium` format.
$ zk list --debug-style -qfmedium inbox/dld4.md
><title>When to prefer PUT over POST HTTP method?</title> <path>inbox/dld4.md</path>
>Created: 05/16/2011
>
> - `PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.
>
# `long` format.
$ zk list --debug-style -qflong inbox/dld4.md
><title>When to prefer PUT over POST HTTP method?</title> <path>inbox/dld4.md</path>
>Created: 05/16/2011
>Modified: {{match '[/0-9]+'}}
>
> - `PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.
>
# `full` format.
$ zk list --debug-style -qffull inbox/dld4.md
><title>When to prefer PUT over POST HTTP method?</title> <path>inbox/dld4.md</path>
>Created: 05/16/2011
>Modified: {{match '[/0-9]+'}}
>Tags: programming, http
>
> `PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.
>
> A way to see it is:
>
> * `PUT` = SQL `UPDATE`
> * `POST` = SQL `INSERT`
>
# JSON format.
$ zk list -qfjson inbox/dld4.md
>[{"filename":"dld4.md","filenameStem":"dld4","path":"inbox/dld4.md","absPath":"{{working-dir}}/inbox/dld4.md","title":"When to prefer PUT over POST HTTP method?","link":"[When to prefer PUT over POST HTTP method?](inbox/dld4)","lead":"`PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.","body":"`PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.\n\nA way to see it is:\n\n* `PUT` = SQL `UPDATE`\n* `POST` = SQL `INSERT`","snippets":["`PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again."],"rawContent":"---\ndate: 2011-05-16 09:58:57\nkeywords: [programming, http]\ncategory: \"Best practice\"\n---\n\n# When to prefer PUT over POST HTTP method?\n\n`PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.\n\nA way to see it is:\n\n* `PUT` = SQL `UPDATE`\n* `POST` = SQL `INSERT`\n","wordCount":66,"tags":["programming","http"],"metadata":{"category":"Best practice","date":"2011-05-16 09:58:57","keywords":["programming","http"]},"created":"2011-05-16T09:58:57Z","modified":"{{match '[\-T\.\:0-9]+'}}Z","checksum":"8cef4e35473a5ebf29d72b5d0e1bca4471dcf496f4971980840aafe4bf3d2298"}]
# JSON Lines format.
$ zk list -qfjsonl inbox/dld4.md
>{"filename":"dld4.md","filenameStem":"dld4","path":"inbox/dld4.md","absPath":"{{working-dir}}/inbox/dld4.md","title":"When to prefer PUT over POST HTTP method?","link":"[When to prefer PUT over POST HTTP method?](inbox/dld4)","lead":"`PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.","body":"`PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.\n\nA way to see it is:\n\n* `PUT` = SQL `UPDATE`\n* `POST` = SQL `INSERT`","snippets":["`PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again."],"rawContent":"---\ndate: 2011-05-16 09:58:57\nkeywords: [programming, http]\ncategory: \"Best practice\"\n---\n\n# When to prefer PUT over POST HTTP method?\n\n`PUT` should be idempotent. This means that it's harmless to call a `PUT` request many times. On the contrary, calling `POST` requests repeatedly might change data on the server again.\n\nA way to see it is:\n\n* `PUT` = SQL `UPDATE`\n* `POST` = SQL `INSERT`\n","wordCount":66,"tags":["programming","http"],"metadata":{"category":"Best practice","date":"2011-05-16 09:58:57","keywords":["programming","http"]},"created":"2011-05-16T09:58:57Z","modified":"{{match '[\-T\.\:0-9]+'}}Z","checksum":"8cef4e35473a5ebf29d72b5d0e1bca4471dcf496f4971980840aafe4bf3d2298"}