mirror of
https://github.com/wader/fq.git
synced 2024-11-30 09:58:13 +03:00
87b2c6c10c
Markdown is used as is in online documentation and in cli the markdown decoder is used to decode and the some jq code massages it into something cli friendly. Was just too much of a mess to have doc in jq.
15 lines
340 B
Plaintext
15 lines
340 B
Plaintext
# <mp4 root> | mp4_path(".moov.trak[1]") -> box
|
|
# box -> | mp4_path -> ".moov.trak[1]"
|
|
# box -> | mp4_path(<mp4 root>) -> ".moov.trak[1]"
|
|
def mp4_path(p):
|
|
_decode_value(
|
|
( if format != "mp4" then error("not mp4 format") end
|
|
| _tree_path(.boxes; .type; p)
|
|
)
|
|
);
|
|
def mp4_path:
|
|
( . as $c
|
|
| format_root
|
|
| mp4_path($c)
|
|
);
|