mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2026-04-03 17:44:07 +02:00
Compare commits
3248 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a319ec85ca | ||
|
|
e754e88f2d | ||
|
|
cfa7f267fc | ||
|
|
c581e959fa | ||
|
|
9eb56543be | ||
|
|
67643906b1 | ||
|
|
14d257225c | ||
|
|
0411940f75 | ||
|
|
7d60df67f3 | ||
|
|
70a971a2f1 | ||
|
|
3fbdffd028 | ||
|
|
539fe72d16 | ||
|
|
bd6611aaba | ||
|
|
cf77ddc396 | ||
|
|
77bcd616cd | ||
|
|
5ee2eda83e | ||
|
|
5b849b0275 | ||
|
|
3e5d206f0c | ||
|
|
f50f96381d | ||
|
|
962632ac1f | ||
|
|
d209780a9d | ||
|
|
8e5451a7c1 | ||
|
|
86a09c17cf | ||
|
|
4bb85195e2 | ||
|
|
39f43aad63 | ||
|
|
29689f7603 | ||
|
|
78d7ab1308 | ||
|
|
303cd12de3 | ||
|
|
b65f37e075 | ||
|
|
c05fa7e9cd | ||
|
|
264272a8b8 | ||
|
|
7fadb23fea | ||
|
|
c419e460db | ||
|
|
6434ff61bf | ||
|
|
45a1be11e2 | ||
|
|
7659fe470a | ||
|
|
c332c4febf | ||
|
|
2cc212bfab | ||
|
|
b836ffc583 | ||
|
|
29f1a1d425 | ||
|
|
9f78dc6afa | ||
|
|
74c7e11948 | ||
|
|
6ba6dc0374 | ||
|
|
ec0f2569e5 | ||
|
|
65e30c4440 | ||
|
|
8d9ebf5dfa | ||
|
|
c3746454ff | ||
|
|
ea0f6493a2 | ||
|
|
afbc46076e | ||
|
|
2b9b6550a7 | ||
|
|
6fb3c0a409 | ||
|
|
1b8911ad36 | ||
|
|
cc61b57dd1 | ||
|
|
6d679b2895 | ||
|
|
1e1fc08a47 | ||
|
|
b5c3a03d56 | ||
|
|
9e269f070f | ||
|
|
f863cfdef4 | ||
|
|
2cd58d75e7 | ||
|
|
03b70eebb7 | ||
|
|
1e76ce2aea | ||
|
|
d9fc1b4242 | ||
|
|
36a3d2e96d | ||
|
|
bf05de1d63 | ||
|
|
cae41df1d8 | ||
|
|
8e9ff7fa9f | ||
|
|
973c535c72 | ||
|
|
8614d3dde9 | ||
|
|
a73ee47bcf | ||
|
|
d54a81831f | ||
|
|
73ae1396b9 | ||
|
|
3399e8551e | ||
|
|
b9656c2fae | ||
|
|
e08ccb7942 | ||
|
|
9b648e8560 | ||
|
|
c97a8fb48f | ||
|
|
3a95407161 | ||
|
|
7609af28b3 | ||
|
|
c2b2e81a2b | ||
|
|
3b0594a4a6 | ||
|
|
2b0b9dd7ba | ||
|
|
f159dd6b9d | ||
|
|
2d5d87c73d | ||
|
|
a260ceba1c | ||
|
|
6c30b8106c | ||
|
|
a23921c879 | ||
|
|
3999276d17 | ||
|
|
65bd4850f2 | ||
|
|
d71c2d2b20 | ||
|
|
6dd5b29998 | ||
|
|
1868b28f74 | ||
|
|
e8c0bef6ca | ||
|
|
2c09a06b5a | ||
|
|
fc75ce90d1 | ||
|
|
45a6cfc9cf | ||
|
|
69a0922410 | ||
|
|
2bb201a706 | ||
|
|
50d5d3a3ba | ||
|
|
b14a8980b8 | ||
|
|
de6aa1cc92 | ||
|
|
c4dcedb269 | ||
|
|
140a61702b | ||
|
|
4d3fc07e3b | ||
|
|
dcc4d35d55 | ||
|
|
cfb30b32f3 | ||
|
|
26f2738471 | ||
|
|
2bccd14c5d | ||
|
|
0d4823c9de | ||
|
|
2a14f56b72 | ||
|
|
fe49759598 | ||
|
|
ee737a59eb | ||
|
|
517ab10930 | ||
|
|
604fb574be | ||
|
|
a254ee8d88 | ||
|
|
f784a7a76d | ||
|
|
2e33afbe18 | ||
|
|
103bb174fc | ||
|
|
2a76a64fa1 | ||
|
|
c8fb56c601 | ||
|
|
e835227027 | ||
|
|
88ffcaee56 | ||
|
|
a9ba98847c | ||
|
|
2630049ab7 | ||
|
|
47c7e081f3 | ||
|
|
ef7f755614 | ||
|
|
32bd7ffbf6 | ||
|
|
347097a294 | ||
|
|
356857f5d6 | ||
|
|
ee12c52291 | ||
|
|
0e7ebf4dc1 | ||
|
|
f1e0cec9d6 | ||
|
|
d96a2a8623 | ||
|
|
1b1bc46222 | ||
|
|
d5a8b4eed2 | ||
|
|
5ddd4f0e86 | ||
|
|
8b94c326de | ||
|
|
29b012e66d | ||
|
|
572a3207cd | ||
|
|
2a88f2be6b | ||
|
|
3de6eac1ad | ||
|
|
f44260603e | ||
|
|
1c60f5355e | ||
|
|
40fa78a966 | ||
|
|
71db67ef49 | ||
|
|
1cd723b48f | ||
|
|
82ee4d7b30 | ||
|
|
dfd19f38f3 | ||
|
|
2358c883d0 | ||
|
|
79e4f3a761 | ||
|
|
5be45622cc | ||
|
|
5f4136b943 | ||
|
|
941bfe2724 | ||
|
|
3ed44a26d9 | ||
|
|
b7270517bd | ||
|
|
bf63ac93c6 | ||
|
|
1cb80f15c2 | ||
|
|
b5c22c6e53 | ||
|
|
7951366117 | ||
|
|
c78a4bb655 | ||
|
|
8aceda18b9 | ||
|
|
e0c75a9b6b | ||
|
|
fd283f6cf7 | ||
|
|
b881ad4ec0 | ||
|
|
2fcb32e26f | ||
|
|
13a802225b | ||
|
|
88649a4e8d | ||
|
|
5c6fa5bff6 | ||
|
|
b70025d6d6 | ||
|
|
59b89ecbd4 | ||
|
|
8f7502ff0f | ||
|
|
249d93f15c | ||
|
|
b0cf2e2d78 | ||
|
|
264fcd40ad | ||
|
|
54def8ef49 | ||
|
|
63c271b837 | ||
|
|
741b2d1c1d | ||
|
|
47d4335890 | ||
|
|
81f721f1ab | ||
|
|
c4e1068895 | ||
|
|
a77bb4165a | ||
|
|
3cd2dce496 | ||
|
|
46a8978740 | ||
|
|
3161c48939 | ||
|
|
a89a9187f8 | ||
|
|
d9e0aa5b93 | ||
|
|
d298e101e9 | ||
|
|
cea975d7f1 | ||
|
|
1ed69f9e6a | ||
|
|
ab0e05ec82 | ||
|
|
c16cce4bf0 | ||
|
|
d3489536a1 | ||
|
|
041050ce28 | ||
|
|
7de1a8a5d6 | ||
|
|
d4604743d1 | ||
|
|
0b8fb31298 | ||
|
|
dcdd79e28c | ||
|
|
5291baeb8e | ||
|
|
6867102c66 | ||
|
|
36ed2c7e2e | ||
|
|
4ab0aba9d3 | ||
|
|
e643badaf7 | ||
|
|
d96e96219e | ||
|
|
e42af3353e | ||
|
|
4ec2b16f42 | ||
|
|
0a028456bf | ||
|
|
a1f10928e1 | ||
|
|
eae1d4b89a | ||
|
|
d3c7cec333 | ||
|
|
36fa08d711 | ||
|
|
a9958841e4 | ||
|
|
504ad81a01 | ||
|
|
8bf2f4f4d0 | ||
|
|
805397ea18 | ||
|
|
1b3985c2d7 | ||
|
|
f602043642 | ||
|
|
1a1aa8fda3 | ||
|
|
3249a017ae | ||
|
|
84f0246b2d | ||
|
|
1c795982b0 | ||
|
|
c5164b4108 | ||
|
|
dc3716ecb3 | ||
|
|
c5165ccc21 | ||
|
|
5b2035e0e6 | ||
|
|
5205154aaf | ||
|
|
f500de3af6 | ||
|
|
4b028b5080 | ||
|
|
4cd721be85 | ||
|
|
d58ca402a7 | ||
|
|
5386879040 | ||
|
|
f19a1f23a9 | ||
|
|
5023e5be4c | ||
|
|
5527d22459 | ||
|
|
9d567c2e70 | ||
|
|
39c03a15d5 | ||
|
|
5e6d2562f9 | ||
|
|
7009d5a014 | ||
|
|
42f9ddabb9 | ||
|
|
30efb5afc0 | ||
|
|
786dc76c09 | ||
|
|
fc48874a5d | ||
|
|
67164e7b23 | ||
|
|
3db9774ac6 | ||
|
|
03aef93d9a | ||
|
|
9b7e3de3ed | ||
|
|
291b6b061a | ||
|
|
08496533e2 | ||
|
|
f8dceb5046 | ||
|
|
240ed4047f | ||
|
|
0bf6f7cd7c | ||
|
|
313bd86e3e | ||
|
|
56259d5605 | ||
|
|
8a4885c1fe | ||
|
|
5b06f84917 | ||
|
|
37a1428914 | ||
|
|
bff065daf3 | ||
|
|
c60d899f31 | ||
|
|
fb7c390506 | ||
|
|
22afb69573 | ||
|
|
be51304c9c | ||
|
|
44f83d800f | ||
|
|
bf07973d90 | ||
|
|
11e94b686c | ||
|
|
c68bf674a1 | ||
|
|
dbbc310082 | ||
|
|
e861f4a597 | ||
|
|
049e93707c | ||
|
|
164294ecb7 | ||
|
|
22ef489795 | ||
|
|
8f9d650f6c | ||
|
|
7e134a63bd | ||
|
|
9b5c25cb5b | ||
|
|
894946b207 | ||
|
|
92ad2068db | ||
|
|
59662a1500 | ||
|
|
125b88a2ca | ||
|
|
79fce8c769 | ||
|
|
a4a53f8b3b | ||
|
|
743e1ae90f | ||
|
|
dbcff80907 | ||
|
|
6e10965aed | ||
|
|
0c8c4a9c53 | ||
|
|
7632541a1e | ||
|
|
a213ad9a85 | ||
|
|
15ac5a9004 | ||
|
|
0658668eb0 | ||
|
|
ccef69ac37 | ||
|
|
64676fda2e | ||
|
|
6ea2d776ae | ||
|
|
98ced9616c | ||
|
|
ae19183803 | ||
|
|
8536514baf | ||
|
|
81982a9f79 | ||
|
|
1acbb2f096 | ||
|
|
80fb4d40a5 | ||
|
|
c972dd1aac | ||
|
|
9dde65c25c | ||
|
|
7486b0c7cd | ||
|
|
5c7a520a0b | ||
|
|
193ddf71f8 | ||
|
|
c46fe9816c | ||
|
|
aada5f0794 | ||
|
|
5c7bf363a6 | ||
|
|
00b74be540 | ||
|
|
96cb01f57a | ||
|
|
adf5f403ae | ||
|
|
1c09c95c71 | ||
|
|
64f442d743 | ||
|
|
cd8d43446b | ||
|
|
7361eac1a4 | ||
|
|
9d41f0a938 | ||
|
|
00274c15df | ||
|
|
d0b8a91f94 | ||
|
|
098e8dbef6 | ||
|
|
ec29b8bbc6 | ||
|
|
1d8f83b8c6 | ||
|
|
12c4419c6a | ||
|
|
b134c53f33 | ||
|
|
23ff19fdb5 | ||
|
|
7a43ba631b | ||
|
|
2beb26f3e3 | ||
|
|
4b55f49e99 | ||
|
|
c0239a771c | ||
|
|
bc4738e900 | ||
|
|
1c76caf59b | ||
|
|
0679951d4a | ||
|
|
df7aee9e4b | ||
|
|
a8d97a2521 | ||
|
|
9370b336d8 | ||
|
|
118f98222a | ||
|
|
dc997821f4 | ||
|
|
aef0fdb435 | ||
|
|
21ee3c0e78 | ||
|
|
d6c665f74b | ||
|
|
79305a50d0 | ||
|
|
e758aa41ef | ||
|
|
910cb34b09 | ||
|
|
976fea4eb2 | ||
|
|
81447ec9e6 | ||
|
|
61b8e9f7b5 | ||
|
|
8e86a04448 | ||
|
|
f23715a783 | ||
|
|
fa693a8bb1 | ||
|
|
103168c25b | ||
|
|
ae7ed4eec5 | ||
|
|
caa516db72 | ||
|
|
f05c3d6113 | ||
|
|
5d872b1535 | ||
|
|
1559cd9f5c | ||
|
|
a5a87c7da1 | ||
|
|
0e6cec62c1 | ||
|
|
3bb1d89165 | ||
|
|
f5f5f102fb | ||
|
|
0c82fe7e4d | ||
|
|
13ffe8a84d | ||
|
|
4c6eebaa33 | ||
|
|
f8fbb2dce2 | ||
|
|
dbfe682674 | ||
|
|
2a148d44a1 | ||
|
|
0648d2e9e3 | ||
|
|
ac9128fa0c | ||
|
|
4d7a872670 | ||
|
|
07f716b254 | ||
|
|
b0d6a7307c | ||
|
|
53ad793ff8 | ||
|
|
ea4332d8e4 | ||
|
|
5c5ff9324f | ||
|
|
2ab6352fdb | ||
|
|
56dcbaf40c | ||
|
|
029b5abcac | ||
|
|
32521ac91a | ||
|
|
bf88407902 | ||
|
|
63cf47db63 | ||
|
|
9970866b3b | ||
|
|
d61941b276 | ||
|
|
081fdb8026 | ||
|
|
f64dfbf79d | ||
|
|
5fb73f4ad5 | ||
|
|
1c16d32420 | ||
|
|
e367e0d714 | ||
|
|
4046649e32 | ||
|
|
77fcfe439c | ||
|
|
71d1355419 | ||
|
|
d1b270f336 | ||
|
|
9190a08332 | ||
|
|
3fae50e305 | ||
|
|
3582497ed4 | ||
|
|
19a67daabf | ||
|
|
02a7e5fd8a | ||
|
|
df72b16022 | ||
|
|
61bdc13810 | ||
|
|
1350a34316 | ||
|
|
7cfe68b96a | ||
|
|
7a93a61f54 | ||
|
|
362977e598 | ||
|
|
5cac897beb | ||
|
|
cad94cc6b3 | ||
|
|
fe4e429e85 | ||
|
|
d83b10e2d5 | ||
|
|
bd2a757fcd | ||
|
|
358b69a4cb | ||
|
|
08821a1454 | ||
|
|
90277c1d87 | ||
|
|
a51e702f77 | ||
|
|
466e37128b | ||
|
|
f1ea61388f | ||
|
|
72c11fda3a | ||
|
|
d6645983ef | ||
|
|
01e911ecdb | ||
|
|
12c0b3d889 | ||
|
|
c1075e40b7 | ||
|
|
fabe3f01b7 | ||
|
|
3a2ff61899 | ||
|
|
aeff94d272 | ||
|
|
c94f5d83fa | ||
|
|
b0756fa0f9 | ||
|
|
6c85abd57b | ||
|
|
7659ae94bd | ||
|
|
e306e81e43 | ||
|
|
6d5768b26b | ||
|
|
cee9f8bf32 | ||
|
|
b8e2678c01 | ||
|
|
b0fe96ed03 | ||
|
|
bb65ec380b | ||
|
|
ae6248227b | ||
|
|
36ce3c791d | ||
|
|
5d639db5a8 | ||
|
|
63161ffdbb | ||
|
|
cf11c71831 | ||
|
|
048f8c1f4b | ||
|
|
b6b42d9071 | ||
|
|
d43863ee9f | ||
|
|
177d10577f | ||
|
|
47d8e163de | ||
|
|
e49c621e59 | ||
|
|
5e32a6d828 | ||
|
|
b1358a7eca | ||
|
|
ba89092e12 | ||
|
|
f855420a82 | ||
|
|
1589a81945 | ||
|
|
eec2583cb2 | ||
|
|
481c6a8de2 | ||
|
|
68717e8493 | ||
|
|
c524d37136 | ||
|
|
6674f549f2 | ||
|
|
ba371ec730 | ||
|
|
44d1d52426 | ||
|
|
edcca4fb96 | ||
|
|
6fbf9458d1 | ||
|
|
a476e4639b | ||
|
|
5534a1c755 | ||
|
|
c45518db70 | ||
|
|
55480c059a | ||
|
|
04a2af8681 | ||
|
|
71f672a0e0 | ||
|
|
33c40874fa | ||
|
|
b3ced64672 | ||
|
|
a60bf00d54 | ||
|
|
8d9a2744af | ||
|
|
bcd7bac950 | ||
|
|
e996b3a9f6 | ||
|
|
e207cccdc5 | ||
|
|
9776dd1082 | ||
|
|
bcff00799f | ||
|
|
0dc76621bc | ||
|
|
1040c5706f | ||
|
|
265d08e3bd | ||
|
|
491fce7052 | ||
|
|
3404bc4840 | ||
|
|
064e3f6ac0 | ||
|
|
71f0c4f9da | ||
|
|
18143608dc | ||
|
|
83a6d92449 | ||
|
|
ac1f690c54 | ||
|
|
b063f1bfb4 | ||
|
|
4c5caa7b86 | ||
|
|
85edda6e5f | ||
|
|
6e1a4a103c | ||
|
|
2879c084e5 | ||
|
|
4ecc94e531 | ||
|
|
b8ef583b93 | ||
|
|
fd61e19135 | ||
|
|
79011465af | ||
|
|
27acedf8b7 | ||
|
|
532c37140c | ||
|
|
7f4a951065 | ||
|
|
b9fb7fad9c | ||
|
|
be85d78f55 | ||
|
|
23e02090e0 | ||
|
|
50f2a811ad | ||
|
|
28ee448c44 | ||
|
|
688a2099b5 | ||
|
|
6f0a53ed02 | ||
|
|
8a14de663e | ||
|
|
09344e938a | ||
|
|
bf41140322 | ||
|
|
689a85db9b | ||
|
|
5e0d206e7a | ||
|
|
61addd7950 | ||
|
|
60bb9e2aa9 | ||
|
|
842fbbab64 | ||
|
|
bbd227caf4 | ||
|
|
975b4f5e4f | ||
|
|
06840931ba | ||
|
|
9f4327f517 | ||
|
|
3f13c70dfa | ||
|
|
26f8803b23 | ||
|
|
60f1e79b2f | ||
|
|
5ab2ebe45a | ||
|
|
9c8fe80d6d | ||
|
|
1e7e22330f | ||
|
|
7244868fbd | ||
|
|
86ed39ecdd | ||
|
|
94d87b726f | ||
|
|
0984a1ec26 | ||
|
|
de5da060ce | ||
|
|
592435572c | ||
|
|
3172a18a46 | ||
|
|
7f1c57b89c | ||
|
|
39555a48b5 | ||
|
|
e4cdfa13ca | ||
|
|
cb4011bc03 | ||
|
|
299b0faf7c | ||
|
|
2ffd698c03 | ||
|
|
dde54690fc | ||
|
|
8d03055b34 | ||
|
|
8a850be857 | ||
|
|
2a530712cf | ||
|
|
fd22c7dc3a | ||
|
|
b884f6aacc | ||
|
|
ce680d4082 | ||
|
|
644d3f350d | ||
|
|
0144863d33 | ||
|
|
a6b56519a2 | ||
|
|
0a71caf9cd | ||
|
|
35e74328c4 | ||
|
|
e46ac0ff7e | ||
|
|
17fe6c7691 | ||
|
|
01ca7a69c4 | ||
|
|
6d04db6113 | ||
|
|
7c899abb15 | ||
|
|
89d4df2a05 | ||
|
|
71c8364f80 | ||
|
|
214cd6b9e0 | ||
|
|
73c280de3a | ||
|
|
23e1dd3e35 | ||
|
|
2b060aae0d | ||
|
|
186ad73651 | ||
|
|
de7a010f62 | ||
|
|
ac1bcd2918 | ||
|
|
a2e6243282 | ||
|
|
01f92ced81 | ||
|
|
b493bcf4fa | ||
|
|
f6ee30be20 | ||
|
|
50da124ea7 | ||
|
|
5e22f9e2bd | ||
|
|
a384eb4c15 | ||
|
|
dc4620eeb2 | ||
|
|
d7cfa38eee | ||
|
|
a27110ebe5 | ||
|
|
f5988527fb | ||
|
|
c405309742 | ||
|
|
747d12224f | ||
|
|
2b621ab68e | ||
|
|
8689865d31 | ||
|
|
358324533d | ||
|
|
bc5821e69f | ||
|
|
d5b478c968 | ||
|
|
368eba1826 | ||
|
|
6cffb449f4 | ||
|
|
d79d9c7f13 | ||
|
|
179822b994 | ||
|
|
ba369a0b73 | ||
|
|
6a5251f0ef | ||
|
|
004fd74748 | ||
|
|
e8d6d4c080 | ||
|
|
8644f70db4 | ||
|
|
72f233b186 | ||
|
|
fc85950a73 | ||
|
|
fd5cbbb4d5 | ||
|
|
888b6bd6d5 | ||
|
|
81ea83064c | ||
|
|
45859b01e5 | ||
|
|
5b8f166169 | ||
|
|
7e045ba7b0 | ||
|
|
6247975ee6 | ||
|
|
297451230c | ||
|
|
754d555768 | ||
|
|
b61a91f82d | ||
|
|
1ac7a724bd | ||
|
|
2fcf46505c | ||
|
|
fdec4f08c0 | ||
|
|
076c197385 | ||
|
|
3432e830f2 | ||
|
|
14a237749c | ||
|
|
1559c4751e | ||
|
|
af7c4ce8ec | ||
|
|
5763ce6160 | ||
|
|
d7ca6caae8 | ||
|
|
2c4f232aaa | ||
|
|
bddfa71fa6 | ||
|
|
f537ab058b | ||
|
|
1b44b5b05a | ||
|
|
f6e971c652 | ||
|
|
dfa7a71f53 | ||
|
|
3639e02843 | ||
|
|
27b6e79c8a | ||
|
|
f370151b54 | ||
|
|
597a8f468e | ||
|
|
8bd7a00410 | ||
|
|
4867052972 | ||
|
|
688c3a34f6 | ||
|
|
e357b27433 | ||
|
|
dd70bf92f3 | ||
|
|
0a97523928 | ||
|
|
f67bd02283 | ||
|
|
ef1055a9b6 | ||
|
|
cd970b5871 | ||
|
|
11b0863a65 | ||
|
|
5b8cb497de | ||
|
|
38e2addbb6 | ||
|
|
58158ce8b1 | ||
|
|
5ca281f02e | ||
|
|
ac39ce6b98 | ||
|
|
38fb0a6828 | ||
|
|
38c41cfaf4 | ||
|
|
95ba628ac3 | ||
|
|
a53f2ecbaf | ||
|
|
aa1ff55bbe | ||
|
|
097d013447 | ||
|
|
3916623c46 | ||
|
|
42c50c5fa1 | ||
|
|
ea515bbecc | ||
|
|
9f8006060b | ||
|
|
6cd51c4426 | ||
|
|
b1e96bb50c | ||
|
|
50d3bda3b7 | ||
|
|
3dfa4a1bbc | ||
|
|
d1922acfc8 | ||
|
|
3947e424e7 | ||
|
|
25e202a09e | ||
|
|
8eab3c1590 | ||
|
|
4f294aa0ef | ||
|
|
81aa09a2e2 | ||
|
|
10fc8cb48d | ||
|
|
186f0708cc | ||
|
|
622b3ff9ed | ||
|
|
c06963c3d6 | ||
|
|
9009313748 | ||
|
|
d55a8c3079 | ||
|
|
fee6a61f19 | ||
|
|
6f1ef09d2a | ||
|
|
cf6c13e605 | ||
|
|
028f55910a | ||
|
|
d7684d39a8 | ||
|
|
f652ccd4b1 | ||
|
|
6be92498bc | ||
|
|
677e04ab7d | ||
|
|
46fdc457fc | ||
|
|
0306b6b73b | ||
|
|
c881653d55 | ||
|
|
7650d831e3 | ||
|
|
e7a8cc3b8b | ||
|
|
d173b2f237 | ||
|
|
49ba6ed0f2 | ||
|
|
2792d05c7f | ||
|
|
cacda0f3cc | ||
|
|
c420547ff8 | ||
|
|
83d388613f | ||
|
|
094b059aea | ||
|
|
e36a8c627b | ||
|
|
d341e91290 | ||
|
|
557afc95bd | ||
|
|
cb9979ac94 | ||
|
|
5486957141 | ||
|
|
d49155df95 | ||
|
|
0dd4b5f620 | ||
|
|
690603bfda | ||
|
|
b877cc9509 | ||
|
|
32fddce8fb | ||
|
|
03a2b35846 | ||
|
|
086cdc559c | ||
|
|
97eefe28f1 | ||
|
|
32019c99f4 | ||
|
|
f30e15159f | ||
|
|
efd0bae0d6 | ||
|
|
253aa03e07 | ||
|
|
32183118de | ||
|
|
6c8ad1139c | ||
|
|
980c2907ad | ||
|
|
00129f4b40 | ||
|
|
f178bea0d0 | ||
|
|
c583598257 | ||
|
|
1e14425555 | ||
|
|
4a103927cd | ||
|
|
ab3dc41358 | ||
|
|
c9fcd3d203 | ||
|
|
5186347b48 | ||
|
|
e4a40704b5 | ||
|
|
fcfbbc6d84 | ||
|
|
95a38c7712 | ||
|
|
be0f4477bf | ||
|
|
3ebd897601 | ||
|
|
c60e1e8d7f | ||
|
|
eb205562bf | ||
|
|
83a50bb610 | ||
|
|
331171b826 | ||
|
|
1d9965dad6 | ||
|
|
647820c75e | ||
|
|
d9c7dde174 | ||
|
|
ef8c688fa1 | ||
|
|
b0f0d02e75 | ||
|
|
51bc2674bd | ||
|
|
5fc2008517 | ||
|
|
611e5c7ea2 | ||
|
|
74c8b0678a | ||
|
|
00afd79858 | ||
|
|
45fae976f0 | ||
|
|
ae9c1746f1 | ||
|
|
fa1699298b | ||
|
|
c8720b259c | ||
|
|
113a90a5a0 | ||
|
|
7c0e43b2e1 | ||
|
|
d51df73f37 | ||
|
|
8da203648b | ||
|
|
12cc670fa0 | ||
|
|
88222edb7f | ||
|
|
7ca0a511d5 | ||
|
|
02e08403e3 | ||
|
|
e29262b95a | ||
|
|
c449914936 | ||
|
|
9c290b5e11 | ||
|
|
2d9dcde0e3 | ||
|
|
da681a463e | ||
|
|
aeb494703e | ||
|
|
da4e3670b1 | ||
|
|
075e2301e4 | ||
|
|
df3f94b017 | ||
|
|
3df006fb97 | ||
|
|
52d98a1157 | ||
|
|
7c772d3a5a | ||
|
|
a583ecba7b | ||
|
|
76e7347ecf | ||
|
|
e49e6ad179 | ||
|
|
859bece921 | ||
|
|
8ffde41fa4 | ||
|
|
c88bf3e94b | ||
|
|
e623ceacc8 | ||
|
|
92a044ba9b | ||
|
|
906eeefa52 | ||
|
|
e5913cd10d | ||
|
|
52d252f199 | ||
|
|
28425cc493 | ||
|
|
a0ae19a8fd | ||
|
|
0bebb312dd | ||
|
|
0e35e85753 | ||
|
|
bc816bb858 | ||
|
|
e171861629 | ||
|
|
8f539af4ab | ||
|
|
122a4d8f32 | ||
|
|
8bd935791e | ||
|
|
edbae09a17 | ||
|
|
d115d43559 | ||
|
|
bdb218cb0f | ||
|
|
e4e07b76ec | ||
|
|
fd28fea3b6 | ||
|
|
d3c1a73ced | ||
|
|
c4de1c53b9 | ||
|
|
860167b950 | ||
|
|
4ebde3af5f | ||
|
|
ab5e9a46b4 | ||
|
|
c348fa89a9 | ||
|
|
140dc656a2 | ||
|
|
2cad23a7f3 | ||
|
|
9e5c3ae6fb | ||
|
|
ab33836637 | ||
|
|
cb684fa6de | ||
|
|
de6307dc38 | ||
|
|
da51b2b5a0 | ||
|
|
03f0984e1d | ||
|
|
e1f6007dea | ||
|
|
0508256d28 | ||
|
|
993fcd989b | ||
|
|
65d647bc0a | ||
|
|
23d5204634 | ||
|
|
8a239b8f9c | ||
|
|
0a89652ae5 | ||
|
|
6d6054d1dc | ||
|
|
bc9cdadfb0 | ||
|
|
cfe98506a5 | ||
|
|
c4c159f056 | ||
|
|
4d761d7e8a | ||
|
|
c1f36f7455 | ||
|
|
c976c3226d | ||
|
|
cc6287c124 | ||
|
|
966fe97759 | ||
|
|
1f2fe65185 | ||
|
|
b83cd24d57 | ||
|
|
5b4e4fd943 | ||
|
|
61cd9acaa2 | ||
|
|
d2895928bd | ||
|
|
5c354b02ea | ||
|
|
a764642a85 | ||
|
|
a9b0fe6728 | ||
|
|
79ade2c182 | ||
|
|
146dc070ea | ||
|
|
c1b2bae333 | ||
|
|
e771b36a18 | ||
|
|
edcb2280cc | ||
|
|
a249ca1da3 | ||
|
|
f1383b5c66 | ||
|
|
00e497828e | ||
|
|
5968eb697e | ||
|
|
ea78b389c9 | ||
|
|
0b726f7acc | ||
|
|
4d4b95c995 | ||
|
|
fc06d195ec | ||
|
|
c7fc2e3b92 | ||
|
|
980fc77812 | ||
|
|
75dc1722da | ||
|
|
9326f1f0da | ||
|
|
ac831444ce | ||
|
|
4746cb3814 | ||
|
|
6c38a3bbaa | ||
|
|
9699a184d1 | ||
|
|
51eb2c9fa8 | ||
|
|
abf6ea1fec | ||
|
|
37835c1972 | ||
|
|
cd2f139409 | ||
|
|
13bba1f4b8 | ||
|
|
4f21c7b7b4 | ||
|
|
65cf7960bf | ||
|
|
96c5ef5fa2 | ||
|
|
f7c6a82e73 | ||
|
|
23e81bc3fe | ||
|
|
7c35845006 | ||
|
|
7ad0f8a17f | ||
|
|
b6cd123719 | ||
|
|
944ae9f8d9 | ||
|
|
935e114d40 | ||
|
|
7fbfec4e5a | ||
|
|
6d5c72b54b | ||
|
|
23ad501595 | ||
|
|
985d7d28ed | ||
|
|
9ddaddfaa0 | ||
|
|
de11ae20a4 | ||
|
|
89574faef7 | ||
|
|
7bf6f1b870 | ||
|
|
0ee0cb35bc | ||
|
|
780eb05553 | ||
|
|
d71a7fbbed | ||
|
|
5b597b6583 | ||
|
|
42b24d71e9 | ||
|
|
07c65351d5 | ||
|
|
cadf7e732e | ||
|
|
8682a6bd0a | ||
|
|
e20357663d | ||
|
|
e777992b3e | ||
|
|
5f43abc908 | ||
|
|
8cbd92ccb6 | ||
|
|
80b4f7d037 | ||
|
|
d5839e199f | ||
|
|
4b9ed91546 | ||
|
|
2e9b9ab987 | ||
|
|
9a50a0cc2c | ||
|
|
167ea6dfcf | ||
|
|
f17d9ccbd6 | ||
|
|
8a6bbc55d2 | ||
|
|
d42ec58ad1 | ||
|
|
c82c6a88f8 | ||
|
|
e7c8778e30 | ||
|
|
7c4cf66243 | ||
|
|
b4b3a11f01 | ||
|
|
17ce869939 | ||
|
|
05fd3cf787 | ||
|
|
3daf90c5fe | ||
|
|
02db3baf52 | ||
|
|
0bc7311473 | ||
|
|
2fda7af8a7 | ||
|
|
0cd471dfb2 | ||
|
|
20982ab1a6 | ||
|
|
81ed9c0c5c | ||
|
|
23263bd83e | ||
|
|
4d3d608e5c | ||
|
|
850a02b4c0 | ||
|
|
2d4ace68e7 | ||
|
|
9adc66af63 | ||
|
|
c24c5f7985 | ||
|
|
5f280c3e24 | ||
|
|
edff49a44f | ||
|
|
345431bbcc | ||
|
|
b087e712ca | ||
|
|
b7a281c6c4 | ||
|
|
bc1521d937 | ||
|
|
c15f7641f4 | ||
|
|
123de1a3ce | ||
|
|
6d66557b11 | ||
|
|
cb3484e1ab | ||
|
|
3166600ac6 | ||
|
|
ba39f35a01 | ||
|
|
934ef04694 | ||
|
|
bfe41d0391 | ||
|
|
5c9cd4e4cd | ||
|
|
c57d3416b7 | ||
|
|
498a2a314b | ||
|
|
63961d8711 | ||
|
|
02f7d73fca | ||
|
|
0bfb5f8a3c | ||
|
|
f22ac8db2b | ||
|
|
86067f913b | ||
|
|
4744757726 | ||
|
|
108e1b730e | ||
|
|
bf93d60bf1 | ||
|
|
cd5547dfd8 | ||
|
|
ff7f830f65 | ||
|
|
0993fec114 | ||
|
|
ebec5c98b8 | ||
|
|
4075bce26a | ||
|
|
37b830a2fd | ||
|
|
f22dd3aa88 | ||
|
|
c27591e838 | ||
|
|
790cdf2996 | ||
|
|
7f73740fc7 | ||
|
|
babb08c2e0 | ||
|
|
24960cd02b | ||
|
|
1fcf844e8d | ||
|
|
4b245952fe | ||
|
|
4bb4cced90 | ||
|
|
6625ade578 | ||
|
|
3f74571dfc | ||
|
|
c8c3d5dc3d | ||
|
|
6b862dc860 | ||
|
|
92956cb1a7 | ||
|
|
1df662102c | ||
|
|
726bcc83d2 | ||
|
|
b4fb2d102c | ||
|
|
624fba9704 | ||
|
|
fdb629f82b | ||
|
|
11d2eb35be | ||
|
|
d970b435b4 | ||
|
|
82398aef5a | ||
|
|
deaf1860fb | ||
|
|
9fcf1eb9cb | ||
|
|
80de7ed5cb | ||
|
|
e2f1b16cb9 | ||
|
|
73d0bb8bbd | ||
|
|
2683dbb20a | ||
|
|
8b3228797e | ||
|
|
947b37397f | ||
|
|
f5f0e00e8d | ||
|
|
73ab7da665 | ||
|
|
6f00b6fd61 | ||
|
|
8ada8b79c1 | ||
|
|
cd293d4786 | ||
|
|
b7d59bdd85 | ||
|
|
894f599f79 | ||
|
|
29bb10b8ff | ||
|
|
7224c7183b | ||
|
|
81301357e4 | ||
|
|
ddca18f25a | ||
|
|
d1164290a6 | ||
|
|
3949edc169 | ||
|
|
a296ac2e8f | ||
|
|
551f4b097d | ||
|
|
8d42f747a7 | ||
|
|
163a76dd10 | ||
|
|
7389ed5d0c | ||
|
|
5905058e97 | ||
|
|
2a11fefe45 | ||
|
|
e27ed0743c | ||
|
|
9f6a788a98 | ||
|
|
a15d20b400 | ||
|
|
55ae836a43 | ||
|
|
c4fc5409e3 | ||
|
|
956ad75168 | ||
|
|
71494a53ca | ||
|
|
bc211b7c36 | ||
|
|
2eaef09770 | ||
|
|
641d63604b | ||
|
|
750a3906c7 | ||
|
|
bd8e69ce98 | ||
|
|
16b17dd7aa | ||
|
|
d5a6c22cc6 | ||
|
|
b2271713e1 | ||
|
|
f0b9662c5e | ||
|
|
720c6b5d42 | ||
|
|
c30d44ea13 | ||
|
|
b5788134b6 | ||
|
|
790103fb48 | ||
|
|
e56944dc24 | ||
|
|
ed04951ed7 | ||
|
|
84337fe3d1 | ||
|
|
da631c8b22 | ||
|
|
450d0d5ddf | ||
|
|
0ed47fc7ce | ||
|
|
d57a00e8be | ||
|
|
fa7721c31d | ||
|
|
0f72d46050 | ||
|
|
fe3b5bc2ed | ||
|
|
4f7f8dd82b | ||
|
|
81fb294859 | ||
|
|
c04fd5bbf9 | ||
|
|
d6ed5a0eba | ||
|
|
33b996f6be | ||
|
|
26d4bbe9a4 | ||
|
|
5abea6d0c5 | ||
|
|
afce7cdbd7 | ||
|
|
8c3cff59c6 | ||
|
|
bc15a636f1 | ||
|
|
1564533161 | ||
|
|
27fd6843cc | ||
|
|
8c8d5552c8 | ||
|
|
a7ee414c67 | ||
|
|
6573b355cc | ||
|
|
eaa36a6a31 | ||
|
|
8b1c4f923e | ||
|
|
89c36e4996 | ||
|
|
0ea5c9585a | ||
|
|
5fa2fe3992 | ||
|
|
014437298c | ||
|
|
04d91516e8 | ||
|
|
9b33a50bb0 | ||
|
|
b0e9d9fa9d | ||
|
|
991b612b62 | ||
|
|
855c9363a5 | ||
|
|
625544f53e | ||
|
|
f179da8cd1 | ||
|
|
eeee776555 | ||
|
|
d0bde14a2a | ||
|
|
69b0e407ad | ||
|
|
ad2b9ab76c | ||
|
|
32483de4f2 | ||
|
|
ec713cfa1b | ||
|
|
eac8c1c1a0 | ||
|
|
4e15ab7924 | ||
|
|
5882755e7c | ||
|
|
13388df603 | ||
|
|
430385fa63 | ||
|
|
7bfebdcfeb | ||
|
|
e472c3b140 | ||
|
|
43ac3d951c | ||
|
|
207fa232c3 | ||
|
|
667dc1976a | ||
|
|
7437750de5 | ||
|
|
aab47c9e80 | ||
|
|
f1ed803525 | ||
|
|
093c1703d7 | ||
|
|
1f2e16aeea | ||
|
|
6f89745a58 | ||
|
|
9b710b0b6f | ||
|
|
992120b861 | ||
|
|
229bef5f82 | ||
|
|
c8a4890fc7 | ||
|
|
10a9848ac8 | ||
|
|
95189e37ba | ||
|
|
fe1f09f08d | ||
|
|
6adfa15742 | ||
|
|
edef264f17 | ||
|
|
9911b3fc9d | ||
|
|
1675aa7a59 | ||
|
|
7fd67fda13 | ||
|
|
7583f315ce | ||
|
|
7fd70d2088 | ||
|
|
337ee73844 | ||
|
|
43702a260b | ||
|
|
40208a9f76 | ||
|
|
b958358389 | ||
|
|
c23aacedad | ||
|
|
4f148469d7 | ||
|
|
247c43278c | ||
|
|
45f45e0511 | ||
|
|
c0c469ae9b | ||
|
|
4b86fd8d8a | ||
|
|
8fba47f449 | ||
|
|
f9ae964280 | ||
|
|
ca95615d7f | ||
|
|
747b255e34 | ||
|
|
c0da9ebd6c | ||
|
|
5c40b38a05 | ||
|
|
7bc03dcf06 | ||
|
|
f62e6168fd | ||
|
|
39c1470ea6 | ||
|
|
e48b99f1c1 | ||
|
|
71ae545907 | ||
|
|
b9a5eda187 | ||
|
|
231a2039c2 | ||
|
|
a415bc23fa | ||
|
|
79add35fc1 | ||
|
|
901763fc39 | ||
|
|
1034cb1ea2 | ||
|
|
020093fd67 | ||
|
|
f17b3fbd32 | ||
|
|
15b58e3a6b | ||
|
|
da6c98826b | ||
|
|
26415e2978 | ||
|
|
d849bd3b66 | ||
|
|
5996192455 | ||
|
|
a38b6b5522 | ||
|
|
1d6bc40bff | ||
|
|
437fa62cb1 | ||
|
|
6cde26d9ed | ||
|
|
f6dd5a68cd | ||
|
|
b1507dc576 | ||
|
|
a5d5b1554f | ||
|
|
ec8efebc94 | ||
|
|
f86cbf5527 | ||
|
|
57142d899c | ||
|
|
504a04279e | ||
|
|
3b4ef4a814 | ||
|
|
a7e3d2fc86 | ||
|
|
776ee66bae | ||
|
|
9bf2cd0691 | ||
|
|
fec74cf305 | ||
|
|
d3d7fbca61 | ||
|
|
550862a415 | ||
|
|
1763b530da | ||
|
|
8307150cae | ||
|
|
d2223c45d1 | ||
|
|
472ee5e295 | ||
|
|
1d0aebd836 | ||
|
|
8240626043 | ||
|
|
2cd14235c8 | ||
|
|
f774513554 | ||
|
|
388da9f003 | ||
|
|
fa18243491 | ||
|
|
5df1c1702b | ||
|
|
b6557802f4 | ||
|
|
15e3a511b6 | ||
|
|
08fbde0e8f | ||
|
|
28ebb4e8dd | ||
|
|
04fda57cbe | ||
|
|
b24495136c | ||
|
|
7d3fa55571 | ||
|
|
a76b5db8db | ||
|
|
667dd01ac7 | ||
|
|
559bee962a | ||
|
|
9f977d06e0 | ||
|
|
f67a916940 | ||
|
|
8a1308948f | ||
|
|
4e130d11a3 | ||
|
|
51aa5b268f | ||
|
|
6869133f53 | ||
|
|
ad3d88e47f | ||
|
|
6d29f8ba74 | ||
|
|
c7cb89e91d | ||
|
|
27f5118abd | ||
|
|
ac5a6e516d | ||
|
|
5d5bfbc1d1 | ||
|
|
9f4ba80000 | ||
|
|
c21c334b73 | ||
|
|
14093d9d43 | ||
|
|
176ca2f75d | ||
|
|
cfb71c7dad | ||
|
|
722eab83b1 | ||
|
|
d30edb2dae | ||
|
|
cba461ce8a | ||
|
|
f876505e25 | ||
|
|
5b9fcd5852 | ||
|
|
8a122cd9e1 | ||
|
|
557e68225c | ||
|
|
dc0947b87e | ||
|
|
af2c06cd28 | ||
|
|
67a4c6f797 | ||
|
|
0d1c857410 | ||
|
|
c7684dc94d | ||
|
|
a247572f64 | ||
|
|
306111303a | ||
|
|
c12b48537a | ||
|
|
0bf69713ab | ||
|
|
c05f1475ed | ||
|
|
416c262f02 | ||
|
|
40a5976f11 | ||
|
|
dc582fbec8 | ||
|
|
7047f0a449 | ||
|
|
d7a884a567 | ||
|
|
28de57792c | ||
|
|
a230cdbd21 | ||
|
|
251a261679 | ||
|
|
3baef254fd | ||
|
|
9e69e928b2 | ||
|
|
6eb595d2ca | ||
|
|
acf07a5144 | ||
|
|
7f53c58057 | ||
|
|
a069dc4855 | ||
|
|
febf544202 | ||
|
|
f2dd7b8815 | ||
|
|
d758e37fe3 | ||
|
|
9bc02a5623 | ||
|
|
eb0ec265d0 | ||
|
|
1f236dc02a | ||
|
|
86c279cbb2 | ||
|
|
4a7f1bed3a | ||
|
|
a730ae18c8 | ||
|
|
930bf439c0 | ||
|
|
f5f3133b87 | ||
|
|
cbca96de84 | ||
|
|
4d8ae3f124 | ||
|
|
653127431d | ||
|
|
22acef3765 | ||
|
|
0d5bf11f0d | ||
|
|
a824ccaff3 | ||
|
|
97ac965ba5 | ||
|
|
3e7f284df5 | ||
|
|
5c749fe26f | ||
|
|
aa48b46f48 | ||
|
|
6eaa4ae176 | ||
|
|
60c330b342 | ||
|
|
fdeb994121 | ||
|
|
65ed92fe7b | ||
|
|
9c8730786b | ||
|
|
7608823ea7 | ||
|
|
4f8c1a2ca2 | ||
|
|
37489dd4e1 | ||
|
|
a53aa1d0b8 | ||
|
|
f7b64a5762 | ||
|
|
9b1fe0d9a4 | ||
|
|
b876645fc5 | ||
|
|
d9c0b8f8ad | ||
|
|
78d2b239c8 | ||
|
|
5a12d98893 | ||
|
|
621f11e6f9 | ||
|
|
8417f2fe4e | ||
|
|
3ef2a0a065 | ||
|
|
faec16d1f2 | ||
|
|
a4ef52b533 | ||
|
|
0b407123c2 | ||
|
|
98eedc69ec | ||
|
|
dd231ae293 | ||
|
|
ad6196ddab | ||
|
|
49ca0cecf4 | ||
|
|
148f2fb6db | ||
|
|
e04cd298fb | ||
|
|
5bb4e2b4b6 | ||
|
|
7b22db50d3 | ||
|
|
fecb2193ae | ||
|
|
46af3bd0c0 | ||
|
|
c245c89f82 | ||
|
|
a8f0cd9dae | ||
|
|
3101189d47 | ||
|
|
3f0b644b85 | ||
|
|
25c2c483f8 | ||
|
|
8bc2ea14a3 | ||
|
|
8d4f22d9a5 | ||
|
|
d2adc2630c | ||
|
|
727f2b589e | ||
|
|
abbfc92da0 | ||
|
|
73b7e71cad | ||
|
|
4825b16f07 | ||
|
|
d2013366cc | ||
|
|
96609a2c70 | ||
|
|
39306573da | ||
|
|
01e330aa97 | ||
|
|
f08a74097d | ||
|
|
79e37a7383 | ||
|
|
3eebb6ee19 | ||
|
|
096fffdb79 | ||
|
|
728d882ed0 | ||
|
|
b53e42aca6 | ||
|
|
477329ce5b | ||
|
|
283dc4efd5 | ||
|
|
d490bbcaa0 | ||
|
|
f49ddf8e5c | ||
|
|
e1e341652b | ||
|
|
ecda667549 | ||
|
|
a0d96a188a | ||
|
|
6c0f0cddfe | ||
|
|
c7173ecd89 | ||
|
|
e98240c905 | ||
|
|
6cb7e25974 | ||
|
|
c37980c05c | ||
|
|
b5943bd39d | ||
|
|
49a3a7db3b | ||
|
|
0c55240e9d | ||
|
|
f91988aed5 | ||
|
|
3c3ad9fc6a | ||
|
|
291ab79e22 | ||
|
|
e6d5892c14 | ||
|
|
dcca7a57d5 | ||
|
|
4ee8a69337 | ||
|
|
c0414e7db7 | ||
|
|
a419175fe6 | ||
|
|
cd6dead034 | ||
|
|
45342ea9fe | ||
|
|
585bf0e159 | ||
|
|
3a860b9bab | ||
|
|
269180df77 | ||
|
|
a1afed8d95 | ||
|
|
e39f150a21 | ||
|
|
e85f11c6fc | ||
|
|
49a9d7b07e | ||
|
|
a2ef9c429e | ||
|
|
d5e9074f1c | ||
|
|
774699f085 | ||
|
|
7138eef3d1 | ||
|
|
fad5e544aa | ||
|
|
64757e2cf5 | ||
|
|
e05be3f08b | ||
|
|
789f0735df | ||
|
|
34bc775317 | ||
|
|
38de059a1b | ||
|
|
304ae6268f | ||
|
|
978caf4522 | ||
|
|
17df5bfcfc | ||
|
|
5e6a5068cf | ||
|
|
619de68a61 | ||
|
|
6748c3cc91 | ||
|
|
0a462978b7 | ||
|
|
e66a82ff49 | ||
|
|
f3aa797d96 | ||
|
|
e5b478218c | ||
|
|
35e0e9c32a | ||
|
|
17c3c2f029 | ||
|
|
cf83e6398b | ||
|
|
94e061b881 | ||
|
|
720480e39c | ||
|
|
82a63fe159 | ||
|
|
9c1ec9940e | ||
|
|
f23f19da45 | ||
|
|
aea2e1b0a9 | ||
|
|
7d95d679bf | ||
|
|
b3b140066b | ||
|
|
b204c423c1 | ||
|
|
d451c309bb | ||
|
|
01d53da68e | ||
|
|
53dd05e52c | ||
|
|
ab564f5be8 | ||
|
|
00c39450f9 | ||
|
|
f611d08b50 | ||
|
|
90e79b7df3 | ||
|
|
4eb2d725d5 | ||
|
|
51ae5ebcac | ||
|
|
9ecbdb0916 | ||
|
|
b3a2886fd0 | ||
|
|
ceacec0f46 | ||
|
|
ff0f794b01 | ||
|
|
70fafbf3f8 | ||
|
|
5a248a8fc5 | ||
|
|
4a3a4e10df | ||
|
|
c27bd5ff39 | ||
|
|
f804c9627f | ||
|
|
3ab25d02f9 | ||
|
|
9e80fd2b97 | ||
|
|
ff9527a098 | ||
|
|
7dac2f8dc3 | ||
|
|
32e4d55e86 | ||
|
|
f9a9062147 | ||
|
|
89e5919796 | ||
|
|
e5f5b2591d | ||
|
|
77c667eec0 | ||
|
|
b257ce8c2f | ||
|
|
c693c868ca | ||
|
|
6f98b27a05 | ||
|
|
d7efd25d88 | ||
|
|
2cddb1f0bb | ||
|
|
ae1c331595 | ||
|
|
bc97052ed4 | ||
|
|
6c3e0e2aa0 | ||
|
|
dd052e0146 | ||
|
|
54e8f58145 | ||
|
|
def7aa5764 | ||
|
|
6986c74f6d | ||
|
|
b784db404d | ||
|
|
8aee4517bb | ||
|
|
a5fb8fbf94 | ||
|
|
b9365e2ac2 | ||
|
|
696338c1a3 | ||
|
|
4f0616190b | ||
|
|
3278cb0de3 | ||
|
|
4fc04256a5 | ||
|
|
e4ae0fea63 | ||
|
|
d3727ea090 | ||
|
|
0d13909cf6 | ||
|
|
c52ca20e28 | ||
|
|
21f27f26c8 | ||
|
|
5e7a87f397 | ||
|
|
845d763829 | ||
|
|
f5c7d52ec7 | ||
|
|
c3198a5874 | ||
|
|
bbd4afa735 | ||
|
|
ae754a84bf | ||
|
|
3389eb5deb | ||
|
|
01f2c1e71f | ||
|
|
8bfbf8f1bc | ||
|
|
f4242669ba | ||
|
|
bebd9331f1 | ||
|
|
ac61e9ad2c | ||
|
|
648ef4d8a9 | ||
|
|
727fc9a701 | ||
|
|
306512d6bb | ||
|
|
6afb1d389c | ||
|
|
9861983481 | ||
|
|
ca79053db0 | ||
|
|
29c263f878 | ||
|
|
128c3c170a | ||
|
|
a531ab8864 | ||
|
|
0c1be7cc11 | ||
|
|
e4222b45f5 | ||
|
|
ac32c69c31 | ||
|
|
cb2dfeac8d | ||
|
|
9a3602e70b | ||
|
|
a9f53ee258 | ||
|
|
6be3d3d982 | ||
|
|
e49df72083 | ||
|
|
7ede7be7bf | ||
|
|
4758e28a36 | ||
|
|
4a1ee151b3 | ||
|
|
8c8afc1a92 | ||
|
|
ed205f7720 | ||
|
|
d65f7ae992 | ||
|
|
e2ffef57b9 | ||
|
|
002caa9fb3 | ||
|
|
b7c6faf3da | ||
|
|
554ca61d17 | ||
|
|
7b9722d255 | ||
|
|
5505bde8ef | ||
|
|
dbcd9a4060 | ||
|
|
4bdeb2b3aa | ||
|
|
6ae1d03187 | ||
|
|
f75b06abe4 | ||
|
|
1923925710 | ||
|
|
2c5c57ae04 | ||
|
|
f4d11d697e | ||
|
|
7f409b7082 | ||
|
|
937fa5aad2 | ||
|
|
19dcef5135 | ||
|
|
3d01356461 | ||
|
|
2d6f666fa4 | ||
|
|
4dda895f12 | ||
|
|
52617b1722 | ||
|
|
961968a0fc | ||
|
|
f026a788e5 | ||
|
|
2f7c03eb35 | ||
|
|
3afaa48eee | ||
|
|
3201452564 | ||
|
|
7ee1e34fc7 | ||
|
|
67dbf05016 | ||
|
|
4ac9f2e3da | ||
|
|
3f5f6e39a7 | ||
|
|
4723db8e3c | ||
|
|
ca914ec77d | ||
|
|
dcc7f3f357 | ||
|
|
cbdc666236 | ||
|
|
184ef3a1fa | ||
|
|
c732f75944 | ||
|
|
7a1ae4f5fc | ||
|
|
d04bc3757c | ||
|
|
73e8391653 | ||
|
|
f6c1463c15 | ||
|
|
d392c7f901 | ||
|
|
d0387f5820 | ||
|
|
76f92908a3 | ||
|
|
1a115da67b | ||
|
|
f0a37ccf30 | ||
|
|
f331f53a53 | ||
|
|
8611aff06b | ||
|
|
2f3f78e8d3 | ||
|
|
d1e0ee6123 | ||
|
|
45314c9808 | ||
|
|
df00945b46 | ||
|
|
fda0050d86 | ||
|
|
a76d46f9ec | ||
|
|
6b069a82d0 | ||
|
|
6b793d0521 | ||
|
|
ce9103f7cc | ||
|
|
671d6dee36 | ||
|
|
49929c714c | ||
|
|
2986771f07 | ||
|
|
520082d963 | ||
|
|
021e296d45 | ||
|
|
42e56fbcea | ||
|
|
a5b62a4055 | ||
|
|
be98c9b7f6 | ||
|
|
aceeb84507 | ||
|
|
1391063217 | ||
|
|
52157addd0 | ||
|
|
ec0bc6615e | ||
|
|
2f80800e38 | ||
|
|
3959d3347c | ||
|
|
b57d25c69a | ||
|
|
63e43a7cab | ||
|
|
21719f9a26 | ||
|
|
96ec70de4f | ||
|
|
a15a1967dc | ||
|
|
a10d756629 | ||
|
|
0700dc7a64 | ||
|
|
ca654b2140 | ||
|
|
4ff3b87c1c | ||
|
|
ea244fb7a9 | ||
|
|
8061f30e6f | ||
|
|
8f3b12e81e | ||
|
|
d0694ce0db | ||
|
|
0cd4c4bc7f | ||
|
|
12f90c349c | ||
|
|
26b8a1f167 | ||
|
|
3abe382c06 | ||
|
|
1e2edc2c7b | ||
|
|
5fe032a674 | ||
|
|
e825c02df1 | ||
|
|
a4a4d170b5 | ||
|
|
d0fcd523cb | ||
|
|
f72b7dc75d | ||
|
|
4101dc6bf7 | ||
|
|
ea5011b616 | ||
|
|
d6de81747f | ||
|
|
38f04b1c96 | ||
|
|
84169e1a91 | ||
|
|
1f96586a5e | ||
|
|
681176e4c9 | ||
|
|
8bb2663522 | ||
|
|
663abf3139 | ||
|
|
f7ac41db95 | ||
|
|
5502cda9e5 | ||
|
|
a2b165565f | ||
|
|
b426369815 | ||
|
|
ac0840cc0a | ||
|
|
ee98ab0a4a | ||
|
|
2adec2c003 | ||
|
|
f19c9c71bf | ||
|
|
e93adf1884 | ||
|
|
254c4fc507 | ||
|
|
74d5f60d14 | ||
|
|
db7dc0634b | ||
|
|
e156b0db45 | ||
|
|
50adc05fbd | ||
|
|
446cac7c21 | ||
|
|
28ffe3076b | ||
|
|
d4d5e206ca | ||
|
|
42fbe40a4a | ||
|
|
27e4a120e2 | ||
|
|
b5d5b7c73a | ||
|
|
e7471556ba | ||
|
|
640a21341b | ||
|
|
f5befad3e4 | ||
|
|
f8223023c3 | ||
|
|
7028e87f9b | ||
|
|
590728f9c1 | ||
|
|
7cc147fe2d | ||
|
|
3cfb3965bb | ||
|
|
155d421322 | ||
|
|
d3e10bb87b | ||
|
|
fd5433ee62 | ||
|
|
4568f2d06e | ||
|
|
c36e513d1b | ||
|
|
8e089baf3f | ||
|
|
386f6c317e | ||
|
|
75cd84ce8a | ||
|
|
6fad44e35d | ||
|
|
1caac750da | ||
|
|
16370dcb3d | ||
|
|
c1302f2573 | ||
|
|
6f0ffe0955 | ||
|
|
1f89745fe7 | ||
|
|
a46ac18ef7 | ||
|
|
1a05f1c575 | ||
|
|
08f818aa42 | ||
|
|
b3896650c2 | ||
|
|
f285539526 | ||
|
|
a896dcdf3b | ||
|
|
0a187d4ed0 | ||
|
|
2d65bc57d5 | ||
|
|
ab63809fde | ||
|
|
6f04707dc6 | ||
|
|
d14a86a9b5 | ||
|
|
8e6a31d3da | ||
|
|
6e7b6afe87 | ||
|
|
027c231097 | ||
|
|
f1cf7d1f95 | ||
|
|
df611cc263 | ||
|
|
0f3143bbbb | ||
|
|
c280757b76 | ||
|
|
d30b9d84ef | ||
|
|
50ded1dbd9 | ||
|
|
e319aea5a4 | ||
|
|
ba86509c1d | ||
|
|
0a9279ae6b | ||
|
|
a13dde12af | ||
|
|
e2ed358de1 | ||
|
|
a2cd366621 | ||
|
|
15addd9bfc | ||
|
|
a4e34b0053 | ||
|
|
d09529ac30 | ||
|
|
553097b505 | ||
|
|
49c5568577 | ||
|
|
6962b9ee8a | ||
|
|
b4575a3f78 | ||
|
|
35b54d235d | ||
|
|
583a5757e4 | ||
|
|
f355333eee | ||
|
|
4d7df10960 | ||
|
|
66b2c28f4b | ||
|
|
299a9c6d88 | ||
|
|
bd391d979c | ||
|
|
7309bd2282 | ||
|
|
ce84c09d33 | ||
|
|
b4fffbb647 | ||
|
|
3701b4198a | ||
|
|
d4c34098fa | ||
|
|
b3c531193b | ||
|
|
1d0e07c77b | ||
|
|
06a322cf9c | ||
|
|
623d148712 | ||
|
|
647e83d043 | ||
|
|
91a5544644 | ||
|
|
a1190998ae | ||
|
|
097d7a1850 | ||
|
|
302bf72e72 | ||
|
|
2c42baf3a4 | ||
|
|
03feb89c84 | ||
|
|
9dd553192f | ||
|
|
fa3f02e9d1 | ||
|
|
0a9dde58c5 | ||
|
|
70cb4453be | ||
|
|
830674cc6f | ||
|
|
fb406b58a1 | ||
|
|
55b272e412 | ||
|
|
94f62a9bf3 | ||
|
|
8d19e4cb7b | ||
|
|
7e510d48e0 | ||
|
|
7b20cffb14 | ||
|
|
5c934c43c1 | ||
|
|
8609298449 | ||
|
|
72cb0dc10b | ||
|
|
7b22fa81de | ||
|
|
0b6a130779 | ||
|
|
fdcf4338e0 | ||
|
|
ee43037f48 | ||
|
|
26e365563c | ||
|
|
1b39586bb1 | ||
|
|
8bb3a6bea3 | ||
|
|
e6900e2000 | ||
|
|
0ee244756b | ||
|
|
6d5ac9abe6 | ||
|
|
44f6d9e132 | ||
|
|
360154559c | ||
|
|
78672bd7ad | ||
|
|
65d96e26b5 | ||
|
|
241d53af9a | ||
|
|
5563829df2 | ||
|
|
3a4a27e1f9 | ||
|
|
9c887a36a8 | ||
|
|
bc7973af36 | ||
|
|
32972d8fdb | ||
|
|
b128d9109c | ||
|
|
929d7273a4 | ||
|
|
2a40f84274 | ||
|
|
9ff6fa818f | ||
|
|
dac73a4bfe | ||
|
|
d7895547f7 | ||
|
|
b7d439cb87 | ||
|
|
7cc903a5f5 | ||
|
|
c495a8291b | ||
|
|
5e1d7d777c | ||
|
|
7edad3f676 | ||
|
|
f7331001d4 | ||
|
|
f8e09ae2ff | ||
|
|
433c7cc0f0 | ||
|
|
d753e71a74 | ||
|
|
2e4f5a508b | ||
|
|
88b960eff6 | ||
|
|
88c77bd89e | ||
|
|
51a7a4251f | ||
|
|
51d2f316f3 | ||
|
|
ff78a46c48 | ||
|
|
ed4a9dc1d4 | ||
|
|
63182dba26 | ||
|
|
9c1eaa9389 | ||
|
|
bc520fcbcd | ||
|
|
46faac1a12 | ||
|
|
3c424c0cb3 | ||
|
|
3ac8d0362b | ||
|
|
d88b998e6c | ||
|
|
a9ed55c006 | ||
|
|
ea61434123 | ||
|
|
a73d0d26cb | ||
|
|
b4506976e3 | ||
|
|
34cb75a096 | ||
|
|
34df643f60 | ||
|
|
ac7c13fcc0 | ||
|
|
4fdb34c7d5 | ||
|
|
7ac468e35a | ||
|
|
df190aa299 | ||
|
|
9621475e86 | ||
|
|
82e0160de8 | ||
|
|
d03fb8b626 | ||
|
|
b300dfb3d7 | ||
|
|
a7de9111d9 | ||
|
|
7933dfdbe7 | ||
|
|
f7cb5f7d01 | ||
|
|
a26a298f1a | ||
|
|
dbd134d0da | ||
|
|
11aa01b0d9 | ||
|
|
6f18e53443 | ||
|
|
7b467c4665 | ||
|
|
537b8f2630 | ||
|
|
4d823575e7 | ||
|
|
541aa1d09f | ||
|
|
8f02021014 | ||
|
|
158a15157c | ||
|
|
2752e0d66a | ||
|
|
6c11e912af | ||
|
|
43d34461e2 | ||
|
|
4dfdc9b0f6 | ||
|
|
e2311cbb03 | ||
|
|
bf15575e90 | ||
|
|
406336c718 | ||
|
|
6665ffaeb8 | ||
|
|
dcf552ca0c | ||
|
|
7a6ebf3c95 | ||
|
|
d2dc4a983c | ||
|
|
1168259bc2 | ||
|
|
e8e4b46021 | ||
|
|
12d2de2282 | ||
|
|
0e2fe401e1 | ||
|
|
14247adb0a | ||
|
|
3a9f0934c4 | ||
|
|
caf0a5c871 | ||
|
|
cfb58b1cf3 | ||
|
|
975cf195cc | ||
|
|
8a46a259a3 | ||
|
|
e395142e59 | ||
|
|
caaeaf0d67 | ||
|
|
21e69a7cbf | ||
|
|
603964935b | ||
|
|
47eb83ae55 | ||
|
|
fc0ce6c959 | ||
|
|
077a29fb4e | ||
|
|
8568d0d328 | ||
|
|
597d39c28e | ||
|
|
eb888dcbbc | ||
|
|
d1b9ac0841 | ||
|
|
89a6d9c5c3 | ||
|
|
85d9837616 | ||
|
|
cd7731484d | ||
|
|
086da16b17 | ||
|
|
20830528f0 | ||
|
|
83371edd8f | ||
|
|
364a81decc | ||
|
|
ef09592ad3 | ||
|
|
4a86e109cc | ||
|
|
7fa5391b66 | ||
|
|
9b53ba5714 | ||
|
|
b59e38cfd2 | ||
|
|
5ba22dae59 | ||
|
|
4232e523ac | ||
|
|
bee80b35d2 | ||
|
|
c32395f695 | ||
|
|
735c5e1078 | ||
|
|
d09c94b292 | ||
|
|
4d04866f48 | ||
|
|
a2d90f4dfc | ||
|
|
93a5002c8b | ||
|
|
23bf5227a4 | ||
|
|
77c96fa2a9 | ||
|
|
3f5a1f015e | ||
|
|
b280c4fc18 | ||
|
|
3ab9b43a2e | ||
|
|
46f568414a | ||
|
|
cba2fd299f | ||
|
|
1e6e44f656 | ||
|
|
acac039994 | ||
|
|
50a3b34016 | ||
|
|
b45396070c | ||
|
|
218b9aec8a | ||
|
|
2b887debc6 | ||
|
|
0313e3f8ca | ||
|
|
1669e6e20c | ||
|
|
ef6de75dda | ||
|
|
a6bcec425a | ||
|
|
596ad9a64d | ||
|
|
7a91c93319 | ||
|
|
b5f7b35f89 | ||
|
|
2f47fb7f14 | ||
|
|
1b214c4036 | ||
|
|
8f94f8acc6 | ||
|
|
3a2a69cfa5 | ||
|
|
f599c65988 | ||
|
|
ad12849fd9 | ||
|
|
f36b3789e8 | ||
|
|
6d18c0ba61 | ||
|
|
17097abec9 | ||
|
|
b7ddd3b285 | ||
|
|
75b23f62c9 | ||
|
|
f88967b2a5 | ||
|
|
ba2846664b | ||
|
|
10dba37ca2 | ||
|
|
0e6f938514 | ||
|
|
159d87c112 | ||
|
|
9e7b1621cf | ||
|
|
2057817ef8 | ||
|
|
a1eabad2d3 | ||
|
|
92bf2b1ca2 | ||
|
|
2b2123a4ba | ||
|
|
908b2f9200 | ||
|
|
deff0c7bfd | ||
|
|
7cd01efa64 | ||
|
|
2dbe56456b | ||
|
|
6078a411ef | ||
|
|
4a3656562f | ||
|
|
ba75989a24 | ||
|
|
9e9e2c3628 | ||
|
|
9a2a8c6b61 | ||
|
|
dae42ef161 | ||
|
|
931f2cab78 | ||
|
|
72b061bed4 | ||
|
|
29a7c73990 | ||
|
|
2d1d68e300 | ||
|
|
c5c1e170d1 | ||
|
|
9c1bb66452 | ||
|
|
a4f3306bae | ||
|
|
1bc638b6ee | ||
|
|
9ad0cd9dae | ||
|
|
6d4a469127 | ||
|
|
ed6997e3ff | ||
|
|
eb788fca6e | ||
|
|
9186f5f377 | ||
|
|
30cff5f281 | ||
|
|
b724e0969a | ||
|
|
a62c49e871 | ||
|
|
9b160f6279 | ||
|
|
338a4e2612 | ||
|
|
0140688750 | ||
|
|
73e5ea98c1 | ||
|
|
77dcbc544d | ||
|
|
c7bcb0947a | ||
|
|
5cd3f7f71d | ||
|
|
5044388ab2 | ||
|
|
ee075db598 | ||
|
|
9904e0be61 | ||
|
|
31b69b3242 | ||
|
|
e6a80fea32 | ||
|
|
d6aec00e03 | ||
|
|
4aa7d81e11 | ||
|
|
48cdabc3b0 | ||
|
|
a1791ef547 | ||
|
|
7bc87f6c2d | ||
|
|
bbed9e274b | ||
|
|
486282b985 | ||
|
|
a4d45b653f | ||
|
|
22e151b01c | ||
|
|
7a4ebcd1ec | ||
|
|
651cbfe02f | ||
|
|
8c3e764516 | ||
|
|
b4e75da7e3 | ||
|
|
37223f086c | ||
|
|
a404033735 | ||
|
|
b7433ed085 | ||
|
|
224d3d65ad | ||
|
|
a349fb0bda | ||
|
|
e7ddcfb83f | ||
|
|
abd20dfe36 | ||
|
|
dc1fd3ef1b | ||
|
|
98a7686db4 | ||
|
|
9c6c6c4330 | ||
|
|
f9be5651da | ||
|
|
df9835a3e6 | ||
|
|
92363be2dd | ||
|
|
31b6203015 | ||
|
|
18805858d6 | ||
|
|
e676f0e20f | ||
|
|
20652edefa | ||
|
|
98c29d0747 | ||
|
|
41a6311f6b | ||
|
|
978760ec57 | ||
|
|
d410425537 | ||
|
|
6b7430329c | ||
|
|
40fe0d4a60 | ||
|
|
365c5354a0 | ||
|
|
b246a05cbb | ||
|
|
9e5a7a4abb | ||
|
|
f266acbcca | ||
|
|
4e3b471f18 | ||
|
|
5e28736c2e | ||
|
|
a91913a3b5 | ||
|
|
90c64f0ae0 | ||
|
|
7cc642ed1a | ||
|
|
809f64d35a | ||
|
|
a6f859a55e | ||
|
|
39ef88078f | ||
|
|
aeea5e8d2e | ||
|
|
1a0700bff4 | ||
|
|
b5fa6d068f | ||
|
|
1baec0b420 | ||
|
|
4f2a4e1dee | ||
|
|
758d617668 | ||
|
|
55322c37f5 | ||
|
|
d19ea5552b | ||
|
|
130c3527c1 | ||
|
|
3f221f4714 | ||
|
|
d64c4cb390 | ||
|
|
448c56aa46 | ||
|
|
9fbea15b6d | ||
|
|
932060314b | ||
|
|
5e68ae5009 | ||
|
|
d03541beae | ||
|
|
516fa571d9 | ||
|
|
a19c12096a | ||
|
|
758f27945d | ||
|
|
8b1e8d58df | ||
|
|
b967489d08 | ||
|
|
870d0218be | ||
|
|
84020bc2af | ||
|
|
4efe5344e0 | ||
|
|
9182c54513 | ||
|
|
28f0ab0b02 | ||
|
|
90d1a30696 | ||
|
|
130b3738cc | ||
|
|
92c7357615 | ||
|
|
c80f863334 | ||
|
|
4642c20179 | ||
|
|
5288eb22aa | ||
|
|
df8387a1a9 | ||
|
|
cc38c27f44 | ||
|
|
64f5357d69 | ||
|
|
51debb5649 | ||
|
|
b48d05a431 | ||
|
|
4e7f6b337d | ||
|
|
a509d99caf | ||
|
|
481e45fb64 | ||
|
|
e9038e1720 | ||
|
|
8fd9e582bf | ||
|
|
c1fd6f48a5 | ||
|
|
af615c7f4b | ||
|
|
bf0bc32d7a | ||
|
|
2d6b53e012 | ||
|
|
51271fea0f | ||
|
|
2deb473e0b | ||
|
|
23eeb33b3d | ||
|
|
f50dfaef45 | ||
|
|
55bb71e9d4 | ||
|
|
dab9357d28 | ||
|
|
27eb427245 | ||
|
|
260f3685d9 | ||
|
|
76e78fc0c3 | ||
|
|
1ac944fa02 | ||
|
|
986bc9b042 | ||
|
|
5a7942069b | ||
|
|
f6c6fc13ac | ||
|
|
1d8cfae89f | ||
|
|
787df51239 | ||
|
|
5e7f302a9c | ||
|
|
3d10fd40b5 | ||
|
|
57e3bf239c | ||
|
|
ccb09861e8 | ||
|
|
94551d75dd | ||
|
|
6e21218425 | ||
|
|
ff0fda48fc | ||
|
|
528aac7ad8 | ||
|
|
ab482e521d | ||
|
|
e08b61fa81 | ||
|
|
ce61bd1d2b | ||
|
|
7b708f7518 | ||
|
|
89ca50c7fc | ||
|
|
fb54899dcc | ||
|
|
0a625ad7dd | ||
|
|
d32e45efbe | ||
|
|
c77696bc78 | ||
|
|
736fde9e78 | ||
|
|
9c1ad92fed | ||
|
|
1a9fd2139d | ||
|
|
7661e7f27a | ||
|
|
f857b7fbf7 | ||
|
|
d94d12dbc5 | ||
|
|
700916276a | ||
|
|
834e52369c | ||
|
|
1ce53365de | ||
|
|
473f70668f | ||
|
|
0dbd2702f6 | ||
|
|
01e3764a9b | ||
|
|
ff9c81722a | ||
|
|
166aef7a02 | ||
|
|
78caf7646b | ||
|
|
1f99d40cec | ||
|
|
4c2912d3d5 | ||
|
|
45e6e06be5 | ||
|
|
fdbe3e05f3 | ||
|
|
7cc168f640 | ||
|
|
ff2d609c9b | ||
|
|
2689697b4c | ||
|
|
f90a0ea8ab | ||
|
|
caabe60f84 | ||
|
|
2bef4ed603 | ||
|
|
ee57be533b | ||
|
|
c5b7aaca25 | ||
|
|
7a1be905bb | ||
|
|
5798495a11 | ||
|
|
46171e2202 | ||
|
|
dd5c924ff5 | ||
|
|
30c4ab2976 | ||
|
|
26ea4d47b3 | ||
|
|
2732cd175c | ||
|
|
3e54b597be | ||
|
|
f10ebea209 | ||
|
|
2c6f3993cb | ||
|
|
708a696920 | ||
|
|
20bbb5d331 | ||
|
|
223e785b54 | ||
|
|
3d78692c59 | ||
|
|
5321a15dcf | ||
|
|
a452f8252a | ||
|
|
49267f09ac | ||
|
|
db47f35783 | ||
|
|
d48abf312c | ||
|
|
3b22ce4110 | ||
|
|
c521ca5bc9 | ||
|
|
3ddc1c6659 | ||
|
|
a8e19402b7 | ||
|
|
0927902b30 | ||
|
|
572548b42f | ||
|
|
ff7ab0a1ed | ||
|
|
5db71b05cb | ||
|
|
f9b952885a | ||
|
|
e7983bc0b2 | ||
|
|
473a643142 | ||
|
|
14f3d442cb | ||
|
|
d6f4ed9ab5 | ||
|
|
1b8d654444 | ||
|
|
6002af0dca | ||
|
|
0924d822a3 | ||
|
|
72a37b9289 | ||
|
|
5eef7bd769 | ||
|
|
c6893e1bd5 | ||
|
|
039f6612e4 | ||
|
|
95aec9c6f9 | ||
|
|
4e9652a8ec | ||
|
|
773b7f4b1f | ||
|
|
d17ffde9cd | ||
|
|
9c57c09c00 | ||
|
|
4d730a9de5 | ||
|
|
fc57bcfce2 | ||
|
|
fa5571486c | ||
|
|
9996c4fe23 | ||
|
|
038d429024 | ||
|
|
9bf6facb0d | ||
|
|
965717886e | ||
|
|
e9bfc3dd29 | ||
|
|
f46b33eacf | ||
|
|
f475fe44df | ||
|
|
5fdbe2962d | ||
|
|
ab291b9eef | ||
|
|
fd411fd772 | ||
|
|
b1e95a60a2 | ||
|
|
bb1439f0d5 | ||
|
|
ba963d98a0 | ||
|
|
83440ccb55 | ||
|
|
796f61bfa4 | ||
|
|
070cac4ae1 | ||
|
|
3ed84f9f42 | ||
|
|
a205afb6f3 | ||
|
|
a6d983dd8f | ||
|
|
b6c8d6d01d | ||
|
|
b5a5d5b133 | ||
|
|
da528e7814 | ||
|
|
4acebf4f62 | ||
|
|
4d40808d2b | ||
|
|
c543f00bd3 | ||
|
|
947cf41dfa | ||
|
|
8d8c58742e | ||
|
|
995ecc9bfb | ||
|
|
21a15225eb | ||
|
|
48921d4584 | ||
|
|
342db45edc | ||
|
|
5f88ecf844 | ||
|
|
a56aebfe70 | ||
|
|
422bb744a8 | ||
|
|
c3b814a15f | ||
|
|
e4574047a0 | ||
|
|
0d7d7951f8 | ||
|
|
da904e4770 | ||
|
|
19b540041a | ||
|
|
f2ffb93eea | ||
|
|
c0c0e05642 | ||
|
|
966978f17e | ||
|
|
8ab08a5231 | ||
|
|
48e534fa03 | ||
|
|
61851c1bd0 | ||
|
|
3c51b2d83d | ||
|
|
ee3a28528e | ||
|
|
916bcdae38 | ||
|
|
efb1d3e6b2 | ||
|
|
4e6ae66bac | ||
|
|
5ee88e7b67 | ||
|
|
c3b68903cb | ||
|
|
fe1f1013a7 | ||
|
|
fb14f5439f | ||
|
|
5ca0fc364e | ||
|
|
a1fe7037e5 | ||
|
|
c2af7d113e | ||
|
|
ff034e401d | ||
|
|
5abe095beb | ||
|
|
33de5f01e6 | ||
|
|
8ce155d843 | ||
|
|
b921d5ec95 | ||
|
|
e21542aaa2 | ||
|
|
6150aae0ae | ||
|
|
f27b35f371 | ||
|
|
d24f9a885d | ||
|
|
48dd82c8d1 | ||
|
|
e57167ad1f | ||
|
|
ada9137642 | ||
|
|
bd428a9fd7 | ||
|
|
934941332f | ||
|
|
0c209dbd10 | ||
|
|
56e041aa26 | ||
|
|
cf9d48582e | ||
|
|
92e2252bee | ||
|
|
fd7861db11 | ||
|
|
35464bbbfb | ||
|
|
db8ddd7f0e | ||
|
|
72207c54ee | ||
|
|
a683f68003 | ||
|
|
8d2d3db3fa | ||
|
|
eca785450d | ||
|
|
5b40a97ce4 | ||
|
|
66cb4e9bde | ||
|
|
d1f33645ca | ||
|
|
5eff65c326 | ||
|
|
929c38715d | ||
|
|
8c91a7b760 | ||
|
|
14289ecd6c | ||
|
|
b833c44783 | ||
|
|
e23aa818ea | ||
|
|
473d919c13 | ||
|
|
9f925d6ac9 | ||
|
|
f6ca32b3a3 | ||
|
|
4cbe84c3d6 | ||
|
|
ffac5bf9d3 | ||
|
|
9aa424f9f8 | ||
|
|
0a8495c68e | ||
|
|
6aea066cf0 | ||
|
|
ff3c2d809e | ||
|
|
145059fc89 | ||
|
|
20e5c19de4 | ||
|
|
4c98fd4b87 | ||
|
|
125e54213e | ||
|
|
0152e0665f | ||
|
|
0679bcbc56 | ||
|
|
5500648aa0 | ||
|
|
bb50caad4d | ||
|
|
7eef5d94d5 | ||
|
|
74f623f8d6 | ||
|
|
f638aca092 | ||
|
|
da35eaf80a | ||
|
|
ade0e8e8fc | ||
|
|
90076090f0 | ||
|
|
23635def8b | ||
|
|
4eeec087bd | ||
|
|
7331961038 | ||
|
|
e4acb3d5b7 | ||
|
|
c60549a994 | ||
|
|
d46fc8bbfa | ||
|
|
b133d1f90d | ||
|
|
5be615a97e | ||
|
|
ea1d820f96 | ||
|
|
47e262cf72 | ||
|
|
eec673be90 | ||
|
|
9a0fb2a7c8 | ||
|
|
b5145d6c14 | ||
|
|
9747ca414d | ||
|
|
312d465b61 | ||
|
|
7dcf87d24a | ||
|
|
cf3cfd16a9 | ||
|
|
fcc7e52949 | ||
|
|
3ab9d48014 | ||
|
|
7eddf41c5f | ||
|
|
27a196c938 | ||
|
|
e4324f05fb | ||
|
|
d36b332bd7 | ||
|
|
1f034826f6 | ||
|
|
246c707c98 | ||
|
|
b5d8968144 | ||
|
|
f7b9fbefdd | ||
|
|
b1fc453383 | ||
|
|
7581c8d0f4 | ||
|
|
32bf8ad6f4 | ||
|
|
b083bcc10f | ||
|
|
4f6fdd120d | ||
|
|
eb0038be24 | ||
|
|
7ecdf819fa | ||
|
|
c6aa4d0835 | ||
|
|
7c584b89a6 | ||
|
|
c166c0bfda | ||
|
|
a8dd3f7802 | ||
|
|
3b0e2f03f3 | ||
|
|
8390ae48c8 | ||
|
|
2db82c0a7e | ||
|
|
6147954075 | ||
|
|
691df271fc | ||
|
|
89f52b95f7 | ||
|
|
146acc1bf6 | ||
|
|
c4a345f59a | ||
|
|
dfd2703f75 | ||
|
|
325fab2de7 | ||
|
|
f3d00cf38a | ||
|
|
14838f7f5d | ||
|
|
af74047b81 | ||
|
|
660c59129c | ||
|
|
89a88e186e | ||
|
|
f861cf95b9 | ||
|
|
ee8f06cbdb | ||
|
|
a2e8b3c7b6 | ||
|
|
6c83846075 | ||
|
|
e0681eebb9 | ||
|
|
e5732d1cea | ||
|
|
6e7ae3cd3f | ||
|
|
f95632d1aa | ||
|
|
2f8b7b26e5 | ||
|
|
10292f7502 | ||
|
|
aef54705f5 | ||
|
|
bba5980fa5 | ||
|
|
977425abfb | ||
|
|
37a3565a1b | ||
|
|
13deb8bfb6 | ||
|
|
a3ed9d075a | ||
|
|
fb0ced549e | ||
|
|
7eb31bc7d2 | ||
|
|
6a06a39142 | ||
|
|
bdcdaee6c5 | ||
|
|
605353fdce | ||
|
|
490c9e1769 | ||
|
|
6ebebb659d | ||
|
|
0e70c5ee12 | ||
|
|
cd531acf60 | ||
|
|
908ac1f61c | ||
|
|
f5c7e7e404 | ||
|
|
001c700b5b | ||
|
|
9b41e9bef0 | ||
|
|
34bd6e32dc | ||
|
|
c5d058490b | ||
|
|
dd1ae6d9a7 | ||
|
|
d8ea9bde82 | ||
|
|
125edc9c90 | ||
|
|
15ea43e394 | ||
|
|
b55b02687c | ||
|
|
da611f0ac6 | ||
|
|
b8b8dfead4 | ||
|
|
4290a3cbd1 | ||
|
|
a5e2203cee | ||
|
|
e28c08b136 | ||
|
|
a4b6846f63 | ||
|
|
2bc8307861 | ||
|
|
9b39917c79 | ||
|
|
57c13cc0a3 | ||
|
|
b7355fd30d | ||
|
|
93ae309e40 | ||
|
|
5d8f8365e2 | ||
|
|
f26909eefb | ||
|
|
55bfbb2797 | ||
|
|
8970b8342a | ||
|
|
5285e699c3 | ||
|
|
275f3860d5 | ||
|
|
a73fdb7478 | ||
|
|
f2d746403a | ||
|
|
b7dbf2c49b | ||
|
|
21f3c97788 | ||
|
|
14b727cc71 | ||
|
|
abee226591 | ||
|
|
293ad39f4b | ||
|
|
9244302581 | ||
|
|
753cac25fb | ||
|
|
0548263e89 | ||
|
|
53776a9bf8 | ||
|
|
cc7def9b76 | ||
|
|
11a4422c25 | ||
|
|
3a44785260 | ||
|
|
e0d430c26c | ||
|
|
417b70020a | ||
|
|
7b29c464b7 | ||
|
|
26d5529d86 | ||
|
|
852103c478 | ||
|
|
26a115421b | ||
|
|
755b941a9a | ||
|
|
fd1ca82d86 | ||
|
|
6fe175344f | ||
|
|
3590cda13a | ||
|
|
2f1011dd85 | ||
|
|
2b155261b3 | ||
|
|
02f4d606d0 | ||
|
|
577811f00b | ||
|
|
b4098d67a3 | ||
|
|
88bd7554ae | ||
|
|
b5ec16c5ca | ||
|
|
68fcb60a14 | ||
|
|
e4781d60ce | ||
|
|
6201fb346a | ||
|
|
f88c8343f9 | ||
|
|
25410d3316 | ||
|
|
4ff9952938 | ||
|
|
5e3f63a412 | ||
|
|
e1f57be69e | ||
|
|
2c65d5eecc | ||
|
|
aa621f2f1e | ||
|
|
ac932c6e59 | ||
|
|
029f79da16 | ||
|
|
153b2b4a7a | ||
|
|
709b2fe4ee | ||
|
|
09c1fccc58 | ||
|
|
fd254d99b7 | ||
|
|
88bd2c1722 | ||
|
|
d03e2f0fc1 | ||
|
|
3f12a393bd | ||
|
|
8c21284c50 | ||
|
|
e7d396c215 | ||
|
|
f238fac0eb | ||
|
|
017228f80d | ||
|
|
286c5fa943 | ||
|
|
74cfc13abe | ||
|
|
0ee4a6c377 | ||
|
|
283433578d | ||
|
|
9559c85057 | ||
|
|
c5c020f565 | ||
|
|
95ec79bceb | ||
|
|
8f8be8aa33 | ||
|
|
5b60c7445a | ||
|
|
d9dbcc8b52 | ||
|
|
79bc525970 | ||
|
|
9dae1091dd | ||
|
|
74d3ac686a | ||
|
|
cf3cc636ba | ||
|
|
a720441e1d | ||
|
|
0a7ed0959d | ||
|
|
eb83c9b86d | ||
|
|
5c0142dd19 | ||
|
|
c326c8dc83 | ||
|
|
fc4082a03f | ||
|
|
c8655565ff | ||
|
|
638f879f16 | ||
|
|
1d221bf7e6 | ||
|
|
60ea71f0ef | ||
|
|
d8bdd35a3f | ||
|
|
7463891c53 | ||
|
|
7537aec76f | ||
|
|
62234e39a8 | ||
|
|
be004b7b3f | ||
|
|
82539444b2 | ||
|
|
a571d3cbaf | ||
|
|
a038c14c23 | ||
|
|
25a85d874c | ||
|
|
884c36ff42 | ||
|
|
b98e72b8b4 | ||
|
|
05885c0096 | ||
|
|
4c9761231a | ||
|
|
656eaa1508 | ||
|
|
1560dcddcf | ||
|
|
08d4cd4870 | ||
|
|
9767a50ced | ||
|
|
cd86890ed1 | ||
|
|
ba0dd3b9ca | ||
|
|
8d7fa07ffd | ||
|
|
cade1bfe6e | ||
|
|
daec4ab0a7 | ||
|
|
3c96bc3196 | ||
|
|
7f7d8d4bd6 | ||
|
|
47263661a4 | ||
|
|
4c42a086d2 | ||
|
|
5d2541a5c4 | ||
|
|
d91d170b49 | ||
|
|
6d1f4584a9 | ||
|
|
1d76d96bcf | ||
|
|
e8847c998c | ||
|
|
da88e49bae | ||
|
|
65c3a12e54 | ||
|
|
d8d600cc36 | ||
|
|
507999b117 | ||
|
|
8ad164eb34 | ||
|
|
a507df140b | ||
|
|
8912a99986 | ||
|
|
1953f98828 | ||
|
|
7515218ddd | ||
|
|
36c1120136 | ||
|
|
8fa0fe64d8 | ||
|
|
c1a8201b14 | ||
|
|
398bbac48c | ||
|
|
ea71a42bbd | ||
|
|
1c16d25b17 | ||
|
|
9d12ded889 | ||
|
|
5312701515 | ||
|
|
808c7bc0a9 | ||
|
|
4d394015f4 | ||
|
|
3638298af8 | ||
|
|
5f00973e40 | ||
|
|
0f6e2c14fc | ||
|
|
51813da619 | ||
|
|
e7751322ea | ||
|
|
26ef298437 | ||
|
|
badaf8ce73 | ||
|
|
b123a62203 | ||
|
|
cfd77e4252 | ||
|
|
38f814072e | ||
|
|
a0db7754e3 | ||
|
|
f07620afc7 | ||
|
|
c1b0d27752 | ||
|
|
430a5108aa | ||
|
|
111ce92fc9 | ||
|
|
c851e8a58d | ||
|
|
39f4bcd9b4 | ||
|
|
4a610c4c81 | ||
|
|
89ee11945d | ||
|
|
dadb09b74a | ||
|
|
1b1f638b97 | ||
|
|
794fc4ed44 | ||
|
|
72f735bf92 | ||
|
|
912877f25a | ||
|
|
2772c5ae43 | ||
|
|
a7ad24d2cb | ||
|
|
a364a6a9fa | ||
|
|
7b2dc86a8d | ||
|
|
ad645636d0 | ||
|
|
2f2f297b29 | ||
|
|
099ae3fde0 | ||
|
|
e9febe98ac | ||
|
|
5fbd07cccf | ||
|
|
5fed4698c2 | ||
|
|
ed7eb0983a | ||
|
|
90c7e18e5f | ||
|
|
953ab5c3bd | ||
|
|
699c97d8a0 | ||
|
|
e4ca0de92a | ||
|
|
04745a36b8 | ||
|
|
5936940532 | ||
|
|
b3eb064b67 | ||
|
|
e4b41057e3 | ||
|
|
1d41c46cc7 | ||
|
|
a5c444587b | ||
|
|
a56f471be9 | ||
|
|
6a6b26ed8d | ||
|
|
f62446c152 | ||
|
|
56011f1f17 | ||
|
|
6d44091c80 | ||
|
|
440c458eb4 | ||
|
|
798250af61 | ||
|
|
c762de29c6 | ||
|
|
0701e65e97 | ||
|
|
209d54e8b5 | ||
|
|
2b38462de7 | ||
|
|
1e8e553316 | ||
|
|
ab42e6bb15 | ||
|
|
6802884540 | ||
|
|
7cb8577b96 | ||
|
|
55810ccd1f | ||
|
|
f9921720cd | ||
|
|
cda1ebd271 | ||
|
|
6901e4a23a | ||
|
|
6bc21d3c73 | ||
|
|
1ef231e26a | ||
|
|
3cd43f0f98 | ||
|
|
1565019966 | ||
|
|
0a4de2d3a1 | ||
|
|
a058f6c174 | ||
|
|
d8e5d03b01 | ||
|
|
9dc62eff2e | ||
|
|
d4fea17c57 | ||
|
|
3dd7a5b77e | ||
|
|
d77c90a3ba | ||
|
|
01f0c20df0 | ||
|
|
aafbe576b3 | ||
|
|
bd68ad4034 | ||
|
|
bfee017c13 | ||
|
|
61f532cfd0 | ||
|
|
58dbbb75b6 | ||
|
|
8d88b91fcf | ||
|
|
ad39fc6029 | ||
|
|
89f1fd96e6 | ||
|
|
bd425f2493 | ||
|
|
46962ff02a | ||
|
|
e4cb88b051 | ||
|
|
32840703dc | ||
|
|
1f7aafd041 | ||
|
|
7378d5dce4 | ||
|
|
84f76866cd | ||
|
|
322da9ea6a | ||
|
|
58645301ec | ||
|
|
1e18dd30a8 | ||
|
|
cc6a19adcc | ||
|
|
2a5588b177 | ||
|
|
20f9b7f88b | ||
|
|
d7e32313cd | ||
|
|
fb5654d3c4 | ||
|
|
258f1433b3 | ||
|
|
fb723ae8bd | ||
|
|
283b89e37c | ||
|
|
f450f9eb8b | ||
|
|
b3f8cf99a4 | ||
|
|
4301ea8cae | ||
|
|
c672d1c174 | ||
|
|
229e953a38 | ||
|
|
87b506dc9b | ||
|
|
15c9002d9e | ||
|
|
042aaa61b9 | ||
|
|
ef856c6ba5 | ||
|
|
9cf5be73e3 | ||
|
|
63fc149e2a | ||
|
|
3c25839350 | ||
|
|
58246e33b7 | ||
|
|
8b1407c706 | ||
|
|
2fde4a4e22 | ||
|
|
60b9e97982 | ||
|
|
0adac79c0f | ||
|
|
9f485b5981 | ||
|
|
db17d21b8f | ||
|
|
996d394e89 | ||
|
|
5885b960f9 | ||
|
|
79987b35f3 | ||
|
|
661b3ef311 | ||
|
|
fb422726a8 | ||
|
|
4fb6f3ea59 | ||
|
|
f78fe771e1 | ||
|
|
567b887253 | ||
|
|
e516e6b946 | ||
|
|
62748676aa | ||
|
|
7351c72e45 | ||
|
|
2b7405c5e2 | ||
|
|
e2c77cb935 | ||
|
|
7ac621e4c9 | ||
|
|
d8b5d6c66c | ||
|
|
22b461eb4b | ||
|
|
b37ee8555a | ||
|
|
1d0ad2f045 | ||
|
|
ceccfb2c81 | ||
|
|
03c02953cd | ||
|
|
f254a0eaa1 | ||
|
|
9e3b88727c | ||
|
|
b12217466e | ||
|
|
8b9c932f9b | ||
|
|
5986ce03db | ||
|
|
a7b0e936e4 | ||
|
|
cb02211424 | ||
|
|
bd443bf392 | ||
|
|
1f547edd36 | ||
|
|
e4bac3a493 | ||
|
|
5e6bfa681a | ||
|
|
276160125e | ||
|
|
d4ae5543f2 | ||
|
|
55f360e267 | ||
|
|
fdedab2a0c | ||
|
|
a9be42e303 | ||
|
|
6da9510e46 | ||
|
|
0431798178 | ||
|
|
62432f3c48 | ||
|
|
9fbbc30906 | ||
|
|
d1567d1f62 | ||
|
|
6ca1f5970b | ||
|
|
1c880b9e24 | ||
|
|
3b7d54c720 | ||
|
|
44a7406057 | ||
|
|
8157dcfdb1 | ||
|
|
28762aea15 | ||
|
|
439871ea9f | ||
|
|
c9180b005c | ||
|
|
b14e0725f8 | ||
|
|
70fe3dcb4d | ||
|
|
8c554604a4 | ||
|
|
a0a35454bd | ||
|
|
e8467e2af5 | ||
|
|
7515deb566 | ||
|
|
ed9e52af24 | ||
|
|
592a380410 | ||
|
|
1a458d2d5b | ||
|
|
0e4cf53b92 | ||
|
|
e2f06ccb33 | ||
|
|
8abff004cd | ||
|
|
c4a0e2e3fe | ||
|
|
4f10f79c73 | ||
|
|
69e7a560fd | ||
|
|
59b1055808 | ||
|
|
6ed48c6289 | ||
|
|
f2fb4d3f41 | ||
|
|
6aeea59ea8 | ||
|
|
d016f3bbb3 | ||
|
|
7131c29718 | ||
|
|
7432442983 | ||
|
|
5344883394 | ||
|
|
3fcd2f6c2e | ||
|
|
f3d84bd5bf | ||
|
|
549780c232 | ||
|
|
2a6da69b82 | ||
|
|
5c538816cf | ||
|
|
7b8b378a7d | ||
|
|
e30a75e25c | ||
|
|
85ad5cfd0b | ||
|
|
88b9d5068c | ||
|
|
f8c4948a09 | ||
|
|
412322447f | ||
|
|
d4f289e40f | ||
|
|
e1f3feb8f5 | ||
|
|
37d3bc699c | ||
|
|
672fd18016 | ||
|
|
bc2c23a2a0 | ||
|
|
865f7e7812 | ||
|
|
720212b552 | ||
|
|
d3be61f608 | ||
|
|
13418b16b8 | ||
|
|
42d2017cd6 | ||
|
|
4345e76ead | ||
|
|
741431322b | ||
|
|
980beaaf41 | ||
|
|
2205034e09 | ||
|
|
82b9c87a66 | ||
|
|
dda517a937 | ||
|
|
4e6d283b9e | ||
|
|
55acab05aa | ||
|
|
ed38a18d23 | ||
|
|
95b3c11203 | ||
|
|
dce318f4fd | ||
|
|
85127f0fb8 | ||
|
|
fb45058244 | ||
|
|
45bb5ae389 | ||
|
|
339238ab36 | ||
|
|
032cda8b3d | ||
|
|
6badd3fb1e | ||
|
|
724d825745 | ||
|
|
ff1e32ad2e | ||
|
|
a5f97febd3 | ||
|
|
5baa6cc865 | ||
|
|
7a4f30b843 | ||
|
|
b2c385dc4f | ||
|
|
5d5da8d33f | ||
|
|
e604571578 | ||
|
|
f9dacc3f95 | ||
|
|
6086920332 | ||
|
|
f52f3163bc | ||
|
|
d18ff73e88 | ||
|
|
1e5d602cae | ||
|
|
12912521ec | ||
|
|
842ea3a94b | ||
|
|
a8560dbc15 | ||
|
|
a65e27540a | ||
|
|
c3c5ed11e6 | ||
|
|
ce24149335 | ||
|
|
0314ca8c48 | ||
|
|
ebd8ee49a9 | ||
|
|
38d10c9781 | ||
|
|
360106c24d | ||
|
|
ca470a5d02 | ||
|
|
57f66e6b1d | ||
|
|
e774f67924 | ||
|
|
ac10e576c1 | ||
|
|
bcae0a99cd | ||
|
|
c73c2ff879 | ||
|
|
c39b1a3356 | ||
|
|
125dc2d9e0 | ||
|
|
b7d4ddc7ce | ||
|
|
f5e546c6fa | ||
|
|
928e39cd10 | ||
|
|
d0b7ea68a0 | ||
|
|
8444690133 | ||
|
|
c03c42d767 | ||
|
|
ab67688a00 | ||
|
|
5dcb7166da | ||
|
|
14697b86d7 | ||
|
|
4f4b6276d4 | ||
|
|
7bc497e129 | ||
|
|
68a37a6a5a | ||
|
|
6f5cd1d7c5 | ||
|
|
126b1b121c | ||
|
|
2341e456a0 | ||
|
|
72d80e95bb | ||
|
|
f5ec82440c | ||
|
|
c8e526ead3 | ||
|
|
066adfb764 | ||
|
|
5b444d4717 | ||
|
|
69c95adc8d | ||
|
|
2b0e0d8f5c | ||
|
|
778d1bacbf | ||
|
|
7e1b041016 | ||
|
|
313b9b329c | ||
|
|
6830062256 | ||
|
|
323072c982 | ||
|
|
8719d96bdd | ||
|
|
dd5d318ab5 | ||
|
|
d6dc7f5e65 | ||
|
|
c203664eb5 | ||
|
|
19ecf1fa19 | ||
|
|
b8deb0426c | ||
|
|
3b8371f020 | ||
|
|
20bb1cdf39 | ||
|
|
301daa48d0 | ||
|
|
8421ec8803 | ||
|
|
74211eb012 | ||
|
|
60bd42f298 | ||
|
|
14bdd74526 | ||
|
|
fb0f3eda04 | ||
|
|
91ee6e6701 | ||
|
|
51f4e6927c | ||
|
|
94988d8667 | ||
|
|
fe36f5a98c | ||
|
|
f9eb18b927 | ||
|
|
cc60f36748 | ||
|
|
604ade791f | ||
|
|
690ac52a91 | ||
|
|
34ed772775 | ||
|
|
d5ab95571f | ||
|
|
ffb3a0ee5f | ||
|
|
94b12b57aa | ||
|
|
6d149e8457 | ||
|
|
1ad89c90d8 | ||
|
|
fb71c7b020 | ||
|
|
28ed17ad3b | ||
|
|
0c2a4e2bf7 | ||
|
|
62bec30de2 | ||
|
|
3fced77e4e | ||
|
|
a09d1d8b76 | ||
|
|
8f4243fbd8 | ||
|
|
47aaf20549 | ||
|
|
0c5289ea50 | ||
|
|
3e53323514 | ||
|
|
a5ee9861b9 | ||
|
|
feb8ca7654 | ||
|
|
a7abe4473b | ||
|
|
780b9b61de | ||
|
|
19ace36ffa | ||
|
|
5fff8afc9f | ||
|
|
4ad230c927 | ||
|
|
dd98eb1ec8 | ||
|
|
c6baf42e72 | ||
|
|
e2bac97d56 | ||
|
|
d112ee94d0 | ||
|
|
27b21b2faf | ||
|
|
8c96d5cd20 | ||
|
|
c29ed3fd69 | ||
|
|
cedf603f12 | ||
|
|
279161c36f | ||
|
|
ce0b43d919 | ||
|
|
ddafa5bf06 | ||
|
|
bc7116c31b | ||
|
|
53b7092721 | ||
|
|
beb9174b1b | ||
|
|
aea41ed341 | ||
|
|
d789494cb1 | ||
|
|
608e7b4cff | ||
|
|
4ee199c02a | ||
|
|
fbf47d4085 | ||
|
|
5a238e4b42 | ||
|
|
f852b8246a | ||
|
|
88140d929a | ||
|
|
45f7268240 | ||
|
|
3a3c8e4d4a | ||
|
|
c1ac183a04 | ||
|
|
18bb779ee5 | ||
|
|
8b6612fe79 | ||
|
|
fde0bc8534 | ||
|
|
e661a78939 | ||
|
|
847e346602 | ||
|
|
b969751688 | ||
|
|
ad6f2ba03a | ||
|
|
63c6a5edc0 | ||
|
|
9f4cf9dd5e | ||
|
|
51331b6dc0 | ||
|
|
efb6761033 | ||
|
|
6a4f737a0f | ||
|
|
be6864b778 | ||
|
|
de3b91a36c | ||
|
|
ef5482c3b5 | ||
|
|
d20b795137 | ||
|
|
8a134065df | ||
|
|
22aee1bfa4 | ||
|
|
b282820fd6 | ||
|
|
3ee098306d | ||
|
|
09e8f379a6 | ||
|
|
69018cdb3a | ||
|
|
d0d7254c6a | ||
|
|
cc0f0971d7 | ||
|
|
2af61730f0 | ||
|
|
83f41b83dc | ||
|
|
1fb84fce88 | ||
|
|
a8837e1244 | ||
|
|
04d2eec558 | ||
|
|
1b57ec92f0 | ||
|
|
4d88595404 | ||
|
|
52b1272a3a | ||
|
|
d2ccad6a83 | ||
|
|
cad6dde4ac | ||
|
|
06811c3539 | ||
|
|
0cb23c2b21 | ||
|
|
ac4688dca2 | ||
|
|
326c3b4670 | ||
|
|
9b29d0c268 | ||
|
|
e0013c3871 | ||
|
|
a75744075b | ||
|
|
525aec1a02 | ||
|
|
0bf9a7a072 | ||
|
|
d8f2f4c95b | ||
|
|
35d733b44f | ||
|
|
9179b4175c | ||
|
|
bb07d78c78 | ||
|
|
07b179cd7f | ||
|
|
054422d837 | ||
|
|
3e052d1810 | ||
|
|
c8e72805cf | ||
|
|
12a80e7db0 | ||
|
|
ee7ff9a09d | ||
|
|
f6478fb636 | ||
|
|
811a0b0495 | ||
|
|
aeb48edf72 | ||
|
|
b1e94f0df7 | ||
|
|
60050e3c0f | ||
|
|
39ef09aa5b | ||
|
|
8377d43116 | ||
|
|
54e4c447ab | ||
|
|
937a9fa9cf | ||
|
|
808ff6cf0e | ||
|
|
7f5c649a95 | ||
|
|
b72727dec9 | ||
|
|
3fc88bfb33 | ||
|
|
9f2279d586 | ||
|
|
346a14cb9b | ||
|
|
dac00d17ff | ||
|
|
9ca7cd4060 | ||
|
|
aa31628970 | ||
|
|
bed694fcf5 | ||
|
|
4b4af69fa1 | ||
|
|
9d96190a5b | ||
|
|
fa44d48c09 | ||
|
|
4ef961c278 | ||
|
|
292a837d5c | ||
|
|
aa7b915d84 | ||
|
|
c46fe73236 | ||
|
|
039b2c129c | ||
|
|
8f2e5e4808 | ||
|
|
c4da8e4f78 | ||
|
|
bcab9078a4 | ||
|
|
b3c6c1ea92 | ||
|
|
a3af8662bd | ||
|
|
35940d0bc8 | ||
|
|
26994cdcb7 | ||
|
|
017159a829 | ||
|
|
b4e9c85e08 | ||
|
|
189146cd84 | ||
|
|
af34153ffa | ||
|
|
bf2ff3ffbb | ||
|
|
6423c9efd6 | ||
|
|
58ab0d4ece | ||
|
|
83a738bf4d | ||
|
|
3640671fc6 | ||
|
|
1da623b30e | ||
|
|
b10ca64646 | ||
|
|
2128763ee6 | ||
|
|
a27e7ed39c | ||
|
|
f07b7eaa47 | ||
|
|
6ce18de84c | ||
|
|
8631b756e7 | ||
|
|
7414d98412 | ||
|
|
d7b19892e8 | ||
|
|
96df396eaf | ||
|
|
2f6f640317 | ||
|
|
c4a0a50f3a | ||
|
|
658f8a3842 | ||
|
|
bfb876a1e3 | ||
|
|
90c34b1f4e | ||
|
|
3f9164ea77 | ||
|
|
7fd6fecbf5 | ||
|
|
8029f72363 | ||
|
|
c7fdce5d3b | ||
|
|
84f48aa369 | ||
|
|
2e9a0a9c12 | ||
|
|
c1f6f2b950 | ||
|
|
ede21bca13 | ||
|
|
8dd9a9f9cb | ||
|
|
04f92cd133 | ||
|
|
8be8d2393b | ||
|
|
0a879681be | ||
|
|
2ca1587a49 | ||
|
|
ec2cd2d708 | ||
|
|
5d0dbece93 | ||
|
|
df1e4b414b | ||
|
|
40760991e7 | ||
|
|
464f5f86cf | ||
|
|
7b09e9fccd | ||
|
|
6cba7d4298 | ||
|
|
9730f62e49 | ||
|
|
e0c1c87f54 | ||
|
|
931b3d2b83 | ||
|
|
e5d561baee | ||
|
|
2867593e7a | ||
|
|
dd52fee563 | ||
|
|
8e1f885827 | ||
|
|
2d39a58f90 | ||
|
|
9c4fa2ae26 | ||
|
|
de52d84e82 | ||
|
|
ce9b55059a | ||
|
|
bcd370a6a0 | ||
|
|
c8216850ab | ||
|
|
f5feedb90b | ||
|
|
a4371cd187 | ||
|
|
9d5ba4c834 | ||
|
|
1639dee1bb | ||
|
|
9363f430f2 | ||
|
|
9192a09073 | ||
|
|
b915eb9755 | ||
|
|
1cfcc2b592 | ||
|
|
7138dd02b7 | ||
|
|
b4276643b7 | ||
|
|
2ef00763bf | ||
|
|
54364928fc | ||
|
|
09b3b4932b | ||
|
|
29d6670119 | ||
|
|
2f654b5f1a | ||
|
|
e53b9f5992 | ||
|
|
addb234e61 | ||
|
|
76eca3b659 | ||
|
|
f90dec4c0e | ||
|
|
8900a59d4c | ||
|
|
6685138200 | ||
|
|
4d3e65b980 | ||
|
|
e9282bb546 | ||
|
|
f5627a4594 | ||
|
|
81ffdb2510 | ||
|
|
4c00a99850 | ||
|
|
2bfcb45b28 | ||
|
|
ab0c10e791 | ||
|
|
2c1935115d | ||
|
|
d98e43dc78 | ||
|
|
9348988d64 | ||
|
|
1285c66467 | ||
|
|
b7191bbc13 | ||
|
|
98b97509f7 | ||
|
|
2b2b570490 | ||
|
|
cce2d1ff29 | ||
|
|
b79600c572 | ||
|
|
140f1a8543 | ||
|
|
e34657cfde | ||
|
|
99070fa607 | ||
|
|
2b46785b1f | ||
|
|
c72562524b | ||
|
|
b7dd6441c7 | ||
|
|
31fcc2f755 | ||
|
|
b391aa14bc | ||
|
|
d3c45debbb | ||
|
|
5b08469b87 | ||
|
|
4a77ec63a4 | ||
|
|
d13606b6dc | ||
|
|
05291c93bb | ||
|
|
8cf00a208e | ||
|
|
06d73c8876 | ||
|
|
649c646ea2 | ||
|
|
b7756d9250 | ||
|
|
1cd2cd954c | ||
|
|
72020b8da9 | ||
|
|
cf9720b749 | ||
|
|
967b9db7f9 | ||
|
|
bb3acb1182 | ||
|
|
560c7f7e6d | ||
|
|
79b2841764 | ||
|
|
a06a89cbd1 | ||
|
|
431bd969eb | ||
|
|
c87b722aec | ||
|
|
3688b8b014 | ||
|
|
07b8d9e0c0 | ||
|
|
7454b53e39 | ||
|
|
3d6a76024d | ||
|
|
421b980957 | ||
|
|
4a22e27d6a | ||
|
|
99f7842dee | ||
|
|
7f869b4b18 | ||
|
|
9665f4ee84 | ||
|
|
606904d48b | ||
|
|
3f5279b97c | ||
|
|
f5ec21e6ac | ||
|
|
578a284465 | ||
|
|
422e392d9d | ||
|
|
54dfffd34a | ||
|
|
cffba64d2b | ||
|
|
56a0c12a59 | ||
|
|
c174d3de18 | ||
|
|
a9c59ef9fc | ||
|
|
abdb9b2673 | ||
|
|
548aaab626 | ||
|
|
20571c87ae | ||
|
|
19e49200de | ||
|
|
d32f5c67a9 | ||
|
|
b83b626435 | ||
|
|
ab2c1b25ec | ||
|
|
f2d46313a4 | ||
|
|
87e4796a6c | ||
|
|
0014a5c2f4 | ||
|
|
7af56e0dad | ||
|
|
a5ae6e3c01 | ||
|
|
fe1a0d1faf | ||
|
|
302f05cdda | ||
|
|
c0044be7b0 | ||
|
|
0110078807 | ||
|
|
42eacb45f8 | ||
|
|
a43e2e1991 | ||
|
|
c8b721d4f6 | ||
|
|
d0bfddc3d9 | ||
|
|
6b925a16c8 | ||
|
|
89ebd9fc22 | ||
|
|
6b4ba66231 | ||
|
|
5b697dc381 | ||
|
|
9ba73c95d1 | ||
|
|
93aa390447 | ||
|
|
3cfb8945dd | ||
|
|
cd8d38f2a1 | ||
|
|
8ec8cd6294 | ||
|
|
c028113561 | ||
|
|
5f22e1c803 | ||
|
|
d3351787e5 | ||
|
|
e5bea9ae3b | ||
|
|
93c710abe9 | ||
|
|
c29e7cfe5c | ||
|
|
cb5c1ba00d | ||
|
|
9a012b94e1 | ||
|
|
400f5a44ec | ||
|
|
a2ab5bab91 | ||
|
|
fc8ab27361 | ||
|
|
59f19d33a5 | ||
|
|
dfc9618115 | ||
|
|
8e02e5c75a | ||
|
|
970493ab93 | ||
|
|
64d78956eb | ||
|
|
40c05346f4 | ||
|
|
e9b0bc1409 | ||
|
|
798e6bb7d9 | ||
|
|
12a370deed | ||
|
|
553bfbe1a0 | ||
|
|
52494321fc | ||
|
|
c6c9e06496 | ||
|
|
e3a6c05a58 | ||
|
|
391d06f68d | ||
|
|
99804ea06e | ||
|
|
51935deb2a | ||
|
|
b24d0c3a47 | ||
|
|
762a886d6f | ||
|
|
2c3e9ddfe4 | ||
|
|
c7cd2b63c8 | ||
|
|
f0528ea831 | ||
|
|
5bc5596f60 | ||
|
|
2c27ac46be | ||
|
|
caad840153 | ||
|
|
65bd7e2904 | ||
|
|
c3d7d7db12 | ||
|
|
5605310362 | ||
|
|
17b6efe82e | ||
|
|
a032ae56ae | ||
|
|
eab2f4b056 | ||
|
|
aff86ae6c7 | ||
|
|
7ece9ddc1a | ||
|
|
7cd048e839 | ||
|
|
1e22f610a3 | ||
|
|
5249c972ae | ||
|
|
fd45f856a0 | ||
|
|
c8ab40cd33 | ||
|
|
b2c872925b | ||
|
|
f48e229202 | ||
|
|
799fec92c3 | ||
|
|
87a41c2fca | ||
|
|
7f85de0c46 | ||
|
|
13661b1993 | ||
|
|
51d5c3892d | ||
|
|
e4eab4641a | ||
|
|
9b148e0ba3 | ||
|
|
de28932650 | ||
|
|
5f798d603e | ||
|
|
a0757b2dd3 | ||
|
|
498d51b4e8 | ||
|
|
b06b6bae3f | ||
|
|
b5eaff2137 | ||
|
|
c01bcd3734 | ||
|
|
d75c4068ca | ||
|
|
6aa2d5a3d2 | ||
|
|
065276805f | ||
|
|
a63408c8cf | ||
|
|
69576f6bfa | ||
|
|
19845624e2 | ||
|
|
22ff2964e9 | ||
|
|
d96b3a65a9 | ||
|
|
4989445ef4 | ||
|
|
6770892acd | ||
|
|
d4eba8740f | ||
|
|
9f60760560 | ||
|
|
0a8f8ac934 | ||
|
|
6ae24c8244 | ||
|
|
d3679082a8 | ||
|
|
fb08b42dca | ||
|
|
4aeaa9f42a | ||
|
|
5f5693da04 | ||
|
|
5eb0f61727 | ||
|
|
958e998991 | ||
|
|
b78c1509f6 | ||
|
|
ce184d4d57 | ||
|
|
b4c3714ced | ||
|
|
5b7dfa0438 | ||
|
|
391a388476 | ||
|
|
d9c4e2ed4c | ||
|
|
0c42db38b1 | ||
|
|
2f9be8bf33 | ||
|
|
e8c00155e8 | ||
|
|
cc88fdd9ee | ||
|
|
d9de11ef1d | ||
|
|
0ceda97d09 | ||
|
|
d0dec92ba8 | ||
|
|
d420c008d8 | ||
|
|
f0b32db433 | ||
|
|
bc838eda59 | ||
|
|
afe55b6af0 | ||
|
|
dd3a3ac302 | ||
|
|
f9982a7947 | ||
|
|
07c1be9e9a | ||
|
|
f832b88755 | ||
|
|
0fac757efc | ||
|
|
fc15742065 | ||
|
|
6f2466a131 | ||
|
|
4b90e22f0a | ||
|
|
c493568785 | ||
|
|
1cdf004b77 | ||
|
|
a4ea504261 | ||
|
|
4c2c234c3b | ||
|
|
3d4c0f3e89 | ||
|
|
52fad02903 | ||
|
|
9dcabc057c | ||
|
|
db8c1079dd | ||
|
|
8f954673ab | ||
|
|
79522d1c7d | ||
|
|
a18bf03079 | ||
|
|
c02b6b5d82 | ||
|
|
f99b423284 | ||
|
|
d7d9d45d4f | ||
|
|
90065ec0cd | ||
|
|
51157ebb86 | ||
|
|
96d95c79ca | ||
|
|
e5da34c233 | ||
|
|
f09d657f77 | ||
|
|
0f4b0189f5 | ||
|
|
4666042abb | ||
|
|
027d544c2b | ||
|
|
f1967d0138 | ||
|
|
c1d896027d | ||
|
|
5c2d2a6618 | ||
|
|
997b269b0b | ||
|
|
61257e7525 | ||
|
|
53ee2c3631 | ||
|
|
8bfa0bddec | ||
|
|
ad61e6bc81 | ||
|
|
873b5ba8ac | ||
|
|
6ae50054e2 | ||
|
|
22a35f41bf | ||
|
|
961696c963 | ||
|
|
c7b7f1a5dc | ||
|
|
b5a0d650b1 | ||
|
|
573b279464 | ||
|
|
116e07f161 | ||
|
|
964868c8af | ||
|
|
c8dac32df8 | ||
|
|
72a0016bd8 | ||
|
|
2ad3167434 | ||
|
|
ddabfaa05c | ||
|
|
f857523ca7 | ||
|
|
00d53858e8 | ||
|
|
c008167e66 | ||
|
|
102344a041 | ||
|
|
c865298ef3 | ||
|
|
6ac03faf93 | ||
|
|
49c2701743 | ||
|
|
d1a271b08e | ||
|
|
7388ad19b9 | ||
|
|
2e63cb5fad | ||
|
|
e7f14d02b1 | ||
|
|
873771d05a | ||
|
|
d7de122e36 | ||
|
|
4ef0434f53 | ||
|
|
1aa2c99259 | ||
|
|
c2450b27b0 | ||
|
|
14d6d8b84f | ||
|
|
f0e3846c03 | ||
|
|
6ba64f1128 | ||
|
|
13bcdbc6c9 | ||
|
|
cfba62db20 | ||
|
|
18fb69e36e | ||
|
|
474eb0f3fd | ||
|
|
7f47b53370 | ||
|
|
dc2907d3ce | ||
|
|
1af85811e0 | ||
|
|
1c1b19a478 | ||
|
|
66942d64ba | ||
|
|
2fb6ae08d7 | ||
|
|
bf8811e03e | ||
|
|
c8b502c571 | ||
|
|
81c11a975c | ||
|
|
0d370eb403 | ||
|
|
7492c3f1e3 | ||
|
|
515a8a84b7 | ||
|
|
dd6680efb2 | ||
|
|
a7158373cd | ||
|
|
6d50ec7199 | ||
|
|
95dbf98e8e | ||
|
|
d49323e4eb | ||
|
|
08c1e2aec9 | ||
|
|
a2c137df2e | ||
|
|
fe27dcdb8f | ||
|
|
028e136161 | ||
|
|
9a85a0a4d5 | ||
|
|
3a1cbc4d50 | ||
|
|
77d334f7f3 | ||
|
|
53cdf863ac | ||
|
|
7b7e7fe0fe | ||
|
|
0c03132847 | ||
|
|
3b81f7e2a1 | ||
|
|
3d76437b43 | ||
|
|
4bc54c78ce | ||
|
|
3d303a96b9 | ||
|
|
33c99d031d | ||
|
|
caf7e9f69a | ||
|
|
9449f1f5d5 | ||
|
|
6bad164b5e | ||
|
|
bb5ba7ddb1 | ||
|
|
8b2e01d540 | ||
|
|
ff1159b1de | ||
|
|
a2fd3202a0 | ||
|
|
7b53715b91 | ||
|
|
e05fc0a510 | ||
|
|
43604c33f6 | ||
|
|
eb67c484ff | ||
|
|
a7b7bdd467 | ||
|
|
ab06989a18 | ||
|
|
657b722f94 | ||
|
|
dd2aecad27 | ||
|
|
c82c5c5c64 | ||
|
|
a1761cd68f | ||
|
|
d618a7f583 | ||
|
|
831a42f660 | ||
|
|
3b36022e5a | ||
|
|
d01dfa25f1 | ||
|
|
395a99037b | ||
|
|
025986c51d | ||
|
|
c56b83093f | ||
|
|
7c712a4133 | ||
|
|
9a0cfe6dfa | ||
|
|
a116cdbcec | ||
|
|
f2d616c98e | ||
|
|
42cbd1777d | ||
|
|
ebf375aac0 | ||
|
|
1f9050267e | ||
|
|
d7f9707a15 | ||
|
|
ab589ee3ed | ||
|
|
c84ec0361f | ||
|
|
47d2f8968a | ||
|
|
019c480bcc | ||
|
|
547c6d3d59 | ||
|
|
b5ebf8b76a | ||
|
|
c690e328f2 | ||
|
|
cbb92c1a95 | ||
|
|
beb41997c9 | ||
|
|
755a6faf11 | ||
|
|
021f8350a3 | ||
|
|
76583dcd2f | ||
|
|
bf033239a7 | ||
|
|
eb37fccd37 | ||
|
|
d04ad45331 | ||
|
|
db157b8ca7 | ||
|
|
68f277bb20 |
37
.github/workflows/pythonapp.yml
vendored
Normal file
37
.github/workflows/pythonapp.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "**/*.py"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**/*.py"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-20.04, windows-latest]
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: "Set up timezone to America/Los_Angeles"
|
||||
uses: szenius/set-timezone@v1.2
|
||||
with:
|
||||
timezoneLinux: "America/Los_Angeles"
|
||||
timezoneMacos: "America/Los_Angeles"
|
||||
timezoneWindows: "Pacific Standard Time"
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
- name: Test with unittest
|
||||
run: |
|
||||
python -m unittest discover tests
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -3,4 +3,7 @@ __pycache__
|
||||
dist/
|
||||
build/
|
||||
*.egg-info/
|
||||
jc/parsers.old/
|
||||
.github/
|
||||
.vscode/
|
||||
_config.yml
|
||||
.venv
|
||||
|
||||
839
CHANGELOG
Normal file
839
CHANGELOG
Normal file
@@ -0,0 +1,839 @@
|
||||
jc changelog
|
||||
|
||||
20240204 v1.25.0
|
||||
- Add `--slurp` functionality to wrap output from multiple lines into a single array.
|
||||
Note, this only works with single-line input parsers. (e.g. `date`, `ip-address`, `url`, etc.)
|
||||
Streaming parsers are not supported. Use `jc -hhh` to find parsers compatible with the slurp option.
|
||||
- Enhance `/proc` file magic syntax to allow slurping when multiple files are selected
|
||||
and to include the `_file` metadata field in the data
|
||||
- Enhance `--meta-out` functionality to include a list of the input data when using `--slurp`
|
||||
or `/proc` file magic syntax. For slurpable parsers, this is a list of string inputs in order.
|
||||
For `/proc` file magic syntax, this is a list of `/proc` filenames in order. This can help with
|
||||
identifying which input matches to which output when using `--slurp` or when converting multiple
|
||||
files via `/proc` file magic syntax.
|
||||
- Add `curl-head` command parser for `curl --head` or `curl -I` with verbose support
|
||||
- Add `efibootmgr` command parser
|
||||
- Add `http-headers` parser for plain HTTP header output
|
||||
- Add `kv-dup` parser for Key/Value files with duplicate keys
|
||||
- Add `path` string parser to parse posix path
|
||||
- Add `path-list` string parser to parse path list strings found in env variables
|
||||
- Add source link to online parser documentation
|
||||
- Add snap package build scripts
|
||||
- Add `remove_quotes` function to `utils.py`
|
||||
- Add `normalize_key` function to `utils.py`
|
||||
- Add `line_slice` function to `utils.py`
|
||||
- Add `get_parser` function to `lib.py`
|
||||
- Enhance `nsd-control` parser to support more zone information
|
||||
- Enhance `ping` and `ping-s` parsers to support the `-I` command option
|
||||
- Enhance `proc-net-tcp` parser to add opposite endian support for architectures
|
||||
like the s390x
|
||||
- Enhance `url` parser to add `parent`, `filename`, `stem`, and `extension` fields
|
||||
- Fix `ini` and `ini-dup` parsers to consistently handle null values as empty strings
|
||||
- Fix line slicer to not skip blank lines
|
||||
- Refactor parser aliases for `kv`, `pkg_index_deb`, `lsb_release`, and `os-release`
|
||||
- Update copyright date
|
||||
|
||||
20231216 v1.24.0
|
||||
- Add `debconf-show` command parser
|
||||
- Add `iftop` command parser
|
||||
- Add `pkg-index-apk` parser for Alpine Linux Package Index files
|
||||
- Add `pkg-index-deb` parser for Debian/Ubuntu Package Index files
|
||||
- Add `proc-cmdline` parser for `/proc/cmdline` file
|
||||
- Add `swapon` command parser
|
||||
- Add `tune2fs` command parser
|
||||
- Remove `iso-datetime` parser deprecated since v1.22.1. (use `datetime-iso` instead)
|
||||
- Update timezone change in Github Actions for node v16 requirement
|
||||
- Add Python 3.12 tests to Github Actions
|
||||
- Refactor `acpi` command parser for code cleanup
|
||||
- Refactor vendored libraries to remove Python 2 support
|
||||
- Fix `iptables` parser for cases where the `target` field is blank in a rule
|
||||
- Fix `vmstat` parsers for some cases where wide output is used
|
||||
- Fix `mount` parser for cases with spaces in the mount point name
|
||||
- Fix `xrandr` parser for infinite loop issues
|
||||
|
||||
20231023 v1.23.6
|
||||
- Fix XML parser for xmltodict library versions < 0.13.0
|
||||
- Fix `who` command parser for cases when the from field contains spaces
|
||||
|
||||
20231021 v1.23.5
|
||||
- Add `host` command parser
|
||||
- Add `nsd-control` command parser
|
||||
- Add `lsb_release` command parser
|
||||
- Add `/etc/os-release` file parser
|
||||
- Enhance `env` command parser to support multi-line values
|
||||
- Enhance `ping` and `ping-s` parsers to add error and corrupted support
|
||||
- Enhance `xml` parser to include comments in the JSON output
|
||||
- Fix `pidstat` command parser when using `-T ALL`
|
||||
- Fix `x509-cert` parser to allow negative serial numbers
|
||||
- Fix `x509-cert` parser for cases when bitstrings are larger than standard
|
||||
- Fix `xrandr` command parser for associated device issues
|
||||
- Fix error when pygments library is not installed
|
||||
|
||||
20230730 v1.23.4
|
||||
- Add `/etc/resolve.conf` file parser
|
||||
- Add `/proc/net/tcp` and `/proc/net/tcp6` file parser
|
||||
- Add `find` command parser
|
||||
- Add `ip route` command parser
|
||||
- Fix `certbot` command parser to be more robust with different line endings
|
||||
|
||||
20230621 v1.23.3
|
||||
- Add `lsattr` command parser
|
||||
- Add `srt` file parser
|
||||
- Add `veracrypt` command parser
|
||||
- Add X509 Certificate Request file parser
|
||||
- Enhance X509 Certificate parser to allow non-compliant email addresses with a warning
|
||||
- Enhance `dig` command parser to support the `+nsid` option
|
||||
- Enhance `last` and `lastb` command parser to support the `-x` option
|
||||
- Enhance `route` command parser to add Windows support
|
||||
- Enhnace `netstat` command parser to add Windows support
|
||||
- Enhance `ss` command parser to support extended options
|
||||
- Enhance the compatibility warning message
|
||||
- Fix `bluetoothctl` command parser for some mouse devices
|
||||
- Fix `ping` command parsers for output with missing hostname
|
||||
- Fix `stat` command parser for older versions that may not contain all fields
|
||||
- Fix deprecated option in `setup.cfg`
|
||||
|
||||
20230429 v1.23.2
|
||||
- Add `bluetoothctl` command parser
|
||||
- Add `certbot` command parser for `certificates` and `show_account` options
|
||||
- Fix `acpi` command parser for "Not charging" battery status lines
|
||||
- Fix `iwconfig` command parser for SSIDs with dashes in the name
|
||||
- Fix `crontab` command parsers for incorrect variable parsing in some cases
|
||||
- Fix `git-log` and `git-log-s` command parsers for incorrect insertion/deletion parsing
|
||||
- Fix `ufw-appinfo` command parser for parsing errors on multiline description fields
|
||||
- Fix pytest warnings
|
||||
|
||||
20230323 v1.23.1
|
||||
- Fix `zpool-status` command parser for lines that start with tab
|
||||
- Fix `timedatectl` command parser when RTC set to local
|
||||
- Fix to ensure `py.typed` file is included in the package wheel
|
||||
- Fix `lsusb` command parser to support CDC MBIM and CDC MBIM Extended fields
|
||||
- Add support for the `timesync-status` for the `timedatectl` command parser
|
||||
- Fix to ignore non-parser-plugins in the parser plugin directory
|
||||
|
||||
20230227 v1.23.0
|
||||
- Add input slicing as a `jc` command-line option
|
||||
- Add `ssh` configuration file parser
|
||||
- Add `ver` Version string parser
|
||||
- Add `zpool iostat` command parser
|
||||
- Add `zpool status` command parser
|
||||
- Fix `acpi` command parser for "will never fully discharge" battery state
|
||||
- Fix `crontab` and `crontab-u` command and file parsers for cases where only
|
||||
shortcut schedule items exist
|
||||
- Fix `ifconfig` command parser for older-style linux output
|
||||
- Fix `xrandr` command parser for proper `is_current` output
|
||||
- Fix `xrandr` command parser for infinite loop with some device configurations
|
||||
- Add `reflection` key to `xrandr` parser schema
|
||||
- Add display model info from EDID to `xrandr` parser
|
||||
- Add `MPX-specific VMA` support for VM Flags in `/proc/<pid>/smaps` parser
|
||||
|
||||
20230111 v1.22.5
|
||||
- Add TOML file parser
|
||||
- Add INI with duplicate key support file parser
|
||||
- Add AIX support for the `arp` command parser
|
||||
- Add AIX support for the `mount` command parser
|
||||
- Fix `lsusb` command parser when extra hub port status information is output
|
||||
- Refactor `lsusb` command parser for more code reuse
|
||||
- Fix INI file parser to include top-level values with no section header
|
||||
- Fix INI file parser to not specially handle the [DEFAULT] section
|
||||
- Fix INI file and Key/Value parsers to only remove one quotation mark from the
|
||||
beginning and end of values.
|
||||
- Update copyright dates
|
||||
|
||||
20221230 v1.22.4
|
||||
- Add `iwconfig` command parser
|
||||
- Add NeXTSTEP format support to the PLIST file parser
|
||||
- Fix `proc` parser magic signature detection for `/proc/pid/stat` hacks
|
||||
- Fix `x509-cert` parser for string serial numbers
|
||||
- Add category tags to parser metadata: generic, standard, file, string, binary, command
|
||||
- Add "list parsers by category" view to help
|
||||
- Fix python 3.6-related issues
|
||||
- Add python 3.6 to automated tests
|
||||
|
||||
20221216 v1.22.3
|
||||
- Add Common Log Format and Combined Log Format file parser (standard and streaming)
|
||||
- Add PostgreSQL password file parser
|
||||
- Add openvpn-status.log file parser
|
||||
- Add `cbt` command parser (Google Big Table)
|
||||
- Enhance `ifconfig` parser with interface lane information on BSD
|
||||
- Enhance `ifconfig` parser with additional IPv6 `scope_id` info for BSD
|
||||
- Fix `ifconfig` parser to capture some IPv6 addresses missed on BSD
|
||||
- Fix `git-log` and `git-log-s` parsers for failure on empty author name
|
||||
- Update `os-prober` parser with split EFI partition fields
|
||||
- Add ISO string attribute (`.iso`) to `jc.utils.timestamp()`
|
||||
- Fix several documentation typos
|
||||
|
||||
20221107 v1.22.2
|
||||
- add `sshd_conf` parser for `sshd` configuration files and `sshd -T` output
|
||||
- add `findmnt` command parser
|
||||
- add `git ls-remote` command parser
|
||||
- add `os-prober` command parser
|
||||
- add SemVer string parser
|
||||
- enhance the `ifconfig` parser so it can output multiple IPv4 and IPv6 addresses
|
||||
- enhance the `ifconfig` parser so it can output additional fields common on BSD
|
||||
- enhance `xml` parser with optional `_` prefix for attributes instead of
|
||||
`@` by using the `--raw` option. This can make it easier to filter the
|
||||
JSON output in some tools.
|
||||
- fix the `xml` parser to output a normal Dictionary instead of OrderdDict.
|
||||
This cleans up YAML output. (No `!!omap` comments)
|
||||
- fix `csv` and `csv-s` parsers for UTF-8 encoded CSV files with leading BOM bytes
|
||||
- fix exit code to be non-zero on interrupt
|
||||
- allow parser module objects to be used as arguments to `jc.get_help()` and `jc.parser_info()`
|
||||
- catch unexpected exceptions in the CLI
|
||||
- add error message on interrupt to STDERR
|
||||
- add python 3.11 tests to github actions
|
||||
|
||||
20221024 v1.22.1
|
||||
- add `udevadm` command parser
|
||||
- add `lspci` command parser
|
||||
- add `pci.ids` file parser
|
||||
- fix `proc-pid-stat` parser for command names with spaces and newlines
|
||||
- enhance `ip-address` parser to add `ip_split` field
|
||||
- rename `iso-datetime` parser to `datetime-iso`. A deprecation warning will
|
||||
display until `iso-datetime` is removed in a future version.
|
||||
- refactor cli module
|
||||
- optimize performance of calculated timestamps
|
||||
- add more type annotations
|
||||
- add support for deprecating parsers
|
||||
- move jc-web demo site from heroku to render.com
|
||||
|
||||
20220926 v1.22.0
|
||||
- Add /proc file parsers for linux. Support for the following files:
|
||||
`/proc/buddyinfo`
|
||||
`/proc/consoles`
|
||||
`/proc/cpuinfo`
|
||||
`/proc/crypto`
|
||||
`/proc/devices`
|
||||
`/proc/diskstats`
|
||||
`/proc/filesystems`
|
||||
`/proc/interrupts`
|
||||
`/proc/iomem`
|
||||
`/proc/ioports`
|
||||
`/proc/loadavg`
|
||||
`/proc/locks`
|
||||
`/proc/meminfo`
|
||||
`/proc/modules`
|
||||
`/proc/mtrr`
|
||||
`/proc/pagetypeinfo`
|
||||
`/proc/partitions`
|
||||
`/proc/slabinfo`
|
||||
`/proc/softirqs`
|
||||
`/proc/stat`
|
||||
`/proc/swaps`
|
||||
`/proc/uptime`
|
||||
`/proc/version`
|
||||
`/proc/vmallocinfo`
|
||||
`/proc/vmstat`
|
||||
`/proc/zoneinfo`
|
||||
`/proc/driver/rtc`
|
||||
`/proc/net/arp`
|
||||
`/proc/net/dev`
|
||||
`/proc/net/dev_mcast`
|
||||
`/proc/net/if_inet6`
|
||||
`/proc/net/igmp`
|
||||
`/proc/net/igmp6`
|
||||
`/proc/net/ipv6_route`
|
||||
`/proc/net/netlink`
|
||||
`/proc/net/netstat`
|
||||
`/proc/net/packet`
|
||||
`/proc/net/protocols`
|
||||
`/proc/net/route`
|
||||
`/proc/net/unix`
|
||||
`/proc/<pid>/fdinfo/<fd>`
|
||||
`/proc/<pid>/io`
|
||||
`/proc/<pid>/maps`
|
||||
`/proc/<pid>/mountinfo`
|
||||
`/proc/<pid>/numa_maps`
|
||||
`/proc/<pid>/smaps`
|
||||
`/proc/<pid>/stat`
|
||||
`/proc/<pid>/statm`
|
||||
`/proc/<pid>/status`
|
||||
- Magic syntax support for `/proc` files
|
||||
- Enhance bash and zsh autocompletions for `/proc` files
|
||||
- Enhance `free` parser to support `-w` option integer conversions
|
||||
- Fix `ini` and `kv` parsers so they don't change keynames to lower case
|
||||
NOTE: This can be a breaking change in your scripts
|
||||
- Fix `id` command parser to allow usernames and groupnames with spaces
|
||||
- Enhance metadata output to output metadata even when results are empty
|
||||
- Optimize tests
|
||||
- Optimize documentation build script
|
||||
|
||||
20220829 v1.21.2
|
||||
- Fix IP Address string parser for older python versions that don't cleanly
|
||||
accept decimal input format - IPv6 fix (e.g. python 3.6)
|
||||
|
||||
20220828 v1.21.1
|
||||
- Fix IP Address string parser for older python versions that don't cleanly
|
||||
accept decimal input format - IPv4 fix (e.g. python 3.6)
|
||||
- Fix `arp -a` parser for cases where incomplete hardware addresses are found
|
||||
in the arp table on linux
|
||||
|
||||
20220821 v1.21.0
|
||||
- Add IP Address string parser
|
||||
- Add Syslog standard and streaming string parsers (RFC 3164 and RFC 5424)
|
||||
- Add CEF standard and streaming string parser
|
||||
- Add PLIST file parser (XML and binary support)
|
||||
- Add `-n` support to the `traceroute` parser
|
||||
- Add `mdadm` command parser tested on linux
|
||||
- Add `--meta-out` or `-M` option to add metadata to the JSON output, including
|
||||
a UTC timestamp, parser name, magic command, and magic command exit code
|
||||
- Fix `lsusb` command parser for output containing a `Device Qualifier` and
|
||||
`Binary Object Store Descriptor` sections
|
||||
- Change `LANG=C` to `LC_ALL=C` in locale instructions
|
||||
- Add `__main__.py` to package allowing `python -m jc` usage
|
||||
- Add an enclosing top-level folder inside the windows.zip package
|
||||
|
||||
20220723 v1.20.4
|
||||
- Fix URL string parser path list for URLs ending in a forward slash
|
||||
|
||||
20220723 v1.20.3
|
||||
- Add URL string parser
|
||||
- Add Email Address string parser
|
||||
- Add JWT string parser
|
||||
- Add ISO 8601 Datetime string parser
|
||||
- Add UNIX Epoch Timestamp string parser
|
||||
- Add M3U/M3U8 file parser
|
||||
- Add pager functionality to help (parser documentation only)
|
||||
- Minor parser performance optimizations
|
||||
|
||||
20220705 v1.20.2
|
||||
- Add `gpg --with-colons` parser tested on linux
|
||||
- Add DER and PEM encoded X.509 Certificate parser
|
||||
- Add Bash and Zsh completion scripts to DEB and RPM packages
|
||||
|
||||
20220615 v1.20.1
|
||||
- Add `postconf -M` parser tested on linux
|
||||
- Update `asciitable` and `asciitable-m` parsers to preserve case in key
|
||||
names when using the `-r` or `raw=True` options.
|
||||
- Add long options (e.g. `--help`, `--about`, `--pretty`, etc.)
|
||||
- Add shell completions for Bash and Zsh
|
||||
- Fix `id` parser for cases where the user or group name is not present
|
||||
|
||||
20220531 v1.20.0
|
||||
- Add YAML output option with `-y`
|
||||
- Add `top -b` standard and streaming parsers tested on linux
|
||||
- Add `plugin_parser_count`, `standard_parser_count`, and `streaming_parser_count`
|
||||
keys to `jc -a` output
|
||||
- Add `is_compatible` function to the `utils` module
|
||||
- Fix `pip-show` parser for packages with a multi-line license field
|
||||
- Fix ASCII Table parser for cases where centered headers cause mis-aligned fields
|
||||
|
||||
20220513 v1.19.0
|
||||
- Add `chage --list` command parser tested on linux
|
||||
- Add `git log` command streaming parser
|
||||
- Fix `git log` standard parser for corner-cases where hash values are in messages
|
||||
- Fix `df` command parser for rare instances when a newline is found at the end
|
||||
- Allow jc to pip install on unsupported python version 3.6
|
||||
- Fix `asciitable-m` parser to skip some rows that contain column separator
|
||||
characters in cell data. A warning message will be printed to STDERR
|
||||
unless `-q` or `quiet=True` is used.
|
||||
|
||||
20220427 v1.18.8
|
||||
- Fix `update-alternatives --query` parser for cases where `slaves` are not present
|
||||
- Fix UnicodeEncodeError on some systems where LANG=C is set and unicode
|
||||
characters are in the output
|
||||
- Update `history` parser: do not drop non-ASCII characters if the system
|
||||
is configured for UTF-8 encoding
|
||||
- Enhance "magic syntax" to always use UTF-8 encoding
|
||||
|
||||
20220425 v1.18.7
|
||||
- Add `git log` command parser
|
||||
- Add `update-alternatives --query` parser
|
||||
- Add `update-alternatives --get-selections` parser
|
||||
- Fix key/value and ini parsers to allow duplicate keys
|
||||
- Fix yaml file parser for files including timestamp objects
|
||||
- Update `xrandr` parser: add a 'rotation' field
|
||||
- Fix failing tests by moving template files
|
||||
- Add python interpreter version and path to -v and -a output
|
||||
|
||||
20220325 v1.18.6
|
||||
- Add `pidstat` command parser tested on linux
|
||||
- Add `pidstat` command streaming parser tested on linux
|
||||
- Add `mpstat` command parser tested on linux
|
||||
- Add `mpstat` command streaming parser tested on linux
|
||||
- Add single-line ASCII and Unicode table parser
|
||||
- Add multi-line ASCII and Unicode table parser
|
||||
- Add documentation option to `parser_info()` and `all_parser_info()`
|
||||
|
||||
20220305 v1.18.5
|
||||
- Fix date parser to ensure AM/PM period string is always uppercase
|
||||
|
||||
20220304 v1.18.4
|
||||
- Add nmcli command parser tested on linux
|
||||
- Enhance parse error messages at the cli
|
||||
- Add standard and streaming parser list functions to the public API
|
||||
- Enhance python developer documentation formatting
|
||||
|
||||
20220214 v1.18.3
|
||||
- Add rsync command and log file parser tested on linux and macOS
|
||||
- Add rsync command and log file streaming parser tested on linux and macOS
|
||||
- Add xrandr command parser tested on linux
|
||||
- Enhance timestamp performance with caching and format hints
|
||||
- Refactor ignore_exceptions functionality in streaming parsers
|
||||
- Fix man page in packages
|
||||
|
||||
20220127 v1.18.2
|
||||
- Fix for plugin parsers with underscores in the name
|
||||
- Add type hints to public API functions
|
||||
- Add plugin attribute to plugin parser metadata
|
||||
- Add C locale hint to parsing error messages
|
||||
- Refactor more cli code into lib
|
||||
|
||||
20220121 v1.18.1
|
||||
- Minor fix for MacOS binary
|
||||
|
||||
20220121 v1.18.0
|
||||
- Add high-level parse API for built-in and plugin parsers
|
||||
- Add python module developer documentation
|
||||
- Enhance magic syntax exception messages
|
||||
- Enhance documentation formatting
|
||||
|
||||
20220106 v1.17.7
|
||||
- Add stat command streaming parser tested on linux and macOS
|
||||
|
||||
20220103 v1.17.6
|
||||
- Add jar-manifest file parser (for MANIFEST.MF files)
|
||||
- Fix CSV parsers for some files that include doublequotes
|
||||
|
||||
20211221 v1.17.5
|
||||
- Add zipinfo parser tested on linux and macOS
|
||||
|
||||
20211207 v1.17.4
|
||||
- Add support for the NO_COLOR environment variable to set mono (http://no-color.org/)
|
||||
- Add -C option to force color output even when using pipes (overrides -m and NO_COLOR)
|
||||
|
||||
20211202 v1.17.3
|
||||
- Update parsers to exit with error if non-string input is detected (raise TypeError)
|
||||
- Update streaming parsers to exit with error if non-iterable input is detected (raise TypeError)
|
||||
- Simplify quiet-checking in parsers
|
||||
- Add iostat parser tested on linux
|
||||
- Add iostat streaming parser tested on linux
|
||||
|
||||
20211117 v1.17.2
|
||||
- Fix ping parser to add Alpine linux support
|
||||
- Fix netstat parser for older versions of netstat on linux
|
||||
- Fix df parser for cases where the filesystem field overflows the column length
|
||||
|
||||
20211030 v1.17.1
|
||||
- Fix file parser for gzip files
|
||||
- Fix uname parser for cases where the 'processor' and/or 'hardware_platform' fields are missing on linux
|
||||
- Fix uname parser on FreeBSD
|
||||
- Add lsusb parser tested on linux
|
||||
- Add CSV file streaming parser
|
||||
- Add testing for Python 3.10.0
|
||||
|
||||
20210923 v1.17.0
|
||||
- Note to Package Maintainers: please see note at 20210720 v1.16.0
|
||||
- Add wrapping of warning and error messages
|
||||
- Add vmstat parser tested on linux
|
||||
- Add support for streaming parsers
|
||||
- Add ls command streaming parser tested on linux, macOS, and freeBSD
|
||||
- Add ping command streaming parser tested on linux, macOS, and freeBSD
|
||||
- Add vmstat command streaming parser tested on linux
|
||||
- Add -u option to allow unbuffered output
|
||||
|
||||
20210830 v1.16.2
|
||||
- Note to Package Maintainers: please see note at 20210720 v1.16.0
|
||||
- Update sfdisk parser to support the -F option and newer versions of sfdisk
|
||||
|
||||
20210813 v1.16.1
|
||||
- Note to Package Maintainers: please see note at 20210720 v1.16.0
|
||||
- Fix issue with process substitution with the magic syntax
|
||||
- Fix issue with globs not including filenames with spaces with magic syntax
|
||||
- Fix stat parser to properly handle filenames with spaces on macOS/BSD
|
||||
|
||||
20210720 v1.16.0
|
||||
- Note to Package Maintainers:
|
||||
TL;DR: `/man/jc.1.gz` and `/jc/man/jc.1.gz` are deprecated and only `/man/jc.1` should be used.
|
||||
|
||||
The Man page in the PyPi source packages will be moving from `/jc/man/jc.1.gz` to `/man/jc.1`
|
||||
in version 1.17.0. For now the Man pages will be available in both locations, but be aware that
|
||||
the Man page at `/jc/man/jc.1.gz` is now considered deprecated.
|
||||
|
||||
Also, starting in v1.17.0, the Man page will no longer be compressed in the source package,
|
||||
therefore `/man/jc.1.gz` should also be considered deprecated and will no longer be available
|
||||
after v1.17.0. Please use `/man/jc.1` and compress downstream if you would like.
|
||||
- Include CHANGELOG in source distribution
|
||||
- Fix Man page location in source packages
|
||||
- Add sfdisk command parser tested on linux
|
||||
- Update unit test files to change the timezone when needed (POSIX only)
|
||||
- Binaries and DEB/RPM/MSI packages now include Python 3.9.5 interpreter
|
||||
|
||||
20210628 v1.15.6
|
||||
- Fix issue to only load local plugin parsers that have filenames that end in .py
|
||||
|
||||
20210520 v1.15.5
|
||||
- Fix issue where help and about information would not display if a 3rd party parser library was missing. (e.g. xmltodict)
|
||||
- Add more error message detail when encountering ParseError and LibraryNotFound exceptions
|
||||
|
||||
20210517 v1.15.4
|
||||
- Update ping parser to support error responses in OSX and BSD
|
||||
- Update ping parser to be more resilient against parsing errors for unknown error types
|
||||
- Update dig parser to support `+noall +answer` use case
|
||||
- Update dig parser compatibility to all platforms
|
||||
- Fix colors in Windows terminals (cmd.exe and PowerShell)
|
||||
- Fix epoch calculations when UTC is referenced as "Coordinated Universal Time"
|
||||
- Add Windows time format for systeminfo output
|
||||
- Add exceptions module to standardize parser exceptions
|
||||
- JC no longer swallows exit codes when using the "magic" syntax. See the Exit Codes section of the README and man page for details
|
||||
|
||||
20210426 v1.15.3
|
||||
- Add ufw status command parser tested on linux
|
||||
- Add ufw-appinfo command parser tested on linux
|
||||
- Fix deb package name to conform to standard
|
||||
- Add Caveats section to readme and manpage
|
||||
|
||||
20210418 v1.15.2
|
||||
- Add systeminfo parser tested on Windows
|
||||
- Update dig parser to fix an issue with IPv6 addresses in the server field
|
||||
- Update dig parser to fix an issue when axfr entries contain a semicolon
|
||||
- Update dig parser to add support for Additional Section and Opt Pseudosection
|
||||
- Update dig parser to add query_size field
|
||||
- Use dig parser as the main example in readme, documentation, and man page
|
||||
- Standardize int, float, and boolean conversion rules with functions in jc.utils
|
||||
|
||||
20210413 v1.15.1
|
||||
- New feature to show parser documentation interactively with -h --parser_name
|
||||
for example: $ jc -h --arp
|
||||
- Add man page to pypi package for easier packaging in homebrew
|
||||
- Update rpm-qi parser to add two calculated timestamp fields: install_date_epoch and install_date_epoch_utc
|
||||
- Clean up documentation and autogenerate the Parser Information section from metadata
|
||||
|
||||
20210407 v1.15.0
|
||||
- Add acpi command parser tested on linux
|
||||
- Add upower command parser tested on linux
|
||||
- Add /usr/bin/time command parser tested on linux and macOS
|
||||
- Add dpkg -l command parser tested on linux
|
||||
- Add rpm -qi command parser tested on linux
|
||||
- Add finger command parser tested on linux and macOS
|
||||
- Add dir command parser tested on Windows 10
|
||||
- Update date parser: complete rewrite (v2.0) providing many enhancements:
|
||||
- Make weekday numbering ISO 8601 compliant
|
||||
- Add a calculated naive timestamp field
|
||||
- Add a calculated UTC timestamp field (only if date output is in UTC)
|
||||
- Add several fields, including: hour_24, utc_offset, day_of_year, week_of_year, iso, and timezone_aware
|
||||
- Update uptime parser to add uptime_days, uptime_hours, uptime_minutes, uptime_total_seconds, time_hour,
|
||||
time_minute, and time_second fields
|
||||
- Update last parser to use new timestamp function
|
||||
- Update stat parser to add access_time_epoch, access_time_epoch_utc, modify_time_epoch, modify_time_epoch_utc,
|
||||
change_time_epoch, change_time_epoch_utc, birth_time_epoch, birth_time_epoch_utc fields
|
||||
- Update timedatectl parser to add epoch_utc field
|
||||
- Update who parser to add epoch field
|
||||
- Update dig parser to add when_epoch and when_epoch_utc fields
|
||||
- Update ls parser to add epoch and epoch_utc fields
|
||||
- Add -h option to display the help text. Piping errors no longer show the help text.
|
||||
- Add -v option to display version information.
|
||||
- Add contributing information to project root
|
||||
- Make all external python library dependencies optional: pygments, ruamel.yaml, xmltodict
|
||||
- JSON output now supports unencoded unicode characters
|
||||
- JSON output is now more compact unless the -p (pretty) option is used
|
||||
- Developer scripts added and enhanced to automate documentation and man page creation
|
||||
- Enhanced man page
|
||||
|
||||
20210305 v1.14.4
|
||||
- Packaging fix only for binaries and RPMs hosted on https://github.com/kellyjonbrazil/jc-packaging.
|
||||
Packages from PyPi and OS repositories are not affected. This fixes an issue that kept the YAML
|
||||
parser from initializing.
|
||||
|
||||
20210210 v1.14.3
|
||||
- Add hciconfig parser tested on linux
|
||||
- Update dig parser to simplify answer data logic
|
||||
|
||||
20210205 v1.14.2
|
||||
- Update dig parser to fix cases where there are spaces in the answer data (e.g. TXT records)
|
||||
|
||||
20210106 v1.14.1
|
||||
- Add iw-scan parser tested on linux (beta)
|
||||
- Update date parser for Ubuntu 20.04 support
|
||||
- Update last parser for last -F support
|
||||
- Update last parser to add convenience fields and augment data for easier parsing
|
||||
- Update man page
|
||||
- Minor documentation updates
|
||||
|
||||
20201231 v1.14.0
|
||||
- Add hashsum parser tested on linux, macos
|
||||
- Add hash parser tested on linux, macos
|
||||
- Add cksum parser tested on linux, macos
|
||||
- Add wc parser tested on linux, macos
|
||||
- Add printenv support under env parser
|
||||
- Add vdir support under ls parser
|
||||
- Add python 3.9 to github automation tests
|
||||
|
||||
20200805 v1.13.4
|
||||
- Update crontab and crontab-u parsers to tighten up variable detection
|
||||
- Update ping parser to tighten linux/bsd detection
|
||||
|
||||
20200804 v1.13.3
|
||||
- Update ping parser for Raspberry Pi compatibility
|
||||
|
||||
20200803 v1.13.2
|
||||
- Add key/value file parser (wrapper for ini parser)
|
||||
- Add date command parser
|
||||
- Update traceroute parser to more gracefully handle missing header row
|
||||
- Update traceroute parser to handle annotations
|
||||
- Update traceroute parser to only return successful probes
|
||||
|
||||
20200727 v1.13.1
|
||||
- Add route -6 tests
|
||||
|
||||
20200727 v1.13.0
|
||||
- Add ping and ping6 command parser tested on linux, macos, and freebsd
|
||||
- Add traceroute and traceroute6 command parser tested on linux, macos, and freebsd
|
||||
- Add tracepath command parser tested on linux
|
||||
- Update ini parser to support files only containing key/value pairs
|
||||
- Update uname parser exception with a hint to use "uname -a"
|
||||
- Update route parser to support IPv6 tables
|
||||
|
||||
20200711 v1.12.1
|
||||
- Fix tests when using older version of pygments library
|
||||
|
||||
20200710 v1.12.0
|
||||
- Add sysctl command parser tested on linux, macOS, and freebsd
|
||||
- Update the cli code to allow older versions of the pygments library (2.3.0) for debian packaging
|
||||
- Code cleanup on the cli
|
||||
- Add tests for the cli
|
||||
- Vendorize cgitb as tracebackplus for verbose debug messages
|
||||
|
||||
20200625 v1.11.8
|
||||
- Add verbose debug option using -dd argument
|
||||
|
||||
20200622 v1.11.7
|
||||
- Fix iptables parser issue which would not output the last chain
|
||||
|
||||
20200614 v1.11.6
|
||||
- Improve and standardize empty data check for all parsers
|
||||
|
||||
20200612 v1.11.5
|
||||
- Update airport_s parser to fix error on parsing empty data
|
||||
- Update arp parser to fix error on parsing empty data
|
||||
- Update blkid parser to fix error on parsing empty data
|
||||
- Update crontab parser to fix error on parsing empty data
|
||||
- Update crontab_u parser to fix error on parsing empty data
|
||||
- Update df parser to fix error on parsing empty data
|
||||
- Update free parser to fix error on parsing empty data
|
||||
- Update lsblk parser to fix error on parsing empty data
|
||||
- Update lsmod parser to fix error on parsing empty data
|
||||
- Update mount parser to fix error on parsing empty data
|
||||
- Update netstat parser to fix error on parsing empty data
|
||||
- Update ntpq parser to fix error on parsing empty data
|
||||
- Update ps parser to fix error on parsing empty data
|
||||
- Update route parser to fix error on parsing empty data
|
||||
- Update systemctl parser to fix error on parsing empty data
|
||||
- Update systemctl_lj parser to fix error on parsing empty data
|
||||
- Update systemctl_ls parser to fix error on parsing empty data
|
||||
- Update systemctl_luf parser to fix error on parsing empty data
|
||||
- Update uptime parser to fix error on parsing empty data
|
||||
- Update w parser to fix error on parsing empty data
|
||||
- Update xml parser to fix error on parsing empty data
|
||||
- Add tests to all parsers for no data condition
|
||||
- Update ss parser to fix integer fields
|
||||
|
||||
20200610 v1.11.4
|
||||
- Update ls parser to fix error on parsing an empty directory
|
||||
|
||||
20200609 v1.11.3
|
||||
- Add local parser plugin feature (contributed by Dean Serenevy)
|
||||
|
||||
20200530 v1.11.2
|
||||
- Update netstat parser to add freebsd support
|
||||
- Update netstat parser to add route_flags_pretty field
|
||||
- Update netstat parser to change osx_inode field name to unix_inode
|
||||
- Update netstat parser to change osx_flags field name to unix_flags
|
||||
- Update netstat parser to strip whitespace from state field
|
||||
- Update route parser to add flags_pretty field
|
||||
- Update arp parser to add permanent field (freebsd and osx)
|
||||
- Update arp parser to add expires field (freebsd)
|
||||
- Update w parser to strip whitespace from what field
|
||||
- Update last parser to fix FreeBSD issues
|
||||
- Update stat parser to change osx_flags field name to unix_flags
|
||||
- Update stat parser to add unix_device field for freebsd and osx
|
||||
- Fix freebsd compatibility message for df, fstab, mount, ntpq, stat, and uname parsers
|
||||
- Fix compatibility message for platforms that include the version number at the end (e.g. freebsd12)
|
||||
|
||||
20200523 v1.11.1
|
||||
- Update stat command parser to change osx_flags field to string
|
||||
|
||||
20200522 v1.11.0
|
||||
- Add dmidecode command parser
|
||||
- Update stat command parser to add OSX support
|
||||
- Update netstat command parser to add OSX support
|
||||
- Update netstat command parser to add -r (route) functionality for linux and OSX
|
||||
- Update netstat command parser to add -i (interface) functionality for linux and OSX
|
||||
|
||||
20200511 v1.10.12
|
||||
- Remove shebang from jc/cli.py for Fedora packaging
|
||||
|
||||
20200511 v1.10.11
|
||||
- Change file permissions for Fedora packaging
|
||||
|
||||
20200509 v1.10.10
|
||||
- Fix ls parser issue where the first file was skipped for ls -R on some platforms
|
||||
- Update last parser to handle 'gone - no logout' condition
|
||||
- Update netstat parser to handle bluetooth section (ignore gracefully for now)
|
||||
|
||||
20200508 v1.10.9
|
||||
- Add license info to vendorized ifconfig-parser class
|
||||
|
||||
20200508 v1.10.8
|
||||
- Add license file to dist for Fedora RPM packaging requirements
|
||||
- Remove tests from package to keep from polluting the global site-packages
|
||||
|
||||
20200501 v1.10.7
|
||||
- Requirements modifications for Fedora RPM packaging requirements
|
||||
|
||||
20200420 v1.10.6
|
||||
- Remove homebrew shim references from du osx tests
|
||||
|
||||
20200414 v1.10.5
|
||||
- Minor change of using sys.exit(0) instead of exit()
|
||||
|
||||
20200412 v1.10.4
|
||||
- Add color customization via JC_COLORS env variable
|
||||
|
||||
20200409 v1.10.3
|
||||
- Fix break on pipe error
|
||||
|
||||
20200409 v1.10.2
|
||||
- Change colors to ansi and match jello colors
|
||||
|
||||
20200402 v1.10.1
|
||||
- Code cleanup
|
||||
|
||||
20200402 v1.10.0
|
||||
- Add color output by default when not piping data to another program
|
||||
- Add -m option for monochrome output
|
||||
|
||||
20200326 v1.9.3
|
||||
- Add axfr support for dig command parser
|
||||
|
||||
20200312 v1.9.2
|
||||
- Update arp parser to fix OSX detection for some edge cases
|
||||
|
||||
20200312 v1.9.1
|
||||
- Update file command parser to make filename splitting more robust
|
||||
|
||||
20200311 v1.9.0
|
||||
- Add ntpq command parser
|
||||
- Add timedatectl status command parser
|
||||
- Add airport -I and airport -s command parser
|
||||
- Add file command parser
|
||||
- Optimized history command parser by https://github.com/philippeitis
|
||||
- Magic syntax fix for certain edge cases
|
||||
|
||||
20200308 v1.8.1
|
||||
- CLI optimizations by https://github.com/philippeitis
|
||||
- Refactored magic syntax function and added tests (https://github.com/philippeitis)
|
||||
- Github actions for CI testing on multiple platforms by https://github.com/philippeitis
|
||||
- Update ls parser to fix parsing error in OSX with -lR when there are empty folders
|
||||
|
||||
20200303 v1.8.0
|
||||
- Add blkid command parser
|
||||
- Add last and lastb command parser
|
||||
- Add who command parser
|
||||
- Add CSV file parser
|
||||
- Add /etc/passwd file parser
|
||||
- Add /etc/shadow file parser
|
||||
- Add /etc/group file parser
|
||||
- Add /etc/gshadow file parser
|
||||
|
||||
20200227 v1.7.5
|
||||
- Update ls parser to support filenames with newline characters
|
||||
|
||||
20200219 v1.7.4
|
||||
- Update ls parser to support multiple directories, globbing, and -R (recursive)
|
||||
|
||||
20200211 v1.7.3
|
||||
- Add alternative 'magic' syntax: e.g. `jc ls -al`
|
||||
- Options can now be condensed (e.g. -prq is equivalent to -p -r -q)
|
||||
|
||||
20200208 v1.7.2
|
||||
- Include test fixtures in wheel and sdist
|
||||
|
||||
20200205 v1.7.1
|
||||
- Add YAML file parser
|
||||
- Add INI file parser
|
||||
- Add XML file parser
|
||||
- Add id parser (tested on linux and OSX)
|
||||
- Add crontab file parser with user support (tested on linux)
|
||||
- Add __version__ variable to parser modules
|
||||
- Add exit code on error
|
||||
- Update history parser to output "line" as an integer
|
||||
- Update compatibility list for some parsers
|
||||
- Bugfix in crontab file parser: header insertion was clobbering first row
|
||||
- Just-in-time loading of parser modules instead of loading all at start
|
||||
|
||||
20191217 v1.6.1
|
||||
- Add du parser (tested on linux and OSX)
|
||||
- Add crontab parser (tested on linux and OSX)
|
||||
- Add pip list parser (tested on linux and OSX)
|
||||
- Add pip show parser (tested on linux and OSX)
|
||||
- Add OSX support for the ifconfig, arp, df, mount, and uname parsers
|
||||
- Add tests for ls, dig, ps, w, uptime on OSX
|
||||
- Add about option
|
||||
- Add universal parsers to refactor repetitive code
|
||||
- Update ifconfig parser to output 'state' as an array
|
||||
|
||||
20191117 v1.5.1
|
||||
- Add ss parser
|
||||
- Add stat parser
|
||||
- Add /etc/hosts parser
|
||||
- Add /etc/fstab parser
|
||||
- Add systemctl parser (includes list-jobs, list-sockets, and list-unit-files)
|
||||
- Add -r and raw=True options. By default, jc will now convert numbers and boolean, if possible, and add other semantic information, while the raw output will keep all values as text and provide a more literal JSON output
|
||||
- Add -q and quiet=True options to suppress warnings to stderr
|
||||
- Add -d option to debug parsing issues
|
||||
- Add compatibility warnings to stderr
|
||||
- Add documentation
|
||||
- Update iptables parser to allow --line-numbers option
|
||||
- Update lsblk parser to allow parsing of added columns
|
||||
- Update mount parser: changed 'access' field name to 'options'
|
||||
- Update netstat parser to allow parsing of unix sockets and raw network connections
|
||||
- Update w parser to fix unaligned data where blanks are possible
|
||||
- Clean up code and reorganize package
|
||||
|
||||
20191031 v1.1.1
|
||||
- Add arp parser
|
||||
- Add dig parser
|
||||
- Add unit tests
|
||||
- fix netstat parser (remove side effects due to global variable)
|
||||
|
||||
20191025 v1.0.1
|
||||
- Add w parser
|
||||
- Add uptime parser
|
||||
- Add history parser
|
||||
- Flatten env parser output
|
||||
- Remove problematic characters from key names in: df, free, history, lsblk, lsof, and w
|
||||
- Where possible, lowercase all keys (except cases like env where the key is the variable name)
|
||||
- Remove integer values
|
||||
- Handle CTRL-C gracefully
|
||||
|
||||
20191023 v0.9.1
|
||||
- Add jobs parser
|
||||
- Add lsof parser
|
||||
- Add lsmod parser
|
||||
- No blocking if no piped data
|
||||
- Better help text
|
||||
- Clean up iptables parser code
|
||||
|
||||
20191022 v0.8.1
|
||||
- Add env parser
|
||||
- Add df parser
|
||||
- Add free parser
|
||||
- Add lsblk parser
|
||||
- Add mount parser
|
||||
- Add uname parser
|
||||
- Add iptables parser
|
||||
|
||||
20191021 v0.6.4
|
||||
- Flatten netstat parser output
|
||||
- Clean up argument parsing
|
||||
- Fix command help
|
||||
|
||||
20191018 v0.5.5
|
||||
- Fix netstat -p parsing for Ubuntu
|
||||
- Add ps parser
|
||||
- Add route parser
|
||||
- ls parser fixes
|
||||
|
||||
20191017 v0.2.0
|
||||
- ifconfig, ls, and netstat support
|
||||
174
CONTRIBUTING.md
Normal file
174
CONTRIBUTING.md
Normal file
@@ -0,0 +1,174 @@
|
||||
# Contributing to jc
|
||||
We love your input! We want to make contributing to this project as easy and
|
||||
transparent as possible, whether it's:
|
||||
|
||||
- Reporting a bug
|
||||
- Discussing the current state of the code
|
||||
- Submitting a fix
|
||||
- Proposing new features
|
||||
- Proposing a new parser
|
||||
|
||||
## We Develop with Github
|
||||
We use github to host code, to track issues and feature requests, as well as
|
||||
accept pull requests.
|
||||
|
||||
## We Use Github Flow, So All Code Changes Happen Through Pull Requests
|
||||
Pull requests are the best way to propose changes to the codebase (we use
|
||||
[Github Flow](https://guides.github.com/introduction/flow/index.html)). We
|
||||
actively welcome your pull requests:
|
||||
|
||||
1. Open an issue to discuss the new feature, bug fix, or parser before opening
|
||||
a pull request. For new parsers, it is important to agree upon a schema
|
||||
before developing the parser.
|
||||
2. Fork the repo and create your branch from `dev`, if available, otherwise
|
||||
`master`.
|
||||
3. For new parsers:
|
||||
- Templates: Use the [`jc/parsers/foo.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/foo.py)
|
||||
or [`jc/parsers/foo_s.py (streaming)`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/foo_s.py)
|
||||
parsers as a template to get started.
|
||||
- Local development: You can even place a new parser python module file in
|
||||
the [parser plugin directory](https://github.com/kellyjonbrazil/jc#parser-plugins)
|
||||
to get started right away with just a standard `jc` installation.
|
||||
- Parser registry: Add the parser name to the [jc/lib.py](https://github.com/kellyjonbrazil/jc/blob/master/jc/lib.py)
|
||||
file.
|
||||
4. If you've added code that should be tested, add tests. All new parsers should
|
||||
have several sample outputs and tests.
|
||||
- Templates:
|
||||
- **Recommended:** [tests/templates/_test_foo_simple.py](https://github.com/kellyjonbrazil/jc/tree/master/tests/templates/_test_foo_simple.py) as a template if you only have test with fixtures.
|
||||
Execute these steps for standard tests:
|
||||
- Save this file as `test_{parser_name}.py` since the helper methods extract parser names from the filename. Use underscores instead of dashes for the parser name.
|
||||
- Organize fixtures in `tests/fixtures` for optimal structure.
|
||||
- Format fixtures as follows (using double dashes):
|
||||
- `{parser_name}--{some_test_description}.out` for command output. (no dots in the filename except for the `.out` suffix)
|
||||
- `{parser_name}--{some_test_description}.json` for expected JSON after parsing. (no dots in the filename except for the `.json` suffix)
|
||||
- Custom: [tests/templates/_test_foo.py](https://github.com/kellyjonbrazil/jc/blob/master/tests/templates/_test_foo.py) as a template for tests.
|
||||
- Custom: [tests/templates/_test_foo_s.py](https://github.com/kellyjonbrazil/jc/tree/master/tests/templates/_test_foo_s.py) as a template for **streaming parser** tests.
|
||||
- Fixtures: Tests typically consist of an input file and an expected output
|
||||
JSON file. Add the data files to the appropriate folder under [tests/fixtures](https://github.com/kellyjonbrazil/jc/tree/master/tests/fixtures)
|
||||
5. Documentation is auto-generated from docstrings, so ensure they are clear and
|
||||
accurate.
|
||||
6. Ensure the test suite passes. (Note: "**America/Los_Angeles**" timezone
|
||||
should be configured on the test system)
|
||||
7. Make sure your code lints.
|
||||
8. Issue that pull request!
|
||||
|
||||
## Documentation And Completions
|
||||
|
||||
No need to worry about documentation and completions as those are auto generated
|
||||
via the python doc strings.
|
||||
|
||||
## Parser Schema Guidelines
|
||||
- Try to keep the schema as flat as possible - typically a list of flat
|
||||
dictionaries
|
||||
- Keys should be lowercase, contain no special characters, and spaces should be
|
||||
converted to underscores
|
||||
- Keys should be static, if possible. If they have to be dynamic, then they
|
||||
should not contain lists or dictionaries
|
||||
|
||||
This will make it easier to use tools like `jq` without requiring escaping of
|
||||
special characters, encapsulating key names in `[""]`, keeps paths predictable,
|
||||
and makes iterating and searching for values easier.
|
||||
|
||||
**Examples**
|
||||
|
||||
Bad:
|
||||
```json
|
||||
{
|
||||
"Interface 1": [
|
||||
"192.168.1.1",
|
||||
"172.16.1.1"
|
||||
],
|
||||
"Wifi Interface 1": [
|
||||
"10.1.1.1"
|
||||
]
|
||||
}
|
||||
```
|
||||
Good:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"interface": "Interface 1",
|
||||
"ip_addresses": [
|
||||
"192.168.1.1",
|
||||
"172.16.1.1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"interface": "Wifi Interface 1",
|
||||
"ip_addresses": [
|
||||
"10.1.1.1"
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Development Environment
|
||||
Use the following steps to set up the development environment.
|
||||
|
||||
### Virtual Environment
|
||||
Set up a Python virtual environment for `jc` development so you won't have to
|
||||
worry about library conflicts. This can be done with something like
|
||||
[pyenv](https://github.com/pyenv/pyenv) and/or
|
||||
[venv](https://docs.python.org/3/library/venv.html)
|
||||
|
||||
### Clone the repo
|
||||
Once the virtual environment is set up, clone the `jc` repository inside:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/kellyjonbrazil/jc.git
|
||||
```
|
||||
|
||||
### Install In Developer Mode
|
||||
Next, use the `./install.sh` script to install `jc` and the requirements in
|
||||
developer mode (code chages take effect immediately). This will install the
|
||||
console-script entry point to `$HOME/.local/bin` so you may need to add this
|
||||
to your path.
|
||||
|
||||
## Tests
|
||||
It is essential to have good command output sample coverage and tests to keep
|
||||
the `jc` parser quality high.
|
||||
|
||||
Many parsers include calculated timestamp fields using the `jc.utils.timestamp`
|
||||
class. Naive timestamps created with this class should be generated on a system
|
||||
configured with the "**America/Los_Angeles**" timezone on linux/macOS/unix and
|
||||
"**Pacific Standard Time**" timezone on Windows for tests to pass on the Github
|
||||
Actions CI tests. This timezone should be configured on your local system before
|
||||
running the tests locally, as well.
|
||||
|
||||
You can run all tests by running the `./runtests.sh` script.
|
||||
|
||||
## Debug Messages
|
||||
|
||||
Use `--debug` or `-d` to see debug error messages (double to see more):
|
||||
|
||||
```shell
|
||||
echo 'abc' | jc --parser-with-error -dd
|
||||
```
|
||||
|
||||
## Any contributions you make will be under the MIT Software License
|
||||
In short, when you submit code changes, your submissions are understood to be
|
||||
under the same [MIT License](http://choosealicense.com/licenses/mit/) that
|
||||
covers the project. Feel free to contact the maintainers if that's a concern.
|
||||
|
||||
## Report bugs using Github's Issues
|
||||
We use GitHub issues to track public bugs. Report a bug by
|
||||
[opening a new issue](https://github.com/kellyjonbrazil/jc/issues); it's that
|
||||
easy!
|
||||
|
||||
## Write bug reports with detail, background, and sample code
|
||||
|
||||
**Great Bug Reports** tend to have:
|
||||
|
||||
- A quick summary and/or background
|
||||
- Steps to reproduce
|
||||
- Be specific!
|
||||
- Give sample code if you can.
|
||||
- What you expected would happen
|
||||
- What actually happens
|
||||
- Notes (possibly including why you think this might be happening, or stuff you
|
||||
tried that didn't work)
|
||||
|
||||
## Use a Consistent Coding Style
|
||||
|
||||
* 4 spaces for indentation rather than tabs
|
||||
* Use a Python linter that will enforce PEP 8 and other best practices
|
||||
4814
EXAMPLES.md
Normal file
4814
EXAMPLES.md
Normal file
File diff suppressed because it is too large
Load Diff
2
LICENSE.md
Executable file → Normal file
2
LICENSE.md
Executable file → Normal file
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Kelly Brazil
|
||||
Copyright (c) 2020 Kelly Brazil
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
3
MANIFEST.in
Normal file
3
MANIFEST.in
Normal file
@@ -0,0 +1,3 @@
|
||||
include jc/py.typed
|
||||
include man/jc.1
|
||||
include CHANGELOG
|
||||
75
README-snap.md
Normal file
75
README-snap.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# How to use `jc` with `snap`
|
||||
|
||||
## How to build `snap` package
|
||||
|
||||
- Install `snapd`. [One](https://snapcraft.io/docs/installing-snapd) or [two](https://github.com/don-rumata/ansible-role-install-snap).
|
||||
|
||||
- Install `snapcraft`:
|
||||
|
||||
```bash
|
||||
$ sudo snap install snapcraft --classic
|
||||
```
|
||||
|
||||
- Update snapd:
|
||||
|
||||
```bash
|
||||
$ sudo snap refresh snapcraft --edge
|
||||
```
|
||||
|
||||
- Clone the repo:
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/kellyjonbrazil/jc
|
||||
```
|
||||
|
||||
- Change the directory:
|
||||
|
||||
```bash
|
||||
$ cd ./jc
|
||||
```
|
||||
|
||||
- Select branch:
|
||||
|
||||
```bash
|
||||
$ git checkout snap-support
|
||||
```
|
||||
|
||||
- Initialize LXD:
|
||||
|
||||
```bash
|
||||
$ lxd init --auto
|
||||
```
|
||||
|
||||
- Build `.snap` file:
|
||||
|
||||
```bash
|
||||
$ snapcraft
|
||||
```
|
||||
|
||||
## How to install local snap file
|
||||
|
||||
```bash
|
||||
$ snap install --dangerous ./jc_*_amd64.snap
|
||||
```
|
||||
|
||||
## How to use `jc` with plugins
|
||||
|
||||
- Put your plugin in the `"$HOME/.local/share/jc"` directory.
|
||||
|
||||
- To connect the directory, run:
|
||||
|
||||
```bash
|
||||
snap connect jc:dot-jc-plugins snapd
|
||||
```
|
||||
|
||||
## Urls
|
||||
|
||||
- <https://snapcraft.io/docs/supported-interfaces>
|
||||
|
||||
- <https://snapcraft.io/docs/interface-management>
|
||||
|
||||
- <https://snapcraft.io/docs/personal-files-interface>
|
||||
|
||||
- <https://snapcraft.io/docs/python-apps>
|
||||
|
||||
- <https://documentation.ubuntu.com/lxd/en/latest/getting_started/>
|
||||
@@ -1 +1,2 @@
|
||||
theme: jekyll-theme-cayman
|
||||
theme: jekyll-theme-cayman
|
||||
markdown: GFM
|
||||
|
||||
9
build-completions.py
Executable file
9
build-completions.py
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
# build Bash and Zsh completion scripts and add to the completions folder
|
||||
from jc.shell_completions import bash_completion, zsh_completion
|
||||
|
||||
with open('completions/jc_bash_completion.sh', 'w') as f:
|
||||
print(bash_completion(), file=f)
|
||||
|
||||
with open('completions/jc_zsh_completion.sh', 'w') as f:
|
||||
print(zsh_completion(), file=f)
|
||||
@@ -1,77 +0,0 @@
|
||||
jc changelog
|
||||
|
||||
20191217 v1.6.1
|
||||
- Add du parser (tested on linux and OSX)
|
||||
- Add crontab parser (tested on linux and OSX)
|
||||
- Add pip list parser (tested on linux and OSX)
|
||||
- Add pip show parser (tested on linux and OSX)
|
||||
- Add OSX support for the ifconfig, arp, df, mount, and uname parsers
|
||||
- Add tests for ls, dig, ps, w, uptime on OSX
|
||||
- Add about option
|
||||
- Add universal parsers to refactor repetitive code
|
||||
- Updated ifconfig parser to output 'state' as an array
|
||||
|
||||
20191117 v1.5.1
|
||||
- Add ss parser
|
||||
- Add stat parser
|
||||
- Add /etc/hosts parser
|
||||
- Add /etc/fstab parser
|
||||
- Add systemctl parser (includes list-jobs, list-sockets, and list-unit-files)
|
||||
- Add -r and raw=True options. By default, jc will now convert numbers and boolean, if possible, and add other semantic information, while the raw output will keep all values as text and provide a more literal JSON output
|
||||
- Add -q and quiet=True options to suppress warnings to stderr
|
||||
- Add -d option to debug parsing issues
|
||||
- Add compatibility warnings to stderr
|
||||
- Add documentation
|
||||
- Updated iptables parser to allow --line-numbers option
|
||||
- Updated lsblk parser to allow parsing of added columns
|
||||
- Updated mount parser: changed 'access' field name to 'options'
|
||||
- Updated netstat parser to allow parsing of unix sockets and raw network connections
|
||||
- Updated w parser to fix unaligned data where blanks are possible
|
||||
- Clean up code and reorganize package
|
||||
|
||||
20191031 v1.1.1
|
||||
- Add arp parser
|
||||
- Add dig parser
|
||||
- Add unit tests
|
||||
- fix netstat parser (remove side effects due to global variable)
|
||||
|
||||
20191025 v1.0.1
|
||||
- Add w parser
|
||||
- Add uptime parser
|
||||
- Add history parser
|
||||
- Flatten env parser output
|
||||
- Remove problematic characters from key names in: df, free, history, lsblk, lsof, and w
|
||||
- Where possible, lowercase all keys (except cases like env where the key is the variable name)
|
||||
- Remove integer values
|
||||
- Handle CTRL-C gracefully
|
||||
|
||||
20191023 v0.9.1
|
||||
- Add jobs parser
|
||||
- Add lsof parser
|
||||
- Add lsmod parser
|
||||
- No blocking if no piped data
|
||||
- Better help text
|
||||
- Clean up iptables parser code
|
||||
|
||||
20191022 v0.8.1
|
||||
- Add env parser
|
||||
- Add df parser
|
||||
- Add free parser
|
||||
- Add lsblk parser
|
||||
- Add mount parser
|
||||
- Add uname parser
|
||||
- Add iptables parser
|
||||
|
||||
20191021 v0.6.4
|
||||
- Flatten netstat parser output
|
||||
- Clean up argument parsing
|
||||
- Fix command help
|
||||
|
||||
20191018 v0.5.5
|
||||
- Fix netstat -p parsing for Ubuntu
|
||||
- Add ps parser
|
||||
- Add route parser
|
||||
- ls parser fixes
|
||||
|
||||
20191017 v0.2.0
|
||||
- ifconfig, ls, and netstat support
|
||||
90
completions/jc_bash_completion.sh
Normal file
90
completions/jc_bash_completion.sh
Normal file
@@ -0,0 +1,90 @@
|
||||
_jc()
|
||||
{
|
||||
local cur prev words cword jc_commands jc_parsers jc_options \
|
||||
jc_about_options jc_about_mod_options jc_help_options jc_special_options
|
||||
|
||||
jc_commands=(acpi airport arp blkid bluetoothctl cbt certbot chage cksum crontab curl date debconf-show df dig dmidecode dpkg du efibootmgr env file findmnt finger free git gpg hciconfig host id ifconfig iostat ip iptables iw iwconfig jobs last lastb ls lsattr lsb_release lsblk lsmod lsof lspci lsusb md5 md5sum mdadm mount mpstat netstat nmcli nsd-control ntpq os-prober pidstat ping ping6 pip pip3 postconf printenv ps route rpm rsync sfdisk sha1sum sha224sum sha256sum sha384sum sha512sum shasum ss ssh sshd stat sum swapon sysctl systemctl systeminfo timedatectl top tracepath tracepath6 traceroute traceroute6 tune2fs udevadm ufw uname update-alternatives upower uptime vdir veracrypt vmstat w wc who xrandr zipinfo zpool)
|
||||
jc_parsers=(--acpi --airport --airport-s --arp --asciitable --asciitable-m --blkid --bluetoothctl --cbt --cef --cef-s --certbot --chage --cksum --clf --clf-s --crontab --crontab-u --csv --csv-s --curl-head --date --datetime-iso --debconf-show --df --dig --dir --dmidecode --dpkg-l --du --efibootmgr --email-address --env --file --find --findmnt --finger --free --fstab --git-log --git-log-s --git-ls-remote --gpg --group --gshadow --hash --hashsum --hciconfig --history --host --hosts --http-headers --id --ifconfig --ini --ini-dup --iostat --iostat-s --ip-address --iptables --ip-route --iw-scan --iwconfig --jar-manifest --jobs --jwt --kv --kv-dup --last --ls --ls-s --lsattr --lsb-release --lsblk --lsmod --lsof --lspci --lsusb --m3u --mdadm --mount --mpstat --mpstat-s --netstat --nmcli --nsd-control --ntpq --openvpn --os-prober --os-release --passwd --path --path-list --pci-ids --pgpass --pidstat --pidstat-s --ping --ping-s --pip-list --pip-show --pkg-index-apk --pkg-index-deb --plist --postconf --proc --proc-buddyinfo --proc-cmdline --proc-consoles --proc-cpuinfo --proc-crypto --proc-devices --proc-diskstats --proc-filesystems --proc-interrupts --proc-iomem --proc-ioports --proc-loadavg --proc-locks --proc-meminfo --proc-modules --proc-mtrr --proc-pagetypeinfo --proc-partitions --proc-slabinfo --proc-softirqs --proc-stat --proc-swaps --proc-uptime --proc-version --proc-vmallocinfo --proc-vmstat --proc-zoneinfo --proc-driver-rtc --proc-net-arp --proc-net-dev --proc-net-dev-mcast --proc-net-if-inet6 --proc-net-igmp --proc-net-igmp6 --proc-net-ipv6-route --proc-net-netlink --proc-net-netstat --proc-net-packet --proc-net-protocols --proc-net-route --proc-net-tcp --proc-net-unix --proc-pid-fdinfo --proc-pid-io --proc-pid-maps --proc-pid-mountinfo --proc-pid-numa-maps --proc-pid-smaps --proc-pid-stat --proc-pid-statm --proc-pid-status --ps --resolve-conf --route --rpm-qi --rsync --rsync-s --semver --sfdisk --shadow --srt --ss --ssh-conf --sshd-conf --stat --stat-s --swapon --sysctl --syslog --syslog-s --syslog-bsd --syslog-bsd-s --systemctl --systemctl-lj --systemctl-ls --systemctl-luf --systeminfo --time --timedatectl --timestamp --toml --top --top-s --tracepath --traceroute --tune2fs --udevadm --ufw --ufw-appinfo --uname --update-alt-gs --update-alt-q --upower --uptime --url --ver --veracrypt --vmstat --vmstat-s --w --wc --who --x509-cert --x509-csr --xml --xrandr --yaml --zipinfo --zpool-iostat --zpool-status)
|
||||
jc_options=(--force-color -C --debug -d --monochrome -m --meta-out -M --pretty -p --quiet -q --raw -r --slurp -s --unbuffer -u --yaml-out -y)
|
||||
jc_about_options=(--about -a)
|
||||
jc_about_mod_options=(--pretty -p --yaml-out -y --monochrome -m --force-color -C)
|
||||
jc_help_options=(--help -h)
|
||||
jc_special_options=(--version -v --bash-comp -B --zsh-comp -Z)
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur prev words cword
|
||||
|
||||
# if jc_about_options are found anywhere in the line, then only complete from jc_about_mod_options
|
||||
for i in "${words[@]::${#words[@]}-1}"; do
|
||||
if [[ " ${jc_about_options[*]} " =~ " ${i} " ]]; then
|
||||
COMPREPLY=( $( compgen -W "${jc_about_mod_options[*]}" \
|
||||
-- "${cur}" ) )
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# if jc_help_options and a parser are found anywhere in the line, then no more completions
|
||||
if
|
||||
(
|
||||
for i in "${words[@]::${#words[@]}-1}"; do
|
||||
if [[ " ${jc_help_options[*]} " =~ " ${i} " ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
) && (
|
||||
for i in "${words[@]::${#words[@]}-1}"; do
|
||||
if [[ " ${jc_parsers[*]} " =~ " ${i} " ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
); then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# if jc_help_options are found anywhere in the line, then only complete with parsers
|
||||
for i in "${words[@]::${#words[@]}-1}"; do
|
||||
if [[ " ${jc_help_options[*]} " =~ " ${i} " ]]; then
|
||||
COMPREPLY=( $( compgen -W "${jc_parsers[*]}" \
|
||||
-- "${cur}" ) )
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# if special options are found anywhere in the line, then no more completions
|
||||
for i in "${words[@]::${#words[@]}-1}"; do
|
||||
if [[ " ${jc_special_options[*]} " =~ " ${i} " ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# if magic command is found anywhere in the line, use called command's autocompletion
|
||||
for i in "${words[@]::${#words[@]}-1}"; do
|
||||
if [[ " ${jc_commands[*]} " =~ " ${i} " ]]; then
|
||||
_command
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# if "/pr[oc]" (magic for Procfile parsers) is in the current word, complete with files/directories in the path
|
||||
if [[ "${cur}" =~ "/pr" ]]; then
|
||||
_filedir
|
||||
return 0
|
||||
fi
|
||||
|
||||
# if a parser arg is found anywhere in the line, only show options and help options
|
||||
for i in "${words[@]::${#words[@]}-1}"; do
|
||||
if [[ " ${jc_parsers[*]} " =~ " ${i} " ]]; then
|
||||
COMPREPLY=( $( compgen -W "${jc_options[*]} ${jc_help_options[*]}" \
|
||||
-- "${cur}" ) )
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# default completion
|
||||
COMPREPLY=( $( compgen -W "${jc_options[*]} ${jc_about_options[*]} ${jc_help_options[*]} ${jc_special_options[*]} ${jc_parsers[*]} ${jc_commands[*]}" \
|
||||
-- "${cur}" ) )
|
||||
} &&
|
||||
complete -F _jc jc
|
||||
|
||||
470
completions/jc_zsh_completion.sh
Normal file
470
completions/jc_zsh_completion.sh
Normal file
@@ -0,0 +1,470 @@
|
||||
#compdef jc
|
||||
|
||||
_jc() {
|
||||
local -a jc_commands jc_commands_describe \
|
||||
jc_parsers jc_parsers_describe \
|
||||
jc_options jc_options_describe \
|
||||
jc_about_options jc_about_options_describe \
|
||||
jc_about_mod_options jc_about_mod_options_describe \
|
||||
jc_help_options jc_help_options_describe \
|
||||
jc_special_options jc_special_options_describe
|
||||
|
||||
jc_commands=(acpi airport arp blkid bluetoothctl cbt certbot chage cksum crontab curl date debconf-show df dig dmidecode dpkg du efibootmgr env file findmnt finger free git gpg hciconfig host id ifconfig iostat ip iptables iw iwconfig jobs last lastb ls lsattr lsb_release lsblk lsmod lsof lspci lsusb md5 md5sum mdadm mount mpstat netstat nmcli nsd-control ntpq os-prober pidstat ping ping6 pip pip3 postconf printenv ps route rpm rsync sfdisk sha1sum sha224sum sha256sum sha384sum sha512sum shasum ss ssh sshd stat sum swapon sysctl systemctl systeminfo timedatectl top tracepath tracepath6 traceroute traceroute6 tune2fs udevadm ufw uname update-alternatives upower uptime vdir veracrypt vmstat w wc who xrandr zipinfo zpool)
|
||||
jc_commands_describe=(
|
||||
'acpi:run "acpi" command with magic syntax.'
|
||||
'airport:run "airport" command with magic syntax.'
|
||||
'arp:run "arp" command with magic syntax.'
|
||||
'blkid:run "blkid" command with magic syntax.'
|
||||
'bluetoothctl:run "bluetoothctl" command with magic syntax.'
|
||||
'cbt:run "cbt" command with magic syntax.'
|
||||
'certbot:run "certbot" command with magic syntax.'
|
||||
'chage:run "chage" command with magic syntax.'
|
||||
'cksum:run "cksum" command with magic syntax.'
|
||||
'crontab:run "crontab" command with magic syntax.'
|
||||
'curl:run "curl" command with magic syntax.'
|
||||
'date:run "date" command with magic syntax.'
|
||||
'debconf-show:run "debconf-show" command with magic syntax.'
|
||||
'df:run "df" command with magic syntax.'
|
||||
'dig:run "dig" command with magic syntax.'
|
||||
'dmidecode:run "dmidecode" command with magic syntax.'
|
||||
'dpkg:run "dpkg" command with magic syntax.'
|
||||
'du:run "du" command with magic syntax.'
|
||||
'efibootmgr:run "efibootmgr" command with magic syntax.'
|
||||
'env:run "env" command with magic syntax.'
|
||||
'file:run "file" command with magic syntax.'
|
||||
'findmnt:run "findmnt" command with magic syntax.'
|
||||
'finger:run "finger" command with magic syntax.'
|
||||
'free:run "free" command with magic syntax.'
|
||||
'git:run "git" command with magic syntax.'
|
||||
'gpg:run "gpg" command with magic syntax.'
|
||||
'hciconfig:run "hciconfig" command with magic syntax.'
|
||||
'host:run "host" command with magic syntax.'
|
||||
'id:run "id" command with magic syntax.'
|
||||
'ifconfig:run "ifconfig" command with magic syntax.'
|
||||
'iostat:run "iostat" command with magic syntax.'
|
||||
'ip:run "ip" command with magic syntax.'
|
||||
'iptables:run "iptables" command with magic syntax.'
|
||||
'iw:run "iw" command with magic syntax.'
|
||||
'iwconfig:run "iwconfig" command with magic syntax.'
|
||||
'jobs:run "jobs" command with magic syntax.'
|
||||
'last:run "last" command with magic syntax.'
|
||||
'lastb:run "lastb" command with magic syntax.'
|
||||
'ls:run "ls" command with magic syntax.'
|
||||
'lsattr:run "lsattr" command with magic syntax.'
|
||||
'lsb_release:run "lsb_release" command with magic syntax.'
|
||||
'lsblk:run "lsblk" command with magic syntax.'
|
||||
'lsmod:run "lsmod" command with magic syntax.'
|
||||
'lsof:run "lsof" command with magic syntax.'
|
||||
'lspci:run "lspci" command with magic syntax.'
|
||||
'lsusb:run "lsusb" command with magic syntax.'
|
||||
'md5:run "md5" command with magic syntax.'
|
||||
'md5sum:run "md5sum" command with magic syntax.'
|
||||
'mdadm:run "mdadm" command with magic syntax.'
|
||||
'mount:run "mount" command with magic syntax.'
|
||||
'mpstat:run "mpstat" command with magic syntax.'
|
||||
'netstat:run "netstat" command with magic syntax.'
|
||||
'nmcli:run "nmcli" command with magic syntax.'
|
||||
'nsd-control:run "nsd-control" command with magic syntax.'
|
||||
'ntpq:run "ntpq" command with magic syntax.'
|
||||
'os-prober:run "os-prober" command with magic syntax.'
|
||||
'pidstat:run "pidstat" command with magic syntax.'
|
||||
'ping:run "ping" command with magic syntax.'
|
||||
'ping6:run "ping6" command with magic syntax.'
|
||||
'pip:run "pip" command with magic syntax.'
|
||||
'pip3:run "pip3" command with magic syntax.'
|
||||
'postconf:run "postconf" command with magic syntax.'
|
||||
'printenv:run "printenv" command with magic syntax.'
|
||||
'ps:run "ps" command with magic syntax.'
|
||||
'route:run "route" command with magic syntax.'
|
||||
'rpm:run "rpm" command with magic syntax.'
|
||||
'rsync:run "rsync" command with magic syntax.'
|
||||
'sfdisk:run "sfdisk" command with magic syntax.'
|
||||
'sha1sum:run "sha1sum" command with magic syntax.'
|
||||
'sha224sum:run "sha224sum" command with magic syntax.'
|
||||
'sha256sum:run "sha256sum" command with magic syntax.'
|
||||
'sha384sum:run "sha384sum" command with magic syntax.'
|
||||
'sha512sum:run "sha512sum" command with magic syntax.'
|
||||
'shasum:run "shasum" command with magic syntax.'
|
||||
'ss:run "ss" command with magic syntax.'
|
||||
'ssh:run "ssh" command with magic syntax.'
|
||||
'sshd:run "sshd" command with magic syntax.'
|
||||
'stat:run "stat" command with magic syntax.'
|
||||
'sum:run "sum" command with magic syntax.'
|
||||
'swapon:run "swapon" command with magic syntax.'
|
||||
'sysctl:run "sysctl" command with magic syntax.'
|
||||
'systemctl:run "systemctl" command with magic syntax.'
|
||||
'systeminfo:run "systeminfo" command with magic syntax.'
|
||||
'timedatectl:run "timedatectl" command with magic syntax.'
|
||||
'top:run "top" command with magic syntax.'
|
||||
'tracepath:run "tracepath" command with magic syntax.'
|
||||
'tracepath6:run "tracepath6" command with magic syntax.'
|
||||
'traceroute:run "traceroute" command with magic syntax.'
|
||||
'traceroute6:run "traceroute6" command with magic syntax.'
|
||||
'tune2fs:run "tune2fs" command with magic syntax.'
|
||||
'udevadm:run "udevadm" command with magic syntax.'
|
||||
'ufw:run "ufw" command with magic syntax.'
|
||||
'uname:run "uname" command with magic syntax.'
|
||||
'update-alternatives:run "update-alternatives" command with magic syntax.'
|
||||
'upower:run "upower" command with magic syntax.'
|
||||
'uptime:run "uptime" command with magic syntax.'
|
||||
'vdir:run "vdir" command with magic syntax.'
|
||||
'veracrypt:run "veracrypt" command with magic syntax.'
|
||||
'vmstat:run "vmstat" command with magic syntax.'
|
||||
'w:run "w" command with magic syntax.'
|
||||
'wc:run "wc" command with magic syntax.'
|
||||
'who:run "who" command with magic syntax.'
|
||||
'xrandr:run "xrandr" command with magic syntax.'
|
||||
'zipinfo:run "zipinfo" command with magic syntax.'
|
||||
'zpool:run "zpool" command with magic syntax.'
|
||||
)
|
||||
jc_parsers=(--acpi --airport --airport-s --arp --asciitable --asciitable-m --blkid --bluetoothctl --cbt --cef --cef-s --certbot --chage --cksum --clf --clf-s --crontab --crontab-u --csv --csv-s --curl-head --date --datetime-iso --debconf-show --df --dig --dir --dmidecode --dpkg-l --du --efibootmgr --email-address --env --file --find --findmnt --finger --free --fstab --git-log --git-log-s --git-ls-remote --gpg --group --gshadow --hash --hashsum --hciconfig --history --host --hosts --http-headers --id --ifconfig --ini --ini-dup --iostat --iostat-s --ip-address --iptables --ip-route --iw-scan --iwconfig --jar-manifest --jobs --jwt --kv --kv-dup --last --ls --ls-s --lsattr --lsb-release --lsblk --lsmod --lsof --lspci --lsusb --m3u --mdadm --mount --mpstat --mpstat-s --netstat --nmcli --nsd-control --ntpq --openvpn --os-prober --os-release --passwd --path --path-list --pci-ids --pgpass --pidstat --pidstat-s --ping --ping-s --pip-list --pip-show --pkg-index-apk --pkg-index-deb --plist --postconf --proc --proc-buddyinfo --proc-cmdline --proc-consoles --proc-cpuinfo --proc-crypto --proc-devices --proc-diskstats --proc-filesystems --proc-interrupts --proc-iomem --proc-ioports --proc-loadavg --proc-locks --proc-meminfo --proc-modules --proc-mtrr --proc-pagetypeinfo --proc-partitions --proc-slabinfo --proc-softirqs --proc-stat --proc-swaps --proc-uptime --proc-version --proc-vmallocinfo --proc-vmstat --proc-zoneinfo --proc-driver-rtc --proc-net-arp --proc-net-dev --proc-net-dev-mcast --proc-net-if-inet6 --proc-net-igmp --proc-net-igmp6 --proc-net-ipv6-route --proc-net-netlink --proc-net-netstat --proc-net-packet --proc-net-protocols --proc-net-route --proc-net-tcp --proc-net-unix --proc-pid-fdinfo --proc-pid-io --proc-pid-maps --proc-pid-mountinfo --proc-pid-numa-maps --proc-pid-smaps --proc-pid-stat --proc-pid-statm --proc-pid-status --ps --resolve-conf --route --rpm-qi --rsync --rsync-s --semver --sfdisk --shadow --srt --ss --ssh-conf --sshd-conf --stat --stat-s --swapon --sysctl --syslog --syslog-s --syslog-bsd --syslog-bsd-s --systemctl --systemctl-lj --systemctl-ls --systemctl-luf --systeminfo --time --timedatectl --timestamp --toml --top --top-s --tracepath --traceroute --tune2fs --udevadm --ufw --ufw-appinfo --uname --update-alt-gs --update-alt-q --upower --uptime --url --ver --veracrypt --vmstat --vmstat-s --w --wc --who --x509-cert --x509-csr --xml --xrandr --yaml --zipinfo --zpool-iostat --zpool-status)
|
||||
jc_parsers_describe=(
|
||||
'--acpi:`acpi` command parser'
|
||||
'--airport:`airport -I` command parser'
|
||||
'--airport-s:`airport -s` command parser'
|
||||
'--arp:`arp` command parser'
|
||||
'--asciitable:ASCII and Unicode table parser'
|
||||
'--asciitable-m:multi-line ASCII and Unicode table parser'
|
||||
'--blkid:`blkid` command parser'
|
||||
'--bluetoothctl:`bluetoothctl` command parser'
|
||||
'--cbt:`cbt` (Google Bigtable) command parser'
|
||||
'--cef:CEF string parser'
|
||||
'--cef-s:CEF string streaming parser'
|
||||
'--certbot:`certbot` command parser'
|
||||
'--chage:`chage --list` command parser'
|
||||
'--cksum:`cksum` and `sum` command parser'
|
||||
'--clf:Common and Combined Log Format file parser'
|
||||
'--clf-s:Common and Combined Log Format file streaming parser'
|
||||
'--crontab:`crontab` command and file parser'
|
||||
'--crontab-u:`crontab` file parser with user support'
|
||||
'--csv:CSV file parser'
|
||||
'--csv-s:CSV file streaming parser'
|
||||
'--curl-head:`curl --head` command parser'
|
||||
'--date:`date` command parser'
|
||||
'--datetime-iso:ISO 8601 Datetime string parser'
|
||||
'--debconf-show:`debconf-show` command parser'
|
||||
'--df:`df` command parser'
|
||||
'--dig:`dig` command parser'
|
||||
'--dir:`dir` command parser'
|
||||
'--dmidecode:`dmidecode` command parser'
|
||||
'--dpkg-l:`dpkg -l` command parser'
|
||||
'--du:`du` command parser'
|
||||
'--efibootmgr:`efibootmgr` command parser'
|
||||
'--email-address:Email Address string parser'
|
||||
'--env:`env` command parser'
|
||||
'--file:`file` command parser'
|
||||
'--find:`find` command parser'
|
||||
'--findmnt:`findmnt` command parser'
|
||||
'--finger:`finger` command parser'
|
||||
'--free:`free` command parser'
|
||||
'--fstab:`/etc/fstab` file parser'
|
||||
'--git-log:`git log` command parser'
|
||||
'--git-log-s:`git log` command streaming parser'
|
||||
'--git-ls-remote:`git ls-remote` command parser'
|
||||
'--gpg:`gpg --with-colons` command parser'
|
||||
'--group:`/etc/group` file parser'
|
||||
'--gshadow:`/etc/gshadow` file parser'
|
||||
'--hash:`hash` command parser'
|
||||
'--hashsum:hashsum command parser (`md5sum`, `shasum`, etc.)'
|
||||
'--hciconfig:`hciconfig` command parser'
|
||||
'--history:`history` command parser'
|
||||
'--host:`host` command parser'
|
||||
'--hosts:`/etc/hosts` file parser'
|
||||
'--http-headers:HTTP headers parser'
|
||||
'--id:`id` command parser'
|
||||
'--ifconfig:`ifconfig` command parser'
|
||||
'--ini:INI file parser'
|
||||
'--ini-dup:INI with duplicate key file parser'
|
||||
'--iostat:`iostat` command parser'
|
||||
'--iostat-s:`iostat` command streaming parser'
|
||||
'--ip-address:IPv4 and IPv6 Address string parser'
|
||||
'--iptables:`iptables` command parser'
|
||||
'--ip-route:`ip route` command parser'
|
||||
'--iw-scan:`iw dev [device] scan` command parser'
|
||||
'--iwconfig:`iwconfig` command parser'
|
||||
'--jar-manifest:Java MANIFEST.MF file parser'
|
||||
'--jobs:`jobs` command parser'
|
||||
'--jwt:JWT string parser'
|
||||
'--kv:Key/Value file and string parser'
|
||||
'--kv-dup:Key/Value with duplicate key file and string parser'
|
||||
'--last:`last` and `lastb` command parser'
|
||||
'--ls:`ls` command parser'
|
||||
'--ls-s:`ls` command streaming parser'
|
||||
'--lsattr:`lsattr` command parser'
|
||||
'--lsb-release:`lsb_release` command parser'
|
||||
'--lsblk:`lsblk` command parser'
|
||||
'--lsmod:`lsmod` command parser'
|
||||
'--lsof:`lsof` command parser'
|
||||
'--lspci:`lspci -mmv` command parser'
|
||||
'--lsusb:`lsusb` command parser'
|
||||
'--m3u:M3U and M3U8 file parser'
|
||||
'--mdadm:`mdadm` command parser'
|
||||
'--mount:`mount` command parser'
|
||||
'--mpstat:`mpstat` command parser'
|
||||
'--mpstat-s:`mpstat` command streaming parser'
|
||||
'--netstat:`netstat` command parser'
|
||||
'--nmcli:`nmcli` command parser'
|
||||
'--nsd-control:`nsd-control` command parser'
|
||||
'--ntpq:`ntpq -p` command parser'
|
||||
'--openvpn:openvpn-status.log file parser'
|
||||
'--os-prober:`os-prober` command parser'
|
||||
'--os-release:`/etc/os-release` file parser'
|
||||
'--passwd:`/etc/passwd` file parser'
|
||||
'--path:POSIX path string parser'
|
||||
'--path-list:POSIX path list string parser'
|
||||
'--pci-ids:`pci.ids` file parser'
|
||||
'--pgpass:PostgreSQL password file parser'
|
||||
'--pidstat:`pidstat -H` command parser'
|
||||
'--pidstat-s:`pidstat -H` command streaming parser'
|
||||
'--ping:`ping` and `ping6` command parser'
|
||||
'--ping-s:`ping` and `ping6` command streaming parser'
|
||||
'--pip-list:`pip list` command parser'
|
||||
'--pip-show:`pip show` command parser'
|
||||
'--pkg-index-apk:Alpine Linux Package Index file parser'
|
||||
'--pkg-index-deb:Debian Package Index file parser'
|
||||
'--plist:PLIST file parser'
|
||||
'--postconf:`postconf -M` command parser'
|
||||
'--proc:`/proc/` file parser'
|
||||
'--proc-buddyinfo:`/proc/buddyinfo` file parser'
|
||||
'--proc-cmdline:`/proc/cmdline` file parser'
|
||||
'--proc-consoles:`/proc/consoles` file parser'
|
||||
'--proc-cpuinfo:`/proc/cpuinfo` file parser'
|
||||
'--proc-crypto:`/proc/crypto` file parser'
|
||||
'--proc-devices:`/proc/devices` file parser'
|
||||
'--proc-diskstats:`/proc/diskstats` file parser'
|
||||
'--proc-filesystems:`/proc/filesystems` file parser'
|
||||
'--proc-interrupts:`/proc/interrupts` file parser'
|
||||
'--proc-iomem:`/proc/iomem` file parser'
|
||||
'--proc-ioports:`/proc/ioports` file parser'
|
||||
'--proc-loadavg:`/proc/loadavg` file parser'
|
||||
'--proc-locks:`/proc/locks` file parser'
|
||||
'--proc-meminfo:`/proc/meminfo` file parser'
|
||||
'--proc-modules:`/proc/modules` file parser'
|
||||
'--proc-mtrr:`/proc/mtrr` file parser'
|
||||
'--proc-pagetypeinfo:`/proc/pagetypeinfo` file parser'
|
||||
'--proc-partitions:`/proc/partitions` file parser'
|
||||
'--proc-slabinfo:`/proc/slabinfo` file parser'
|
||||
'--proc-softirqs:`/proc/softirqs` file parser'
|
||||
'--proc-stat:`/proc/stat` file parser'
|
||||
'--proc-swaps:`/proc/swaps` file parser'
|
||||
'--proc-uptime:`/proc/uptime` file parser'
|
||||
'--proc-version:`/proc/version` file parser'
|
||||
'--proc-vmallocinfo:`/proc/vmallocinfo` file parser'
|
||||
'--proc-vmstat:`/proc/vmstat` file parser'
|
||||
'--proc-zoneinfo:`/proc/zoneinfo` file parser'
|
||||
'--proc-driver-rtc:`/proc/driver/rtc` file parser'
|
||||
'--proc-net-arp:`/proc/net/arp` file parser'
|
||||
'--proc-net-dev:`/proc/net/dev` file parser'
|
||||
'--proc-net-dev-mcast:`/proc/net/dev_mcast` file parser'
|
||||
'--proc-net-if-inet6:`/proc/net/if_inet6` file parser'
|
||||
'--proc-net-igmp:`/proc/net/igmp` file parser'
|
||||
'--proc-net-igmp6:`/proc/net/igmp6` file parser'
|
||||
'--proc-net-ipv6-route:`/proc/net/ipv6_route` file parser'
|
||||
'--proc-net-netlink:`/proc/net/netlink` file parser'
|
||||
'--proc-net-netstat:`/proc/net/netstat` file parser'
|
||||
'--proc-net-packet:`/proc/net/packet` file parser'
|
||||
'--proc-net-protocols:`/proc/net/protocols` file parser'
|
||||
'--proc-net-route:`/proc/net/route` file parser'
|
||||
'--proc-net-tcp:`/proc/net/tcp` and `/proc/net/tcp6` file parser'
|
||||
'--proc-net-unix:`/proc/net/unix` file parser'
|
||||
'--proc-pid-fdinfo:`/proc/<pid>/fdinfo/<fd>` file parser'
|
||||
'--proc-pid-io:`/proc/<pid>/io` file parser'
|
||||
'--proc-pid-maps:`/proc/<pid>/maps` file parser'
|
||||
'--proc-pid-mountinfo:`/proc/<pid>/mountinfo` file parser'
|
||||
'--proc-pid-numa-maps:`/proc/<pid>/numa_maps` file parser'
|
||||
'--proc-pid-smaps:`/proc/<pid>/smaps` file parser'
|
||||
'--proc-pid-stat:`/proc/<pid>/stat` file parser'
|
||||
'--proc-pid-statm:`/proc/<pid>/statm` file parser'
|
||||
'--proc-pid-status:`/proc/<pid>/status` file parser'
|
||||
'--ps:`ps` command parser'
|
||||
'--resolve-conf:`/etc/resolve.conf` file parser'
|
||||
'--route:`route` command parser'
|
||||
'--rpm-qi:`rpm -qi` command parser'
|
||||
'--rsync:`rsync` command parser'
|
||||
'--rsync-s:`rsync` command streaming parser'
|
||||
'--semver:Semantic Version string parser'
|
||||
'--sfdisk:`sfdisk` command parser'
|
||||
'--shadow:`/etc/shadow` file parser'
|
||||
'--srt:SRT file parser'
|
||||
'--ss:`ss` command parser'
|
||||
'--ssh-conf:`ssh` config file and `ssh -G` command parser'
|
||||
'--sshd-conf:`sshd` config file and `sshd -T` command parser'
|
||||
'--stat:`stat` command parser'
|
||||
'--stat-s:`stat` command streaming parser'
|
||||
'--swapon:`swapon` command parser'
|
||||
'--sysctl:`sysctl` command parser'
|
||||
'--syslog:Syslog RFC 5424 string parser'
|
||||
'--syslog-s:Syslog RFC 5424 string streaming parser'
|
||||
'--syslog-bsd:Syslog RFC 3164 string parser'
|
||||
'--syslog-bsd-s:Syslog RFC 3164 string streaming parser'
|
||||
'--systemctl:`systemctl` command parser'
|
||||
'--systemctl-lj:`systemctl list-jobs` command parser'
|
||||
'--systemctl-ls:`systemctl list-sockets` command parser'
|
||||
'--systemctl-luf:`systemctl list-unit-files` command parser'
|
||||
'--systeminfo:`systeminfo` command parser'
|
||||
'--time:`/usr/bin/time` command parser'
|
||||
'--timedatectl:`timedatectl status` command parser'
|
||||
'--timestamp:Unix Epoch Timestamp string parser'
|
||||
'--toml:TOML file parser'
|
||||
'--top:`top -b` command parser'
|
||||
'--top-s:`top -b` command streaming parser'
|
||||
'--tracepath:`tracepath` and `tracepath6` command parser'
|
||||
'--traceroute:`traceroute` and `traceroute6` command parser'
|
||||
'--tune2fs:`tune2fs -l` command parser'
|
||||
'--udevadm:`udevadm info` command parser'
|
||||
'--ufw:`ufw status` command parser'
|
||||
'--ufw-appinfo:`ufw app info [application]` command parser'
|
||||
'--uname:`uname -a` command parser'
|
||||
'--update-alt-gs:`update-alternatives --get-selections` command parser'
|
||||
'--update-alt-q:`update-alternatives --query` command parser'
|
||||
'--upower:`upower` command parser'
|
||||
'--uptime:`uptime` command parser'
|
||||
'--url:URL string parser'
|
||||
'--ver:Version string parser'
|
||||
'--veracrypt:`veracrypt` command parser'
|
||||
'--vmstat:`vmstat` command parser'
|
||||
'--vmstat-s:`vmstat` command streaming parser'
|
||||
'--w:`w` command parser'
|
||||
'--wc:`wc` command parser'
|
||||
'--who:`who` command parser'
|
||||
'--x509-cert:X.509 PEM and DER certificate file parser'
|
||||
'--x509-csr:X.509 PEM and DER certificate request file parser'
|
||||
'--xml:XML file parser'
|
||||
'--xrandr:`xrandr` command parser'
|
||||
'--yaml:YAML file parser'
|
||||
'--zipinfo:`zipinfo` command parser'
|
||||
'--zpool-iostat:`zpool iostat` command parser'
|
||||
'--zpool-status:`zpool status` command parser'
|
||||
)
|
||||
jc_options=(--force-color -C --debug -d --monochrome -m --meta-out -M --pretty -p --quiet -q --raw -r --slurp -s --unbuffer -u --yaml-out -y)
|
||||
jc_options_describe=(
|
||||
'--force-color:force color output (overrides -m)'
|
||||
'-C:force color output (overrides -m)'
|
||||
'--debug:debug (double for verbose debug)'
|
||||
'-d:debug (double for verbose debug)'
|
||||
'--monochrome:monochrome output'
|
||||
'-m:monochrome output'
|
||||
'--meta-out:add metadata to output including timestamp, etc.'
|
||||
'-M:add metadata to output including timestamp, etc.'
|
||||
'--pretty:pretty print output'
|
||||
'-p:pretty print output'
|
||||
'--quiet:suppress warnings (double to ignore streaming errors)'
|
||||
'-q:suppress warnings (double to ignore streaming errors)'
|
||||
'--raw:raw output'
|
||||
'-r:raw output'
|
||||
'--slurp:slurp multiple lines into an array'
|
||||
'-s:slurp multiple lines into an array'
|
||||
'--unbuffer:unbuffer output'
|
||||
'-u:unbuffer output'
|
||||
'--yaml-out:YAML output'
|
||||
'-y:YAML output'
|
||||
)
|
||||
jc_about_options=(--about -a)
|
||||
jc_about_options_describe=(
|
||||
'--about:about jc'
|
||||
'-a:about jc'
|
||||
)
|
||||
jc_about_mod_options=(--pretty -p --yaml-out -y --monochrome -m --force-color -C)
|
||||
jc_about_mod_options_describe=(
|
||||
'--pretty:pretty print output'
|
||||
'-p:pretty print output'
|
||||
'--yaml-out:YAML output'
|
||||
'-y:YAML output'
|
||||
'--monochrome:monochrome output'
|
||||
'-m:monochrome output'
|
||||
'--force-color:force color output (overrides -m)'
|
||||
'-C:force color output (overrides -m)'
|
||||
)
|
||||
jc_help_options=(--help -h)
|
||||
jc_help_options_describe=(
|
||||
'--help:help (--help --parser_name for parser documentation)'
|
||||
'-h:help (--help --parser_name for parser documentation)'
|
||||
)
|
||||
jc_special_options=(--version -v --bash-comp -B --zsh-comp -Z)
|
||||
jc_special_options_describe=(
|
||||
'--version:version info'
|
||||
'-v:version info'
|
||||
'--bash-comp:gen Bash completion: jc -B > /etc/bash_completion.d/jc'
|
||||
'-B:gen Bash completion: jc -B > /etc/bash_completion.d/jc'
|
||||
'--zsh-comp:gen Zsh completion: jc -Z > "${fpath[1]}/_jc"'
|
||||
'-Z:gen Zsh completion: jc -Z > "${fpath[1]}/_jc"'
|
||||
)
|
||||
|
||||
# if jc_about_options are found anywhere in the line, then only complete from jc_about_mod_options
|
||||
for i in ${words:0:-1}; do
|
||||
if (( $jc_about_options[(Ie)${i}] )); then
|
||||
_describe 'commands' jc_about_mod_options_describe
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# if jc_help_options and a parser are found anywhere in the line, then no more completions
|
||||
if
|
||||
(
|
||||
for i in ${words:0:-1}; do
|
||||
if (( $jc_help_options[(Ie)${i}] )); then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
) && (
|
||||
for i in ${words:0:-1}; do
|
||||
if (( $jc_parsers[(Ie)${i}] )); then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
); then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# if jc_help_options are found anywhere in the line, then only complete with parsers
|
||||
for i in ${words:0:-1}; do
|
||||
if (( $jc_help_options[(Ie)${i}] )); then
|
||||
_describe 'commands' jc_parsers_describe
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# if special options are found anywhere in the line, then no more completions
|
||||
for i in ${words:0:-1}; do
|
||||
if (( $jc_special_options[(Ie)${i}] )); then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# if magic command is found anywhere in the line, use called command's autocompletion
|
||||
for i in ${words:0:-1}; do
|
||||
if (( $jc_commands[(Ie)${i}] )); then
|
||||
# hack to remove options between jc and the magic command
|
||||
shift $(( ${#words} - 2 )) words
|
||||
words[1,0]=(jc)
|
||||
CURRENT=${#words}
|
||||
|
||||
# run the magic command's completions
|
||||
_arguments '*::arguments:_normal'
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# if "/pr[oc]" (magic for Procfile parsers) is in the current word, complete with files/directories in the path
|
||||
if [[ "${words[-1]}" =~ "/pr" ]]; then
|
||||
# run files completion
|
||||
_files
|
||||
return 0
|
||||
fi
|
||||
|
||||
# if a parser arg is found anywhere in the line, only show options and help options
|
||||
for i in ${words:0:-1}; do
|
||||
if (( $jc_parsers[(Ie)${i}] )); then
|
||||
_describe 'commands' jc_options_describe -- jc_help_options_describe
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
# default completion
|
||||
_describe 'commands' jc_options_describe -- jc_about_options_describe -- jc_help_options_describe -- jc_special_options_describe -- jc_parsers_describe -- jc_commands_describe
|
||||
}
|
||||
|
||||
_jc
|
||||
|
||||
177
docgen.sh
177
docgen.sh
@@ -1,38 +1,147 @@
|
||||
#!/bin/bash
|
||||
# Generate docs.md
|
||||
# requires pydoc-markdown 4.6.1
|
||||
|
||||
# use ./docgen all to generate all docs
|
||||
|
||||
readme_config=$(cat <<'EOF'
|
||||
{
|
||||
"processors": [
|
||||
{
|
||||
"type": "filter"
|
||||
},
|
||||
{
|
||||
"type": "pydocmd"
|
||||
}
|
||||
],
|
||||
"renderer": {
|
||||
"type": "markdown",
|
||||
"header_level_by_type": {
|
||||
"Module": 1,
|
||||
"Class": 3,
|
||||
"Method": 3,
|
||||
"Function": 3,
|
||||
"Variable": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
toc_config=$(cat <<'EOF'
|
||||
{
|
||||
"processors": [
|
||||
{
|
||||
"type": "filter"
|
||||
},
|
||||
{
|
||||
"type": "pydocmd"
|
||||
}
|
||||
],
|
||||
"renderer": {
|
||||
"type": "markdown",
|
||||
"render_toc": true,
|
||||
"header_level_by_type": {
|
||||
"Module": 1,
|
||||
"Class": 3,
|
||||
"Method": 3,
|
||||
"Function": 3,
|
||||
"Variable": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
parser_config=$(cat <<'EOF'
|
||||
{
|
||||
"processors": [
|
||||
{
|
||||
"type": "filter",
|
||||
"expression": "not name == \"info\" and not name.startswith(\"_\") and default()"
|
||||
},
|
||||
{
|
||||
"type": "pydocmd"
|
||||
}
|
||||
],
|
||||
"renderer": {
|
||||
"type": "markdown",
|
||||
"header_level_by_type": {
|
||||
"Module": 1,
|
||||
"Class": 3,
|
||||
"Method": 3,
|
||||
"Function": 3,
|
||||
"Variable": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
cd jc
|
||||
pydocmd simple jc+ > ../docs/readme.md
|
||||
pydocmd simple utils+ > ../docs/utils.md
|
||||
pydocmd simple jc.parsers.arp+ > ../docs/parsers/arp.md
|
||||
pydocmd simple jc.parsers.crontab+ > ../docs/parsers/crontab.md
|
||||
pydocmd simple jc.parsers.df+ > ../docs/parsers/df.md
|
||||
pydocmd simple jc.parsers.dig+ > ../docs/parsers/dig.md
|
||||
pydocmd simple jc.parsers.du+ > ../docs/parsers/du.md
|
||||
pydocmd simple jc.parsers.env+ > ../docs/parsers/env.md
|
||||
pydocmd simple jc.parsers.free+ > ../docs/parsers/free.md
|
||||
pydocmd simple jc.parsers.fstab+ > ../docs/parsers/fstab.md
|
||||
pydocmd simple jc.parsers.history+ > ../docs/parsers/history.md
|
||||
pydocmd simple jc.parsers.hosts+ > ../docs/parsers/hosts.md
|
||||
pydocmd simple jc.parsers.ifconfig+ > ../docs/parsers/ifconfig.md
|
||||
pydocmd simple jc.parsers.iptables+ > ../docs/parsers/iptables.md
|
||||
pydocmd simple jc.parsers.jobs+ > ../docs/parsers/jobs.md
|
||||
pydocmd simple jc.parsers.ls+ > ../docs/parsers/ls.md
|
||||
pydocmd simple jc.parsers.lsblk+ > ../docs/parsers/lsblk.md
|
||||
pydocmd simple jc.parsers.lsmod+ > ../docs/parsers/lsmod.md
|
||||
pydocmd simple jc.parsers.lsof+ > ../docs/parsers/lsof.md
|
||||
pydocmd simple jc.parsers.mount+ > ../docs/parsers/mount.md
|
||||
pydocmd simple jc.parsers.netstat+ > ../docs/parsers/netstat.md
|
||||
pydocmd simple jc.parsers.pip_list+ > ../docs/parsers/pip_list.md
|
||||
pydocmd simple jc.parsers.pip_show+ > ../docs/parsers/pip_show.md
|
||||
pydocmd simple jc.parsers.ps+ > ../docs/parsers/ps.md
|
||||
pydocmd simple jc.parsers.route+ > ../docs/parsers/route.md
|
||||
pydocmd simple jc.parsers.ss+ > ../docs/parsers/ss.md
|
||||
pydocmd simple jc.parsers.stat+ > ../docs/parsers/stat.md
|
||||
pydocmd simple jc.parsers.systemctl+ > ../docs/parsers/systemctl.md
|
||||
pydocmd simple jc.parsers.systemctl_lj+ > ../docs/parsers/systemctl_lj.md
|
||||
pydocmd simple jc.parsers.systemctl_ls+ > ../docs/parsers/systemctl_ls.md
|
||||
pydocmd simple jc.parsers.systemctl_luf+ > ../docs/parsers/systemctl_luf.md
|
||||
pydocmd simple jc.parsers.uname+ > ../docs/parsers/uname.md
|
||||
pydocmd simple jc.parsers.uptime+ > ../docs/parsers/uptime.md
|
||||
pydocmd simple jc.parsers.w+ > ../docs/parsers/w.md
|
||||
(
|
||||
echo Building docs for: package
|
||||
pydoc-markdown -m jc "${readme_config}" > ../docs/readme.md; echo "+++ package docs complete"
|
||||
) &
|
||||
|
||||
(
|
||||
echo Building docs for: lib
|
||||
pydoc-markdown -m jc.lib "${toc_config}" > ../docs/lib.md; echo "+++ lib docs complete"
|
||||
) &
|
||||
|
||||
(
|
||||
echo Building docs for: utils
|
||||
pydoc-markdown -m jc.utils "${toc_config}" > ../docs/utils.md; echo "+++ utils docs complete"
|
||||
) &
|
||||
|
||||
(
|
||||
echo Building docs for: streaming
|
||||
pydoc-markdown -m jc.streaming "${toc_config}" > ../docs/streaming.md; echo "+++ streaming docs complete"
|
||||
) &
|
||||
|
||||
(
|
||||
echo Building docs for: universal parser
|
||||
pydoc-markdown -m jc.parsers.universal "${toc_config}" > ../docs/parsers/universal.md; echo "+++ universal parser docs complete"
|
||||
) &
|
||||
|
||||
# a bit of inception here... jc is being used to help
|
||||
# automate the generation of its own documentation. :)
|
||||
|
||||
# pull jc parser objects into a bash array from jq
|
||||
# filter out any plugin parsers
|
||||
parsers=()
|
||||
while read -r value
|
||||
do
|
||||
parsers+=("$value")
|
||||
done < <(jc -a | jq -c '.parsers[] | select(.plugin != true)')
|
||||
|
||||
for parser in "${parsers[@]}"; do
|
||||
parser_name=$(jq -r '.name' <<< "$parser")
|
||||
{
|
||||
if [[ $1 == "all" ]] || ! git diff --quiet --exit-code HEAD~5 -- "parsers/${parser_name}.py"; then
|
||||
compatible=$(jq -r '.compatible | join(", ")' <<< "$parser")
|
||||
version=$(jq -r '.version' <<< "$parser")
|
||||
author=$(jq -r '.author' <<< "$parser")
|
||||
author_email=$(jq -r '.author_email' <<< "$parser")
|
||||
|
||||
echo "Building docs for: ${parser_name}"
|
||||
echo "[Home](https://kellyjonbrazil.github.io/jc/)" > ../docs/parsers/"${parser_name}".md
|
||||
pydoc-markdown -m jc.parsers."${parser_name}" "${parser_config}" >> ../docs/parsers/"${parser_name}".md
|
||||
echo "### Parser Information" >> ../docs/parsers/"${parser_name}".md
|
||||
echo "Compatibility: ${compatible}" >> ../docs/parsers/"${parser_name}".md
|
||||
echo >> ../docs/parsers/"${parser_name}".md
|
||||
echo "Source: [\`jc/parsers/${parser_name}.py\`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/${parser_name}.py)" >> ../docs/parsers/"${parser_name}".md
|
||||
echo >> ../docs/parsers/"${parser_name}".md
|
||||
|
||||
if $(jq -e '.tags | contains(["slurpable"])' <<< "$parser"); then
|
||||
echo "This parser can be used with the \`--slurp\` command-line option." >> ../docs/parsers/"${parser_name}".md
|
||||
echo >> ../docs/parsers/"${parser_name}".md
|
||||
fi
|
||||
|
||||
echo "Version ${version} by ${author} (${author_email})" >> ../docs/parsers/"${parser_name}".md
|
||||
echo "+++ ${parser_name} docs complete"
|
||||
fi
|
||||
} &
|
||||
done
|
||||
wait
|
||||
echo "Document Generation Complete"
|
||||
|
||||
271
docs/lib.md
Normal file
271
docs/lib.md
Normal file
@@ -0,0 +1,271 @@
|
||||
# Table of Contents
|
||||
|
||||
* [jc.lib](#jc.lib)
|
||||
* [get\_parser](#jc.lib.get_parser)
|
||||
* [parse](#jc.lib.parse)
|
||||
* [parser\_mod\_list](#jc.lib.parser_mod_list)
|
||||
* [plugin\_parser\_mod\_list](#jc.lib.plugin_parser_mod_list)
|
||||
* [standard\_parser\_mod\_list](#jc.lib.standard_parser_mod_list)
|
||||
* [streaming\_parser\_mod\_list](#jc.lib.streaming_parser_mod_list)
|
||||
* [slurpable\_parser\_mod\_list](#jc.lib.slurpable_parser_mod_list)
|
||||
* [parser\_info](#jc.lib.parser_info)
|
||||
* [all\_parser\_info](#jc.lib.all_parser_info)
|
||||
* [get\_help](#jc.lib.get_help)
|
||||
|
||||
<a id="jc.lib"></a>
|
||||
|
||||
# jc.lib
|
||||
|
||||
jc - JSON Convert lib module
|
||||
|
||||
<a id="jc.lib.get_parser"></a>
|
||||
|
||||
### get\_parser
|
||||
|
||||
```python
|
||||
def get_parser(parser_mod_name: Union[str, ModuleType]) -> ModuleType
|
||||
```
|
||||
|
||||
Return the parser module object and check that the module is a valid
|
||||
parser module.
|
||||
|
||||
Parameters:
|
||||
|
||||
parser_mod_name: (string or Name of the parser module. This
|
||||
Module) function will accept module_name,
|
||||
cli-name, and --argument-name
|
||||
variants of the module name.
|
||||
|
||||
If a Module is given and the Module
|
||||
is a valid parser Module, then the
|
||||
same Module is returned.
|
||||
|
||||
Returns:
|
||||
|
||||
Module: the parser Module object
|
||||
|
||||
Raises:
|
||||
|
||||
ModuleNotFoundError: If the Module is not found or is not a valid
|
||||
parser Module, then a ModuleNotFoundError
|
||||
exception is raised.
|
||||
|
||||
<a id="jc.lib.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(
|
||||
parser_mod_name: Union[str, ModuleType],
|
||||
data: Union[str, bytes, Iterable[str]],
|
||||
quiet: bool = False,
|
||||
raw: bool = False,
|
||||
ignore_exceptions: Optional[bool] = None,
|
||||
**kwargs
|
||||
) -> Union[JSONDictType, List[JSONDictType], Iterator[JSONDictType]]
|
||||
```
|
||||
|
||||
Parse the data (string or bytes) using the supplied parser (string or
|
||||
module object).
|
||||
|
||||
This function provides a high-level API to simplify parser use. This
|
||||
function will call built-in parsers and custom plugin parsers.
|
||||
|
||||
Example (standard parsers):
|
||||
|
||||
>>> import jc
|
||||
>>> date_obj = jc.parse('date', 'Tue Jan 18 10:23:07 PST 2022')
|
||||
>>> print(f'The year is: {date_obj["year"]}')
|
||||
The year is: 2022
|
||||
|
||||
Example (streaming parsers):
|
||||
|
||||
>>> import jc
|
||||
>>> ping_gen = jc.parse('ping_s', ping_output.splitlines())
|
||||
>>> for item in ping_gen:
|
||||
>>> print(f'Response time: {item["time_ms"]} ms')
|
||||
Response time: 102 ms
|
||||
Response time: 109 ms
|
||||
...
|
||||
|
||||
To get a list of available parser module names, use `parser_mod_list()`.
|
||||
|
||||
Alternatively, a parser module object can be supplied:
|
||||
|
||||
>>> import jc
|
||||
>>> jc_date = jc.get_parser('date')
|
||||
>>> date_obj = jc.parse(jc_date, 'Tue Jan 18 10:23:07 PST 2022')
|
||||
>>> print(f'The year is: {date_obj["year"]}')
|
||||
The year is: 2022
|
||||
|
||||
You can also use the parser modules directly via `get_parser()`:
|
||||
|
||||
>>> import jc
|
||||
>>> jc_date = jc.get_parser('date')
|
||||
>>> date_obj = jc_date.parse('Tue Jan 18 10:23:07 PST 2022')
|
||||
>>> print(f'The year is: {date_obj["year"]}')
|
||||
The year is: 2022
|
||||
|
||||
Finally, you can access the low-level parser modules manually:
|
||||
|
||||
>>> import jc.parsers.date
|
||||
>>> date_obj = jc.parsers.date.parse('Tue Jan 18 10:23:07 PST 2022')
|
||||
>>> print(f'The year is: {date_obj["year"]}')
|
||||
The year is: 2022
|
||||
|
||||
Though, accessing plugin parsers directly is a bit more cumbersome, so
|
||||
this higher-level API is recommended. Here is how you can access plugin
|
||||
parsers without this API:
|
||||
|
||||
>>> import os
|
||||
>>> import sys
|
||||
>>> import jc.appdirs
|
||||
>>> data_dir = jc.appdirs.user_data_dir('jc', 'jc')
|
||||
>>> local_parsers_dir = os.path.join(data_dir, 'jcparsers')
|
||||
>>> sys.path.append(local_parsers_dir)
|
||||
>>> import my_custom_parser
|
||||
>>> my_custom_parser.parse('command_data')
|
||||
|
||||
Parameters:
|
||||
|
||||
parser_mod_name: (string or name of the parser module. This
|
||||
Module) function will accept module_name,
|
||||
cli-name, and --argument-name
|
||||
variants of the module name.
|
||||
|
||||
A Module object can also be passed
|
||||
directly or via get_parser()
|
||||
|
||||
data: (string or data to parse (string or bytes for
|
||||
bytes or standard parsers, iterable of
|
||||
iterable) strings for streaming parsers)
|
||||
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
ignore_exceptions: (boolean) ignore parsing exceptions if True
|
||||
(streaming parsers only)
|
||||
|
||||
Returns:
|
||||
|
||||
Standard Parsers: Dictionary or List of Dictionaries
|
||||
Streaming Parsers: Generator Object containing Dictionaries
|
||||
|
||||
<a id="jc.lib.parser_mod_list"></a>
|
||||
|
||||
### parser\_mod\_list
|
||||
|
||||
```python
|
||||
def parser_mod_list(show_hidden: bool = False,
|
||||
show_deprecated: bool = False) -> List[str]
|
||||
```
|
||||
|
||||
Returns a list of all available parser module names.
|
||||
|
||||
<a id="jc.lib.plugin_parser_mod_list"></a>
|
||||
|
||||
### plugin\_parser\_mod\_list
|
||||
|
||||
```python
|
||||
def plugin_parser_mod_list(show_hidden: bool = False,
|
||||
show_deprecated: bool = False) -> List[str]
|
||||
```
|
||||
|
||||
Returns a list of plugin parser module names. This function is a
|
||||
subset of `parser_mod_list()`.
|
||||
|
||||
<a id="jc.lib.standard_parser_mod_list"></a>
|
||||
|
||||
### standard\_parser\_mod\_list
|
||||
|
||||
```python
|
||||
def standard_parser_mod_list(show_hidden: bool = False,
|
||||
show_deprecated: bool = False) -> List[str]
|
||||
```
|
||||
|
||||
Returns a list of standard parser module names. This function is a
|
||||
subset of `parser_mod_list()` and does not contain any streaming
|
||||
parsers.
|
||||
|
||||
<a id="jc.lib.streaming_parser_mod_list"></a>
|
||||
|
||||
### streaming\_parser\_mod\_list
|
||||
|
||||
```python
|
||||
def streaming_parser_mod_list(show_hidden: bool = False,
|
||||
show_deprecated: bool = False) -> List[str]
|
||||
```
|
||||
|
||||
Returns a list of streaming parser module names. This function is a
|
||||
subset of `parser_mod_list()`.
|
||||
|
||||
<a id="jc.lib.slurpable_parser_mod_list"></a>
|
||||
|
||||
### slurpable\_parser\_mod\_list
|
||||
|
||||
```python
|
||||
def slurpable_parser_mod_list(show_hidden: bool = False,
|
||||
show_deprecated: bool = False) -> List[str]
|
||||
```
|
||||
|
||||
Returns a list of slurpable parser module names. This function is a
|
||||
subset of `parser_mod_list()`.
|
||||
|
||||
<a id="jc.lib.parser_info"></a>
|
||||
|
||||
### parser\_info
|
||||
|
||||
```python
|
||||
def parser_info(parser_mod_name: Union[str, ModuleType],
|
||||
documentation: bool = False) -> ParserInfoType
|
||||
```
|
||||
|
||||
Returns a dictionary that includes the parser module metadata.
|
||||
|
||||
Parameters:
|
||||
|
||||
parser_mod_name: (string or name of the parser module. This
|
||||
Module) function will accept module_name,
|
||||
cli-name, and --argument-name
|
||||
variants of the module name as well
|
||||
as a parser module object.
|
||||
|
||||
documentation: (boolean) include parser docstring if True
|
||||
|
||||
<a id="jc.lib.all_parser_info"></a>
|
||||
|
||||
### all\_parser\_info
|
||||
|
||||
```python
|
||||
def all_parser_info(documentation: bool = False,
|
||||
show_hidden: bool = False,
|
||||
show_deprecated: bool = False) -> List[ParserInfoType]
|
||||
```
|
||||
|
||||
Returns a list of dictionaries that includes metadata for all parser
|
||||
modules. By default only non-hidden, non-deprecated parsers are
|
||||
returned.
|
||||
|
||||
Parameters:
|
||||
|
||||
documentation: (boolean) include parser docstrings if True
|
||||
show_hidden: (boolean) also show parsers marked as hidden
|
||||
in their info metadata.
|
||||
show_deprecated: (boolean) also show parsers marked as
|
||||
deprecated in their info metadata.
|
||||
|
||||
<a id="jc.lib.get_help"></a>
|
||||
|
||||
### get\_help
|
||||
|
||||
```python
|
||||
def get_help(parser_mod_name: Union[str, ModuleType]) -> None
|
||||
```
|
||||
|
||||
Show help screen for the selected parser.
|
||||
|
||||
This function will accept **module_name**, **cli-name**, and
|
||||
**--argument-name** variants of the module name string as well as a
|
||||
parser module object.
|
||||
|
||||
255
docs/parsers/acpi.md
Normal file
255
docs/parsers/acpi.md
Normal file
@@ -0,0 +1,255 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.acpi"></a>
|
||||
|
||||
# jc.parsers.acpi
|
||||
|
||||
jc - JSON Convert `acpi` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ acpi -V | jc --acpi
|
||||
|
||||
or
|
||||
|
||||
$ jc acpi -V
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('acpi', acpi_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"type": string,
|
||||
"id": integer,
|
||||
"state": string,
|
||||
"charge_percent": integer,
|
||||
"until_charged": string,
|
||||
"until_charged_hours": integer,
|
||||
"until_charged_minuts": integer,
|
||||
"until_charged_seconds": integer,
|
||||
"until_charged_total_seconds": integer,
|
||||
"charge_remaining": string,
|
||||
"charge_remaining_hours": integer,
|
||||
"charge_remaining_minutes": integer,
|
||||
"charge_remaining_seconds": integer,
|
||||
"charge_remaining_total_seconds": integer,
|
||||
"design_capacity_mah": integer,
|
||||
"last_full_capacity": integer,
|
||||
"last_full_capacity_percent": integer,
|
||||
"on-line": boolean,
|
||||
"mode": string,
|
||||
"temperature": float,
|
||||
"temperature_unit": string,
|
||||
"trip_points": [
|
||||
{
|
||||
"id": integer,
|
||||
"switches_to_mode": string,
|
||||
"temperature": float,
|
||||
"temperature_unit": string
|
||||
}
|
||||
],
|
||||
"messages": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ acpi -V | jc --acpi -p
|
||||
[
|
||||
{
|
||||
"type": "Battery",
|
||||
"id": 0,
|
||||
"state": "Charging",
|
||||
"charge_percent": 71,
|
||||
"until_charged": "00:29:20",
|
||||
"design_capacity_mah": 2110,
|
||||
"last_full_capacity": 2271,
|
||||
"last_full_capacity_percent": 100,
|
||||
"until_charged_hours": 0,
|
||||
"until_charged_minutes": 29,
|
||||
"until_charged_seconds": 20,
|
||||
"until_charged_total_seconds": 1760
|
||||
},
|
||||
{
|
||||
"type": "Adapter",
|
||||
"id": 0,
|
||||
"on-line": true
|
||||
},
|
||||
{
|
||||
"type": "Thermal",
|
||||
"id": 0,
|
||||
"mode": "ok",
|
||||
"temperature": 46.0,
|
||||
"temperature_unit": "C",
|
||||
"trip_points": [
|
||||
{
|
||||
"id": 0,
|
||||
"switches_to_mode": "critical",
|
||||
"temperature": 127.0,
|
||||
"temperature_unit": "C"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"switches_to_mode": "hot",
|
||||
"temperature": 127.0,
|
||||
"temperature_unit": "C"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": 0,
|
||||
"messages": [
|
||||
"Processor 0 of 10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": 1,
|
||||
"messages": [
|
||||
"Processor 0 of 10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": 2,
|
||||
"messages": [
|
||||
"x86_pkg_temp no state information available"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": 3,
|
||||
"messages": [
|
||||
"Processor 0 of 10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": 4,
|
||||
"messages": [
|
||||
"intel_powerclamp no state information available"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": 5,
|
||||
"messages": [
|
||||
"Processor 0 of 10"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
$ acpi -V | jc --acpi -p -r
|
||||
[
|
||||
{
|
||||
"type": "Battery",
|
||||
"id": "0",
|
||||
"state": "Charging",
|
||||
"charge_percent": "71",
|
||||
"until_charged": "00:29:20",
|
||||
"design_capacity_mah": "2110",
|
||||
"last_full_capacity": "2271",
|
||||
"last_full_capacity_percent": "100"
|
||||
},
|
||||
{
|
||||
"type": "Adapter",
|
||||
"id": "0",
|
||||
"on-line": true
|
||||
},
|
||||
{
|
||||
"type": "Thermal",
|
||||
"id": "0",
|
||||
"mode": "ok",
|
||||
"temperature": "46.0",
|
||||
"temperature_unit": "C",
|
||||
"trip_points": [
|
||||
{
|
||||
"id": "0",
|
||||
"switches_to_mode": "critical",
|
||||
"temperature": "127.0",
|
||||
"temperature_unit": "C"
|
||||
},
|
||||
{
|
||||
"id": "1",
|
||||
"switches_to_mode": "hot",
|
||||
"temperature": "127.0",
|
||||
"temperature_unit": "C"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": "0",
|
||||
"messages": [
|
||||
"Processor 0 of 10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": "1",
|
||||
"messages": [
|
||||
"Processor 0 of 10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": "2",
|
||||
"messages": [
|
||||
"x86_pkg_temp no state information available"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": "3",
|
||||
"messages": [
|
||||
"Processor 0 of 10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": "4",
|
||||
"messages": [
|
||||
"intel_powerclamp no state information available"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Cooling",
|
||||
"id": "5",
|
||||
"messages": [
|
||||
"Processor 0 of 10"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.acpi.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/acpi.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/acpi.py)
|
||||
|
||||
Version 1.7 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
108
docs/parsers/airport.md
Normal file
108
docs/parsers/airport.md
Normal file
@@ -0,0 +1,108 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.airport"></a>
|
||||
|
||||
# jc.parsers.airport
|
||||
|
||||
jc - JSON Convert `airport -I` command output parser
|
||||
|
||||
The `airport` program can be found at `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ airport -I | jc --airport
|
||||
|
||||
or
|
||||
|
||||
$ jc airport -I
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('airport', airport_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"agrctlrssi": integer,
|
||||
"agrextrssi": integer,
|
||||
"agrctlnoise": integer,
|
||||
"agrextnoise": integer,
|
||||
"state": string,
|
||||
"op_mode": string,
|
||||
"lasttxrate": integer,
|
||||
"maxrate": integer,
|
||||
"lastassocstatus": integer,
|
||||
"802_11_auth": string,
|
||||
"link_auth": string,
|
||||
"bssid": string,
|
||||
"ssid": string,
|
||||
"mcs": integer,
|
||||
"channel": string
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ airport -I | jc --airport -p
|
||||
{
|
||||
"agrctlrssi": -66,
|
||||
"agrextrssi": 0,
|
||||
"agrctlnoise": -90,
|
||||
"agrextnoise": 0,
|
||||
"state": "running",
|
||||
"op_mode": "station",
|
||||
"lasttxrate": 195,
|
||||
"maxrate": 867,
|
||||
"lastassocstatus": 0,
|
||||
"802_11_auth": "open",
|
||||
"link_auth": "wpa2-psk",
|
||||
"bssid": "3c:37:86:15:ad:f9",
|
||||
"ssid": "SnazzleDazzle",
|
||||
"mcs": 0,
|
||||
"channel": "48,80"
|
||||
}
|
||||
|
||||
$ airport -I | jc --airport -p -r
|
||||
{
|
||||
"agrctlrssi": "-66",
|
||||
"agrextrssi": "0",
|
||||
"agrctlnoise": "-90",
|
||||
"agrextnoise": "0",
|
||||
"state": "running",
|
||||
"op_mode": "station",
|
||||
"lasttxrate": "195",
|
||||
"maxrate": "867",
|
||||
"lastassocstatus": "0",
|
||||
"802_11_auth": "open",
|
||||
"link_auth": "wpa2-psk",
|
||||
"bssid": "3c:37:86:15:ad:f9",
|
||||
"ssid": "SnazzleDazzle",
|
||||
"mcs": "0",
|
||||
"channel": "48,80"
|
||||
}
|
||||
|
||||
<a id="jc.parsers.airport.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: darwin
|
||||
|
||||
Source: [`jc/parsers/airport.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/airport.py)
|
||||
|
||||
Version 1.5 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
136
docs/parsers/airport_s.md
Normal file
136
docs/parsers/airport_s.md
Normal file
@@ -0,0 +1,136 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.airport_s"></a>
|
||||
|
||||
# jc.parsers.airport\_s
|
||||
|
||||
jc - JSON Convert `airport -s` command output parser
|
||||
|
||||
The `airport` program can be found at `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ airport -s | jc --airport-s
|
||||
|
||||
or
|
||||
|
||||
$ jc airport -s
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('airport_s', airport_s_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"ssid": string,
|
||||
"bssid": string,
|
||||
"rssi": integer,
|
||||
"channel": string,
|
||||
"ht": boolean,
|
||||
"cc": string,
|
||||
"security": [
|
||||
string,
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ airport -s | jc --airport-s -p
|
||||
[
|
||||
{
|
||||
"ssid": "DIRECT-4A-HP OfficeJet 3830",
|
||||
"bssid": "00:67:eb:2a:a7:3b",
|
||||
"rssi": -90,
|
||||
"channel": "6",
|
||||
"ht": true,
|
||||
"cc": "--",
|
||||
"security": [
|
||||
"WPA2(PSK/AES/AES)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ssid": "Latitude38",
|
||||
"bssid": "c0:ff:d5:d2:7a:f3",
|
||||
"rssi": -85,
|
||||
"channel": "11",
|
||||
"ht": true,
|
||||
"cc": "US",
|
||||
"security": [
|
||||
"WPA2(PSK/AES/AES)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ssid": "xfinitywifi",
|
||||
"bssid": "6e:e3:0e:b8:45:99",
|
||||
"rssi": -83,
|
||||
"channel": "11",
|
||||
"ht": true,
|
||||
"cc": "US",
|
||||
"security": [
|
||||
"NONE"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ airport -s | jc --airport -p -r
|
||||
[
|
||||
{
|
||||
"ssid": "DIRECT-F3-HP ENVY 5660 series",
|
||||
"bssid": "b0:5a:da:6f:0a:d4",
|
||||
"rssi": "-93",
|
||||
"channel": "1",
|
||||
"ht": "Y",
|
||||
"cc": "--",
|
||||
"security": "WPA2(PSK/AES/AES)"
|
||||
},
|
||||
{
|
||||
"ssid": "YouAreInfected-5",
|
||||
"bssid": "5c:e3:0e:c2:85:da",
|
||||
"rssi": "-85",
|
||||
"channel": "36",
|
||||
"ht": "Y",
|
||||
"cc": "US",
|
||||
"security": "WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)"
|
||||
},
|
||||
{
|
||||
"ssid": "YuanFamily",
|
||||
"bssid": "5c:e3:0e:b8:5f:9a",
|
||||
"rssi": "-84",
|
||||
"channel": "11",
|
||||
"ht": "Y",
|
||||
"cc": "US",
|
||||
"security": "WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.airport_s.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: darwin
|
||||
|
||||
Source: [`jc/parsers/airport_s.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/airport_s.py)
|
||||
|
||||
Version 1.6 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,17 +1,39 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.arp"></a>
|
||||
|
||||
# jc.parsers.arp
|
||||
jc - JSON CLI output utility arp Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `arp` command output parser
|
||||
|
||||
specify --arp as the first argument if the piped input is coming from:
|
||||
Supports `arp` and `arp -a` output.
|
||||
|
||||
arp
|
||||
or
|
||||
arp -a
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ arp | jc --arp
|
||||
|
||||
'linux', 'aix', 'freebsd', 'darwin'
|
||||
or
|
||||
|
||||
$ jc arp
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('arp', arp_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"address": string,
|
||||
"hwtype": string,
|
||||
"hwaddress": string,
|
||||
"flags_mask": string,
|
||||
"iface": string,
|
||||
"permanent": boolean,
|
||||
"expires": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -59,6 +81,8 @@ Examples:
|
||||
"hwtype": "ether",
|
||||
"hwaddress": "00:50:56:f0:98:26",
|
||||
"iface": "ens33"
|
||||
"permanent": false,
|
||||
"expires": 1182
|
||||
},
|
||||
{
|
||||
"name": "gateway",
|
||||
@@ -66,6 +90,8 @@ Examples:
|
||||
"hwtype": "ether",
|
||||
"hwaddress": "00:50:56:f7:4a:fc",
|
||||
"iface": "ens33"
|
||||
"permanent": false,
|
||||
"expires": 110
|
||||
}
|
||||
]
|
||||
|
||||
@@ -77,6 +103,8 @@ Examples:
|
||||
"hwtype": "ether",
|
||||
"hwaddress": "00:50:56:fe:7a:b4",
|
||||
"iface": "ens33"
|
||||
"permanent": false,
|
||||
"expires": "1182"
|
||||
},
|
||||
{
|
||||
"name": "_gateway",
|
||||
@@ -84,43 +112,17 @@ Examples:
|
||||
"hwtype": "ether",
|
||||
"hwaddress": "00:50:56:f7:4a:fc",
|
||||
"iface": "ens33"
|
||||
"permanent": false,
|
||||
"expires": "110"
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.arp.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"address": string,
|
||||
"hwtype": string,
|
||||
"hwaddress": string,
|
||||
"flags_mask": string,
|
||||
"iface": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -128,10 +130,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, aix, freebsd, darwin
|
||||
|
||||
Source: [`jc/parsers/arp.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/arp.py)
|
||||
|
||||
Version 1.12 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
149
docs/parsers/asciitable.md
Normal file
149
docs/parsers/asciitable.md
Normal file
@@ -0,0 +1,149 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.asciitable"></a>
|
||||
|
||||
# jc.parsers.asciitable
|
||||
|
||||
jc - JSON Convert `asciitable` parser
|
||||
|
||||
This parser converts ASCII and Unicode text tables with single-line rows.
|
||||
|
||||
Column headers must be at least two spaces apart from each other and must
|
||||
be unique. For best results, column headers should be left-justified. If
|
||||
column separators are present, then non-left-justified headers will be fixed
|
||||
automatically.
|
||||
|
||||
Row separators are optional and are ignored. Each non-row-separator line is
|
||||
considered a separate row in the table.
|
||||
|
||||
For example:
|
||||
|
||||
╒══════════╤═════════╤════════╕
|
||||
│ foo │ bar │ baz │
|
||||
╞══════════╪═════════╪════════╡
|
||||
│ good day │ │ 12345 │
|
||||
├──────────┼─────────┼────────┤
|
||||
│ hi there │ abc def │ 3.14 │
|
||||
╘══════════╧═════════╧════════╛
|
||||
|
||||
or
|
||||
|
||||
+-----------------------------+
|
||||
| foo bar baz |
|
||||
+-----------------------------+
|
||||
| good day 12345 |
|
||||
| hi there abc def 3.14 |
|
||||
+-----------------------------+
|
||||
|
||||
or
|
||||
|
||||
| foo | bar | baz |
|
||||
|----------|---------|--------|
|
||||
| good day | | 12345 |
|
||||
| hi there | abc def | 3.14 |
|
||||
|
||||
or
|
||||
|
||||
foo bar baz
|
||||
--------- -------- ------
|
||||
good day 12345
|
||||
hi there abc def 3.14
|
||||
|
||||
or
|
||||
|
||||
foo bar baz
|
||||
good day 12345
|
||||
hi there abc def 3.14
|
||||
|
||||
etc...
|
||||
|
||||
Headers (keys) are converted to snake-case. All values are returned as
|
||||
strings, except empty strings, which are converted to None/null.
|
||||
|
||||
> Note: To preserve the case of the keys use the `-r` cli option or
|
||||
> `raw=True` argument in `parse()`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat table.txt | jc --asciitable
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('asciitable', asciitable_string)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"column_name1": string, # empty string is null
|
||||
"column_name2": string # empty string is null
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ echo '
|
||||
> ╒══════════╤═════════╤════════╕
|
||||
> │ foo │ bar │ baz │
|
||||
> ╞══════════╪═════════╪════════╡
|
||||
> │ good day │ │ 12345 │
|
||||
> ├──────────┼─────────┼────────┤
|
||||
> │ hi there │ abc def │ 3.14 │
|
||||
> ╘══════════╧═════════╧════════╛' | jc --asciitable -p
|
||||
[
|
||||
{
|
||||
"foo": "good day",
|
||||
"bar": null,
|
||||
"baz": "12345"
|
||||
},
|
||||
{
|
||||
"foo": "hi there",
|
||||
"bar": "abc def",
|
||||
"baz": "3.14"
|
||||
}
|
||||
]
|
||||
|
||||
$ echo '
|
||||
> foo bar baz
|
||||
> --------- -------- ------
|
||||
> good day 12345
|
||||
> hi there abc def 3.14' | jc --asciitable -p
|
||||
[
|
||||
{
|
||||
"foo": "good day",
|
||||
"bar": null,
|
||||
"baz": "12345"
|
||||
},
|
||||
{
|
||||
"foo": "hi there",
|
||||
"bar": "abc def",
|
||||
"baz": "3.14"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.asciitable.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/asciitable.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/asciitable.py)
|
||||
|
||||
Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
134
docs/parsers/asciitable_m.md
Normal file
134
docs/parsers/asciitable_m.md
Normal file
@@ -0,0 +1,134 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.asciitable_m"></a>
|
||||
|
||||
# jc.parsers.asciitable\_m
|
||||
|
||||
jc - JSON Convert `asciitable-m` parser
|
||||
|
||||
This parser converts various styles of ASCII and Unicode text tables with
|
||||
multi-line rows. Tables must have a header row and separator line between
|
||||
rows.
|
||||
|
||||
For example:
|
||||
|
||||
╒══════════╤═════════╤════════╕
|
||||
│ foo │ bar baz │ fiz │
|
||||
│ │ │ buz │
|
||||
╞══════════╪═════════╪════════╡
|
||||
│ good day │ 12345 │ │
|
||||
│ mate │ │ │
|
||||
├──────────┼─────────┼────────┤
|
||||
│ hi there │ abc def │ 3.14 │
|
||||
│ │ │ │
|
||||
╘══════════╧═════════╧════════╛
|
||||
|
||||
Cells with multiple lines within rows will be joined with a newline
|
||||
character ('\\n').
|
||||
|
||||
Headers (keys) are converted to snake-case and newlines between multi-line
|
||||
headers are joined with an underscore. All values are returned as strings,
|
||||
except empty strings, which are converted to None/null.
|
||||
|
||||
> Note: To preserve the case of the keys use the `-r` cli option or
|
||||
> `raw=True` argument in `parse()`.
|
||||
|
||||
> Note: table column separator characters (e.g. `|`) cannot be present
|
||||
> inside the cell data. If detected, a warning message will be printed to
|
||||
> `STDERR` and the line will be skipped. The warning message can be
|
||||
> suppressed by using the `-q` command option or by setting `quiet=True` in
|
||||
> `parse()`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat table.txt | jc --asciitable-m
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('asciitable_m', asciitable-string)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"column_name1": string, # empty string is null
|
||||
"column_name2": string # empty string is null
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ echo '
|
||||
> +----------+---------+--------+
|
||||
> | foo | bar | baz |
|
||||
> | | | buz |
|
||||
> +==========+=========+========+
|
||||
> | good day | 12345 | |
|
||||
> | mate | | |
|
||||
> +----------+---------+--------+
|
||||
> | hi there | abc def | 3.14 |
|
||||
> | | | |
|
||||
> +==========+=========+========+' | jc --asciitable-m -p
|
||||
[
|
||||
{
|
||||
"foo": "good day\\nmate",
|
||||
"bar": "12345",
|
||||
"baz_buz": null
|
||||
},
|
||||
{
|
||||
"foo": "hi there",
|
||||
"bar": "abc def",
|
||||
"baz_buz": "3.14"
|
||||
}
|
||||
]
|
||||
|
||||
$ echo '
|
||||
> ╒══════════╤═════════╤════════╕
|
||||
> │ foo │ bar │ baz │
|
||||
> │ │ │ buz │
|
||||
> ╞══════════╪═════════╪════════╡
|
||||
> │ good day │ 12345 │ │
|
||||
> │ mate │ │ │
|
||||
> ├──────────┼─────────┼────────┤
|
||||
> │ hi there │ abc def │ 3.14 │
|
||||
> │ │ │ │
|
||||
> ╘══════════╧═════════╧════════╛' | jc --asciitable-m -p
|
||||
[
|
||||
{
|
||||
"foo": "good day\\nmate",
|
||||
"bar": "12345",
|
||||
"baz_buz": null
|
||||
},
|
||||
{
|
||||
"foo": "hi there",
|
||||
"bar": "abc def",
|
||||
"baz_buz": "3.14"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.asciitable_m.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/asciitable_m.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/asciitable_m.py)
|
||||
|
||||
Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
148
docs/parsers/blkid.md
Normal file
148
docs/parsers/blkid.md
Normal file
@@ -0,0 +1,148 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.blkid"></a>
|
||||
|
||||
# jc.parsers.blkid
|
||||
|
||||
jc - JSON Convert `blkid` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ blkid | jc --blkid
|
||||
|
||||
or
|
||||
|
||||
$ jc blkid
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('blkid', blkid_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"device": string,
|
||||
"uuid": string,
|
||||
"type": string,
|
||||
"usage": string,
|
||||
"part_entry_scheme": string,
|
||||
"part_entry_type": string,
|
||||
"part_entry_flags": string,
|
||||
"part_entry_number": integer,
|
||||
"part_entry_offset": integer,
|
||||
"part_entry_size": integer,
|
||||
"part_entry_disk": string,
|
||||
"id_fs_uuid": string,
|
||||
"id_fs_uuid_enc": string,
|
||||
"id_fs_version": string,
|
||||
"id_fs_type": string,
|
||||
"id_fs_usage": string,
|
||||
"id_part_entry_scheme": string,
|
||||
"id_part_entry_type": string,
|
||||
"id_part_entry_flags": string,
|
||||
"id_part_entry_number": integer,
|
||||
"id_part_entry_offset": integer,
|
||||
"id_part_entry_size": integer,
|
||||
"id_iolimit_minimum_io_size": integer,
|
||||
"id_iolimit_physical_sector_size": integer,
|
||||
"id_iolimit_logical_sector_size": integer,
|
||||
"id_part_entry_disk": string,
|
||||
"minimum_io_size": integer,
|
||||
"physical_sector_size": integer,
|
||||
"logical_sector_size": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ blkid | jc --blkid -p
|
||||
[
|
||||
{
|
||||
"device": "/dev/sda1",
|
||||
"uuid": "05d927ab-5875-49e4-ada1-7f46cb32c932",
|
||||
"type": "xfs"
|
||||
},
|
||||
{
|
||||
"device": "/dev/sda2",
|
||||
"uuid": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"type": "LVM2_member"
|
||||
},
|
||||
{
|
||||
"device": "/dev/mapper/centos-root",
|
||||
"uuid": "07d718ff-950c-4e5b-98f0-42a1147c77d9",
|
||||
"type": "xfs"
|
||||
},
|
||||
{
|
||||
"device": "/dev/mapper/centos-swap",
|
||||
"uuid": "615eb89a-bcbf-46fd-80e3-c483ff5c931f",
|
||||
"type": "swap"
|
||||
}
|
||||
]
|
||||
|
||||
$ sudo blkid -o udev -ip /dev/sda2 | jc --blkid -p
|
||||
[
|
||||
{
|
||||
"id_fs_uuid": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"id_fs_uuid_enc": "3klkIj-w1kk-DkJi-0XBJ-y3i7-i2Ac-vHqWBM",
|
||||
"id_fs_version": "LVM2\\x20001",
|
||||
"id_fs_type": "LVM2_member",
|
||||
"id_fs_usage": "raid",
|
||||
"id_iolimit_minimum_io_size": 512,
|
||||
"id_iolimit_physical_sector_size": 512,
|
||||
"id_iolimit_logical_sector_size": 512,
|
||||
"id_part_entry_scheme": "dos",
|
||||
"id_part_entry_type": "0x8e",
|
||||
"id_part_entry_number": 2,
|
||||
"id_part_entry_offset": 2099200,
|
||||
"id_part_entry_size": 39843840,
|
||||
"id_part_entry_disk": "8:0"
|
||||
}
|
||||
]
|
||||
|
||||
$ sudo blkid -ip /dev/sda1 | jc --blkid -p -r
|
||||
[
|
||||
{
|
||||
"devname": "/dev/sda1",
|
||||
"uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932",
|
||||
"type": "xfs",
|
||||
"usage": "filesystem",
|
||||
"minimum_io_size": "512",
|
||||
"physical_sector_size": "512",
|
||||
"logical_sector_size": "512",
|
||||
"part_entry_scheme": "dos",
|
||||
"part_entry_type": "0x83",
|
||||
"part_entry_flags": "0x80",
|
||||
"part_entry_number": "1",
|
||||
"part_entry_offset": "2048",
|
||||
"part_entry_size": "2097152",
|
||||
"part_entry_disk": "8:0"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.blkid.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/blkid.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/blkid.py)
|
||||
|
||||
Version 1.6 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
135
docs/parsers/bluetoothctl.md
Normal file
135
docs/parsers/bluetoothctl.md
Normal file
@@ -0,0 +1,135 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.bluetoothctl"></a>
|
||||
|
||||
# jc.parsers.bluetoothctl
|
||||
|
||||
jc - JSON Convert `bluetoothctl` command output parser
|
||||
|
||||
Supports the following `bluetoothctl` subcommands:
|
||||
- `bluetoothctl list`
|
||||
- `bluetoothctl show`
|
||||
- `bluetoothctl show <ctrl>`
|
||||
- `bluetoothctl devices`
|
||||
- `bluetoothctl info <dev>`
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ bluetoothctl info <dev> | jc --bluetoothctl
|
||||
or
|
||||
|
||||
$ jc bluetoothctl info <dev>
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('bluetoothctl', bluetoothctl_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
Because bluetoothctl is handling two main entities, controllers and devices,
|
||||
the schema is shared between them. Most of the fields are common between
|
||||
a controller and a device but there might be fields corresponding to one entity.
|
||||
|
||||
Controller:
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"is_default": boolean,
|
||||
"is_public": boolean,
|
||||
"is_random": boolean,
|
||||
"address": string,
|
||||
"alias": string,
|
||||
"class": string,
|
||||
"powered": string,
|
||||
"discoverable": string,
|
||||
"discoverable_timeout": string,
|
||||
"pairable": string,
|
||||
"modalias": string,
|
||||
"discovering": string,
|
||||
"uuids": array
|
||||
}
|
||||
]
|
||||
|
||||
Device:
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"is_public": boolean,
|
||||
"is_random": boolean,
|
||||
"address": string,
|
||||
"alias": string,
|
||||
"appearance": string,
|
||||
"class": string,
|
||||
"icon": string,
|
||||
"paired": string,
|
||||
"bonded": string,
|
||||
"trusted": string,
|
||||
"blocked": string,
|
||||
"connected": string,
|
||||
"legacy_pairing": string,
|
||||
"rssi": int,
|
||||
"txpower": int,
|
||||
"uuids": array,
|
||||
"modalias": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ bluetoothctl info EB:06:EF:62:B3:19 | jc --bluetoothctl -p
|
||||
[
|
||||
{
|
||||
"address": "22:06:33:62:B3:19",
|
||||
"is_public": true,
|
||||
"name": "TaoTronics TT-BH336",
|
||||
"alias": "TaoTronics TT-BH336",
|
||||
"class": "0x00240455",
|
||||
"icon": "audio-headset",
|
||||
"paired": "no",
|
||||
"bonded": "no",
|
||||
"trusted": "no",
|
||||
"blocked": "no",
|
||||
"connected": "no",
|
||||
"legacy_pairing": "no",
|
||||
"uuids": [
|
||||
"Advanced Audio Distribu.. (0000120d-0000-1000-8000-00805f9b34fb)",
|
||||
"Audio Sink (0000130b-0000-1000-8000-00805f9b34fb)",
|
||||
"A/V Remote Control (0000140e-0000-1000-8000-00805f9b34fb)",
|
||||
"A/V Remote Control Cont.. (0000150f-0000-1000-8000-00805f9b34fb)",
|
||||
"Handsfree (0000161e-0000-1000-8000-00805f9b34fb)",
|
||||
"Headset (00001708-0000-1000-8000-00805f9b34fb)",
|
||||
"Headset HS (00001831-0000-1000-8000-00805f9b34fb)"
|
||||
],
|
||||
"rssi": -52,
|
||||
"txpower": 4
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.bluetoothctl.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/bluetoothctl.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/bluetoothctl.py)
|
||||
|
||||
Version 1.1 by Jake Ob (iakopap at gmail.com)
|
||||
127
docs/parsers/cbt.md
Normal file
127
docs/parsers/cbt.md
Normal file
@@ -0,0 +1,127 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.cbt"></a>
|
||||
|
||||
# jc.parsers.cbt
|
||||
|
||||
jc - JSON Convert `cbt` command output parser (Google Bigtable)
|
||||
|
||||
Parses the human-, but not machine-, friendly output of the cbt command (for
|
||||
Google's Bigtable).
|
||||
|
||||
No effort is made to convert the data types of the values in the cells.
|
||||
|
||||
The `timestamp_epoch` calculated timestamp field is naive. (i.e. based on
|
||||
the local time of the system the parser is run on)
|
||||
|
||||
The `timestamp_epoch_utc` calculated timestamp field is timezone-aware and
|
||||
is only available if the timestamp has a UTC timezone.
|
||||
|
||||
The `timestamp_iso` calculated timestamp field will only include UTC
|
||||
timezone information if the timestamp has a UTC timezone.
|
||||
|
||||
Raw output contains all cells for each column (including timestamps), while
|
||||
the normal output contains only the latest value for each column.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cbt | jc --cbt
|
||||
|
||||
or
|
||||
|
||||
$ jc cbt
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('cbt', cbt_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"key": string,
|
||||
"cells": {
|
||||
<string>: { # column family
|
||||
<string>: string # column: value
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Schema (raw):
|
||||
|
||||
[
|
||||
{
|
||||
"key": string,
|
||||
"cells": [
|
||||
{
|
||||
"column_family": string,
|
||||
"column": string,
|
||||
"value": string,
|
||||
"timestamp_iso": string,
|
||||
"timestamp_epoch": integer,
|
||||
"timestamp_epoch_utc": integer
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ cbt -project=$PROJECT -instance=$INSTANCE lookup $TABLE foo | jc --cbt -p
|
||||
[
|
||||
{
|
||||
"key": "foo",
|
||||
"cells": {
|
||||
"foo": {
|
||||
"bar": "baz"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
$ cbt -project=$PROJECT -instance=$INSTANCE lookup $TABLE foo | jc --cbt -p -r
|
||||
[
|
||||
{
|
||||
"key": "foo",
|
||||
"cells": [
|
||||
{
|
||||
"column_family": "foo",
|
||||
"column": "bar",
|
||||
"value": "baz1",
|
||||
"timestamp_iso": "1970-01-01T01:00:00",
|
||||
"timestamp_epoch": 32400,
|
||||
"timestamp_epoch_utc": null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.cbt.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/cbt.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/cbt.py)
|
||||
|
||||
Version 1.0 by Andreas Weiden (andreas.weiden@gmail.com)
|
||||
148
docs/parsers/cef.md
Normal file
148
docs/parsers/cef.md
Normal file
@@ -0,0 +1,148 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.cef"></a>
|
||||
|
||||
# jc.parsers.cef
|
||||
|
||||
jc - JSON Convert CEF string parser
|
||||
|
||||
This parser conforms to the Microfocus Arcsight CEF specification.
|
||||
|
||||
This parser will accept a single CEF string or multiple CEF string lines.
|
||||
Any text before "CEF" will be ignored. Syslog and CEF escaped characters
|
||||
(`\\`, `\\"`, `\\]`, `\\|`, `\\=`, `\\%`, `\\#`, `\\n`, and `\\r`) are
|
||||
unescaped.
|
||||
|
||||
Extended fields, as defined in the CEF specification, are relabeled
|
||||
and the values are converted to their respective types. Extra naive and
|
||||
UTC epoch timestamps are added where appropriate per the CEF specification.
|
||||
|
||||
A warning message to `STDERR` will be printed if an unparsable line is found
|
||||
unless `--quiet` or `quiet=True` is used.
|
||||
|
||||
To preserve escaping and original keynames and to prevent type conversions
|
||||
use the `--raw` CLI option or `raw=True` param in the `parse()` function.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ echo 'CEF:0|Vendor|Product|3.2.0|1|SYSTEM|1|... | jc --cef
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('cef', cef_string_output)
|
||||
|
||||
Schema:
|
||||
|
||||
See: https://www.microfocus.com/documentation/arcsight/arcsight-smartconnectors-8.3/cef-implementation-standard/Content/CEF/Chapter%201%20What%20is%20CEF.htm
|
||||
|
||||
> Note: Special characters in key names will be converted to underscores.
|
||||
|
||||
[
|
||||
{
|
||||
"deviceVendor": string,
|
||||
"deviceProduct": string,
|
||||
"deviceVersion": string,
|
||||
"deviceEventClassId": string,
|
||||
"deviceEventClassIdNum": integer/null,
|
||||
"name": string,
|
||||
"agentSeverity": string/integer,
|
||||
"agentSeverityString": string,
|
||||
"agentSeverityNum": integer/null,
|
||||
"CEFVersion": integer,
|
||||
<extended fields> string/integer/float, # [0]
|
||||
<extended fields>"_epoch": integer/null, # [1]
|
||||
<extended fields>"_epoch_utc": integer/null, # [2]
|
||||
<custom fields> string,
|
||||
"unparsable": string # [3]
|
||||
}
|
||||
]
|
||||
|
||||
[0] Will attempt to convert extended fields to the type specified in the
|
||||
CEF specification. If conversion fails, then the field will remain
|
||||
a string.
|
||||
[1] Naive calculated epoch timestamp
|
||||
[2] Timezone-aware calculated epoch timestamp. (UTC only) This value
|
||||
will be null if a UTC timezone cannot be extracted from the original
|
||||
timestamp string value.
|
||||
[3] This field exists if the CEF line is not parsable. The value
|
||||
is the original syslog line.
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat cef.log | jc --cef -p
|
||||
[
|
||||
{
|
||||
"deviceVendor": "Trend Micro",
|
||||
"deviceProduct": "Deep Security Agent",
|
||||
"deviceVersion": "<DSA version>",
|
||||
"deviceEventClassId": "4000000",
|
||||
"name": "Eicar_test_file",
|
||||
"agentSeverity": 6,
|
||||
"CEFVersion": 0,
|
||||
"dvchost": "hostname",
|
||||
"string": "hello \"world\"!",
|
||||
"start": "Nov 08 2020 12:30:00.111 UTC",
|
||||
"start_epoch": 1604867400,
|
||||
"start_epoch_utc": 1604838600,
|
||||
"Host_ID": 1,
|
||||
"Quarantine": 205,
|
||||
"myDate": "Nov 08 2022 12:30:00.111",
|
||||
"myDate_epoch": 1667939400,
|
||||
"myDate_epoch_utc": null,
|
||||
"myFloat": 3.14,
|
||||
"deviceEventClassIdNum": 4000000,
|
||||
"agentSeverityString": "Medium",
|
||||
"agentSeverityNum": 6
|
||||
}
|
||||
]
|
||||
|
||||
$ cat cef.log | jc --cef -p -r
|
||||
[
|
||||
{
|
||||
"deviceVendor": "Trend Micro",
|
||||
"deviceProduct": "Deep Security Agent",
|
||||
"deviceVersion": "<DSA version>",
|
||||
"deviceEventClassId": "4000000",
|
||||
"name": "Eicar_test_file",
|
||||
"agentSeverity": "6",
|
||||
"CEFVersion": "0",
|
||||
"cn1": "1",
|
||||
"cn1Label": "Host ID",
|
||||
"dvchost": "hostname",
|
||||
"cn2": "205",
|
||||
"cn2Label": "Quarantine",
|
||||
"string": "hello \\\"world\\\"!",
|
||||
"start": "Nov 08 2020 12:30:00.111 UTC",
|
||||
"deviceCustomDate1": "Nov 08 2022 12:30:00.111",
|
||||
"deviceCustomDate1Label": "myDate",
|
||||
"cfp1": "3.14",
|
||||
"cfp1Label": "myFloat"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.cef.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/cef.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/cef.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
126
docs/parsers/cef_s.md
Normal file
126
docs/parsers/cef_s.md
Normal file
@@ -0,0 +1,126 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.cef_s"></a>
|
||||
|
||||
# jc.parsers.cef\_s
|
||||
|
||||
jc - JSON Convert CEF string output streaming parser
|
||||
|
||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||
> Dictionaries (module)
|
||||
|
||||
This parser conforms to the Microfocus Arcsight CEF specification.
|
||||
|
||||
This parser will accept a single CEF string or multiple CEF string lines.
|
||||
Any text before "CEF" will be ignored. Syslog and CEF escaped characters
|
||||
(`\\`, `\\"`, `\\]`, `\\|`, `\\=`, `\\%`, `\\#`, `\\n`, and `\\r`) are
|
||||
unescaped.
|
||||
|
||||
Extended fields, as defined in the CEF specification, are relabeled
|
||||
and the values are converted to their respective types. Extra naive and
|
||||
UTC epoch timestamps are added where appropriate per the CEF specification.
|
||||
|
||||
A warning message to `STDERR` will be printed if an unparsable line is found
|
||||
unless `--quiet` or `quiet=True` is used.
|
||||
|
||||
To preserve escaping and original keynames and to prevent type conversions
|
||||
use the `--raw` CLI option or `raw=True` param in the `parse()` function.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ echo 'CEF:0|Vendor|Product|3.2.0|1|SYSTEM|1|... | jc --cef-s
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
|
||||
result = jc.parse('cef_s', cef_command_output.splitlines())
|
||||
for item in result:
|
||||
# do something
|
||||
|
||||
Schema:
|
||||
|
||||
See: https://www.microfocus.com/documentation/arcsight/arcsight-smartconnectors-8.3/cef-implementation-standard/Content/CEF/Chapter%201%20What%20is%20CEF.htm
|
||||
|
||||
> Note: Special characters in key names will be converted to underscores.
|
||||
|
||||
{
|
||||
"deviceVendor": string,
|
||||
"deviceProduct": string,
|
||||
"deviceVersion": string,
|
||||
"deviceEventClassId": string,
|
||||
"deviceEventClassIdNum": integer/null,
|
||||
"name": string,
|
||||
"agentSeverity": string/integer,
|
||||
"agentSeverityString": string,
|
||||
"agentSeverityNum": integer/null,
|
||||
"CEFVersion": integer,
|
||||
<extended fields> string/integer/float, # [0]
|
||||
<extended fields>"_epoch": integer/null, # [1]
|
||||
<extended fields>"_epoch_utc": integer/null, # [2]
|
||||
<custom fields> string,
|
||||
"unparsable": string # [3]
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
"success": boolean, # false if error parsing
|
||||
"error": string, # exists if "success" is false
|
||||
"line": string # exists if "success" is false
|
||||
}
|
||||
}
|
||||
|
||||
[0] Will attempt to convert extended fields to the type specified in the
|
||||
CEF specification. If conversion fails, then the field will remain
|
||||
a string.
|
||||
[1] Naive calculated epoch timestamp
|
||||
[2] Timezone-aware calculated epoch timestamp. (UTC only) This value
|
||||
will be null if a UTC timezone cannot be extracted from the original
|
||||
timestamp string value.
|
||||
[3] This field exists if the CEF line is not parsable. The value
|
||||
is the original syslog line.
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat cef.log | jc --cef-s
|
||||
{"deviceVendor":"Fortinet","deviceProduct":"FortiDeceptor","deviceV...}
|
||||
{"deviceVendor":"Trend Micro","deviceProduct":"Deep Security Agent"...}
|
||||
...
|
||||
|
||||
$ cat cef.log | jc --cef-s -r
|
||||
{"deviceVendor":"Fortinet","deviceProduct":"FortiDeceptor","deviceV...}
|
||||
{"deviceVendor":"Trend Micro","deviceProduct":"Deep Security Agent"...}
|
||||
...
|
||||
|
||||
<a id="jc.parsers.cef_s.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
@add_jc_meta
|
||||
def parse(data: Iterable[str],
|
||||
raw: bool = False,
|
||||
quiet: bool = False,
|
||||
ignore_exceptions: bool = False) -> Union[Iterable[Dict], tuple]
|
||||
```
|
||||
|
||||
Main text parsing generator function. Returns an iterable object.
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (iterable) line-based text data to parse
|
||||
(e.g. sys.stdin or str.splitlines())
|
||||
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
ignore_exceptions: (boolean) ignore parsing exceptions if True
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
Iterable of Dictionaries
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/cef_s.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/cef_s.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
163
docs/parsers/certbot.md
Normal file
163
docs/parsers/certbot.md
Normal file
@@ -0,0 +1,163 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.certbot"></a>
|
||||
|
||||
# jc.parsers.certbot
|
||||
|
||||
jc - JSON Convert `certbot` command output parser
|
||||
|
||||
Supports the following `certbot` commands:
|
||||
|
||||
- `certbot show_account`
|
||||
- `certbot certificates`
|
||||
|
||||
Verbose options are not supported.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ certbot show_account | jc --certbot
|
||||
$ certbot certificates | jc --certbot
|
||||
|
||||
or
|
||||
|
||||
$ jc certbot show_account
|
||||
$ jc certbot certificates
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('certbot', certbot_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"certificates": [
|
||||
{
|
||||
"name": string,
|
||||
"serial_number": string,
|
||||
"key_type": string,
|
||||
"domains": [
|
||||
string
|
||||
],
|
||||
"expiration_date": string,
|
||||
"expiration_date_epoch": integer,
|
||||
"expiration_date_epoch_utc": integer,
|
||||
"expiration_date_iso": string,
|
||||
"validity": string,
|
||||
"certificate_path": string,
|
||||
"private_key_path": string
|
||||
}
|
||||
],
|
||||
"account": {
|
||||
"server": string,
|
||||
"url": string,
|
||||
"email": string
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ certbot certificates | jc --certbot -p
|
||||
{
|
||||
"certificates": [
|
||||
{
|
||||
"name": "example.com",
|
||||
"serial_number": "3f7axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
"key_type": "RSA",
|
||||
"domains": [
|
||||
"example.com",
|
||||
"www.example.com"
|
||||
],
|
||||
"expiration_date": "2023-05-11 01:33:10+00:00",
|
||||
"validity": "63 days",
|
||||
"certificate_path": "/etc/letsencrypt/live/example.com/chain.pem",
|
||||
"private_key_path": "/etc/letsencrypt/live/example.com/priv.pem",
|
||||
"expiration_date_epoch": 1683793990,
|
||||
"expiration_date_epoch_utc": 1683768790,
|
||||
"expiration_date_iso": "2023-05-11T01:33:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "example.org",
|
||||
"serial_number": "3bcyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
|
||||
"key_type": "RSA",
|
||||
"domains": [
|
||||
"example.org",
|
||||
"www.example.org"
|
||||
],
|
||||
"expiration_date": "2023-06-12 01:35:30+00:00",
|
||||
"validity": "63 days",
|
||||
"certificate_path": "/etc/letsencrypt/live/example.org/chain.pem",
|
||||
"private_key_path": "/etc/letsencrypt/live/example.org/key.pem",
|
||||
"expiration_date_epoch": 1686558930,
|
||||
"expiration_date_epoch_utc": 1686533730,
|
||||
"expiration_date_iso": "2023-06-12T01:35:30+00:00"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
$ certbot certificates | jc --certbot -p -r
|
||||
{
|
||||
"certificates": [
|
||||
{
|
||||
"name": "example.com",
|
||||
"serial_number": "3f7axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
"key_type": "RSA",
|
||||
"domains": [
|
||||
"example.com",
|
||||
"www.example.com"
|
||||
],
|
||||
"expiration_date": "2023-05-11 01:33:10+00:00",
|
||||
"validity": "63 days",
|
||||
"certificate_path": "/etc/letsencrypt/live/example.com/chain.pem",
|
||||
"private_key_path": "/etc/letsencrypt/live/example.com/priv.pem"
|
||||
},
|
||||
{
|
||||
"name": "example.org",
|
||||
"serial_number": "3bcyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
|
||||
"key_type": "RSA",
|
||||
"domains": [
|
||||
"example.org",
|
||||
"www.example.org"
|
||||
],
|
||||
"expiration_date": "2023-06-12 01:35:30+00:00",
|
||||
"validity": "63 days",
|
||||
"certificate_path": "/etc/letsencrypt/live/example.org/chain.pem",
|
||||
"private_key_path": "/etc/letsencrypt/live/example.org/key.pem"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
$ certbot show_account | jc --certbot -p
|
||||
{
|
||||
"account": {
|
||||
"server": "https://acme-staging-v02.api.letsencrypt.org/directory",
|
||||
"url": "https://acme-staging-v02.api.letsencrypt.org/acme/acct/123",
|
||||
"email": "some@example.com"
|
||||
}
|
||||
}
|
||||
|
||||
<a id="jc.parsers.certbot.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> JSONDictType
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/certbot.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/certbot.py)
|
||||
|
||||
Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
84
docs/parsers/chage.md
Normal file
84
docs/parsers/chage.md
Normal file
@@ -0,0 +1,84 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.chage"></a>
|
||||
|
||||
# jc.parsers.chage
|
||||
|
||||
jc - JSON Convert `chage --list` command output parser
|
||||
|
||||
Supports `chage -l <username>` or `chage --list <username>`
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ chage -l johndoe | jc --chage
|
||||
|
||||
or
|
||||
|
||||
$ jc chage -l johndoe
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('chage', chage_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"password_last_changed": string,
|
||||
"password_expires": string,
|
||||
"password_inactive": string,
|
||||
"account_expires": string,
|
||||
"min_days_between_password_change": integer,
|
||||
"max_days_between_password_change": integer,
|
||||
"warning_days_before_password_expires": integer
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ chage --list joeuser | jc --chage -p
|
||||
{
|
||||
"password_last_changed": "never",
|
||||
"password_expires": "never",
|
||||
"password_inactive": "never",
|
||||
"account_expires": "never",
|
||||
"min_days_between_password_change": 0,
|
||||
"max_days_between_password_change": 99999,
|
||||
"warning_days_before_password_expires": 7
|
||||
}
|
||||
|
||||
$ chage --list joeuser | jc --chage -p -r
|
||||
{
|
||||
"password_last_changed": "never",
|
||||
"password_expires": "never",
|
||||
"password_inactive": "never",
|
||||
"account_expires": "never",
|
||||
"min_days_between_password_change": "0",
|
||||
"max_days_between_password_change": "99999",
|
||||
"warning_days_before_password_expires": "7"
|
||||
}
|
||||
|
||||
<a id="jc.parsers.chage.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> Dict
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/chage.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/chage.py)
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
82
docs/parsers/cksum.md
Normal file
82
docs/parsers/cksum.md
Normal file
@@ -0,0 +1,82 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.cksum"></a>
|
||||
|
||||
# jc.parsers.cksum
|
||||
|
||||
jc - JSON Convert `cksum` command output parser
|
||||
|
||||
This parser works with the following checksum calculation utilities:
|
||||
- `sum`
|
||||
- `cksum`
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cksum file.txt | jc --cksum
|
||||
|
||||
or
|
||||
|
||||
$ jc cksum file.txt
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('cksum', cksum_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filename": string,
|
||||
"checksum": integer,
|
||||
"blocks": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ cksum * | jc --cksum -p
|
||||
[
|
||||
{
|
||||
"filename": "__init__.py",
|
||||
"checksum": 4294967295,
|
||||
"blocks": 0
|
||||
},
|
||||
{
|
||||
"filename": "airport.py",
|
||||
"checksum": 2208551092,
|
||||
"blocks": 3745
|
||||
},
|
||||
{
|
||||
"filename": "airport_s.py",
|
||||
"checksum": 1113817598,
|
||||
"blocks": 4572
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.cksum.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/cksum.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/cksum.py)
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
201
docs/parsers/clf.md
Normal file
201
docs/parsers/clf.md
Normal file
@@ -0,0 +1,201 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.clf"></a>
|
||||
|
||||
# jc.parsers.clf
|
||||
|
||||
jc - JSON Convert Common Log Format file parser
|
||||
|
||||
This parser will handle the Common Log Format standard as specified at
|
||||
https://www.w3.org/Daemon/User/Config/Logging.html#common-logfile-format.
|
||||
|
||||
Combined Log Format is also supported. (Referer and User Agent fields added)
|
||||
|
||||
Extra fields may be present and will be enclosed in the `extra` field as
|
||||
a single string.
|
||||
|
||||
If a log line cannot be parsed, an object with an `unparsable` field will
|
||||
be present with a value of the original line.
|
||||
|
||||
The `epoch` calculated timestamp field is naive. (i.e. based on the
|
||||
local time of the system the parser is run on)
|
||||
|
||||
The `epoch_utc` calculated timestamp field is timezone-aware and is
|
||||
only available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat file.log | jc --clf
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('clf', common_log_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
Empty strings and `-` values are converted to `null`/`None`.
|
||||
|
||||
[
|
||||
{
|
||||
"host": string,
|
||||
"ident": string,
|
||||
"authuser": string,
|
||||
"date": string,
|
||||
"day": integer,
|
||||
"month": string,
|
||||
"year": integer,
|
||||
"hour": integer,
|
||||
"minute": integer,
|
||||
"second": integer,
|
||||
"tz": string,
|
||||
"request": string,
|
||||
"request_method": string,
|
||||
"request_url": string,
|
||||
"request_version": string,
|
||||
"status": integer,
|
||||
"bytes": integer,
|
||||
"referer": string,
|
||||
"user_agent": string,
|
||||
"extra": string,
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"unparsable": string # [2]
|
||||
}
|
||||
]
|
||||
|
||||
[0] naive timestamp
|
||||
[1] timezone-aware timestamp. Only available if timezone field is UTC
|
||||
[2] exists if the line was not able to be parsed
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat file.log | jc --clf -p
|
||||
[
|
||||
{
|
||||
"host": "127.0.0.1",
|
||||
"ident": "user-identifier",
|
||||
"authuser": "frank",
|
||||
"date": "10/Oct/2000:13:55:36 -0700",
|
||||
"day": 10,
|
||||
"month": "Oct",
|
||||
"year": 2000,
|
||||
"hour": 13,
|
||||
"minute": 55,
|
||||
"second": 36,
|
||||
"tz": "-0700",
|
||||
"request": "GET /apache_pb.gif HTTPS/1.0",
|
||||
"status": 200,
|
||||
"bytes": 2326,
|
||||
"referer": null,
|
||||
"user_agent": null,
|
||||
"extra": null,
|
||||
"request_method": "GET",
|
||||
"request_url": "/apache_pb.gif",
|
||||
"request_version": "HTTPS/1.0",
|
||||
"epoch": 971211336,
|
||||
"epoch_utc": null
|
||||
},
|
||||
{
|
||||
"host": "1.1.1.2",
|
||||
"ident": null,
|
||||
"authuser": null,
|
||||
"date": "11/Nov/2016:03:04:55 +0100",
|
||||
"day": 11,
|
||||
"month": "Nov",
|
||||
"year": 2016,
|
||||
"hour": 3,
|
||||
"minute": 4,
|
||||
"second": 55,
|
||||
"tz": "+0100",
|
||||
"request": "GET /",
|
||||
"status": 200,
|
||||
"bytes": 83,
|
||||
"referer": null,
|
||||
"user_agent": null,
|
||||
"extra": "- 9221 1.1.1.1",
|
||||
"request_method": "GET",
|
||||
"request_url": "/",
|
||||
"request_version": null,
|
||||
"epoch": 1478862295,
|
||||
"epoch_utc": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat file.log | jc --clf -p -r
|
||||
[
|
||||
{
|
||||
"host": "127.0.0.1",
|
||||
"ident": "user-identifier",
|
||||
"authuser": "frank",
|
||||
"date": "10/Oct/2000:13:55:36 -0700",
|
||||
"day": "10",
|
||||
"month": "Oct",
|
||||
"year": "2000",
|
||||
"hour": "13",
|
||||
"minute": "55",
|
||||
"second": "36",
|
||||
"tz": "-0700",
|
||||
"request": "GET /apache_pb.gif HTTPS/1.0",
|
||||
"status": "200",
|
||||
"bytes": "2326",
|
||||
"referer": null,
|
||||
"user_agent": null,
|
||||
"extra": "",
|
||||
"request_method": "GET",
|
||||
"request_url": "/apache_pb.gif",
|
||||
"request_version": "HTTPS/1.0"
|
||||
},
|
||||
{
|
||||
"host": "1.1.1.2",
|
||||
"ident": "-",
|
||||
"authuser": "-",
|
||||
"date": "11/Nov/2016:03:04:55 +0100",
|
||||
"day": "11",
|
||||
"month": "Nov",
|
||||
"year": "2016",
|
||||
"hour": "03",
|
||||
"minute": "04",
|
||||
"second": "55",
|
||||
"tz": "+0100",
|
||||
"request": "GET /",
|
||||
"status": "200",
|
||||
"bytes": "83",
|
||||
"referer": "-",
|
||||
"user_agent": "-",
|
||||
"extra": "- 9221 1.1.1.1",
|
||||
"request_method": "GET",
|
||||
"request_url": "/",
|
||||
"request_version": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.clf.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/clf.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/clf.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
119
docs/parsers/clf_s.md
Normal file
119
docs/parsers/clf_s.md
Normal file
@@ -0,0 +1,119 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.clf_s"></a>
|
||||
|
||||
# jc.parsers.clf\_s
|
||||
|
||||
jc - JSON Convert Common Log Format file streaming parser
|
||||
|
||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||
> Dictionaries (module)
|
||||
|
||||
This parser will handle the Common Log Format standard as specified at
|
||||
https://www.w3.org/Daemon/User/Config/Logging.html#common-logfile-format.
|
||||
|
||||
Combined Log Format is also supported. (Referer and User Agent fields added)
|
||||
|
||||
Extra fields may be present and will be enclosed in the `extra` field as
|
||||
a single string.
|
||||
|
||||
If a log line cannot be parsed, an object with an `unparsable` field will
|
||||
be present with a value of the original line.
|
||||
|
||||
The `epoch` calculated timestamp field is naive. (i.e. based on the
|
||||
local time of the system the parser is run on)
|
||||
|
||||
The `epoch_utc` calculated timestamp field is timezone-aware and is
|
||||
only available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat file.log | jc --clf-s
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
|
||||
result = jc.parse('clf_s', common_log_file_output.splitlines())
|
||||
for item in result:
|
||||
# do something
|
||||
|
||||
Schema:
|
||||
|
||||
Empty strings and `-` values are converted to `null`/`None`.
|
||||
|
||||
{
|
||||
"host": string,
|
||||
"ident": string,
|
||||
"authuser": string,
|
||||
"date": string,
|
||||
"day": integer,
|
||||
"month": string,
|
||||
"year": integer,
|
||||
"hour": integer,
|
||||
"minute": integer,
|
||||
"second": integer,
|
||||
"tz": string,
|
||||
"request": string,
|
||||
"request_method": string,
|
||||
"request_url": string,
|
||||
"request_version": string,
|
||||
"status": integer,
|
||||
"bytes": integer,
|
||||
"referer": string,
|
||||
"user_agent": string,
|
||||
"extra": string,
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"unparsable": string # [2]
|
||||
}
|
||||
|
||||
[0] naive timestamp
|
||||
[1] timezone-aware timestamp. Only available if timezone field is UTC
|
||||
[2] exists if the line was not able to be parsed
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat file.log | jc --clf-s
|
||||
{"host":"127.0.0.1","ident":"user-identifier","authuser":"frank","...}
|
||||
{"host":"1.1.1.2","ident":null,"authuser":null,"date":"11/Nov/2016...}
|
||||
...
|
||||
|
||||
$ cat file.log | jc --clf-s -r
|
||||
{"host":"127.0.0.1","ident":"user-identifier","authuser":"frank","...}
|
||||
{"host":"1.1.1.2","ident":"-","authuser":"-","date":"11/Nov/2016:0...}
|
||||
...
|
||||
|
||||
<a id="jc.parsers.clf_s.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
@add_jc_meta
|
||||
def parse(data: Iterable[str],
|
||||
raw: bool = False,
|
||||
quiet: bool = False,
|
||||
ignore_exceptions: bool = False) -> StreamingOutputType
|
||||
```
|
||||
|
||||
Main text parsing generator function. Returns an iterable object.
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (iterable) line-based text data to parse
|
||||
(e.g. sys.stdin or str.splitlines())
|
||||
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
ignore_exceptions: (boolean) ignore parsing exceptions if True
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
Iterable of Dictionaries
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/clf_s.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/clf_s.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,17 +1,61 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.crontab"></a>
|
||||
|
||||
# jc.parsers.crontab
|
||||
jc - JSON CLI output utility crontab file Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `crontab -l` command output and crontab
|
||||
file parser
|
||||
|
||||
specify --crontab as the first argument if the piped input is coming from a crontab file
|
||||
Supports `crontab -l` command output and crontab files.
|
||||
|
||||
Compatibility:
|
||||
Usage (cli):
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
$ crontab -l | jc --crontab
|
||||
|
||||
or
|
||||
|
||||
$ jc crontab -l
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('crontab', crontab_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"variables": [
|
||||
{
|
||||
"name": string,
|
||||
"value": string
|
||||
}
|
||||
],
|
||||
"schedule": [
|
||||
{
|
||||
"minute": [
|
||||
string
|
||||
],
|
||||
"hour": [
|
||||
string
|
||||
],
|
||||
"day_of_month": [
|
||||
string
|
||||
],
|
||||
"month": [
|
||||
string
|
||||
],
|
||||
"day_of_week": [
|
||||
string
|
||||
],
|
||||
"occurrence": string,
|
||||
"command": string
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/crontab | jc --crontab -p
|
||||
$ crontab -l | jc --crontab -p
|
||||
{
|
||||
"variables": [
|
||||
{
|
||||
@@ -128,59 +172,12 @@ Examples:
|
||||
]
|
||||
}
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.crontab.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Structured data with the following schema:
|
||||
|
||||
{
|
||||
"variables": [
|
||||
"name": string,
|
||||
"value": string
|
||||
],
|
||||
"schedule": [
|
||||
{
|
||||
"occurrence" string,
|
||||
"minute": [
|
||||
string
|
||||
],
|
||||
"hour": [
|
||||
string
|
||||
],
|
||||
"day_of_month": [
|
||||
string
|
||||
],
|
||||
"month": [
|
||||
string
|
||||
],
|
||||
"day_of_week": [
|
||||
string
|
||||
],
|
||||
"occurrence": string,
|
||||
"command": string
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -188,10 +185,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/crontab.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/crontab.py)
|
||||
|
||||
Version 1.9 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
197
docs/parsers/crontab_u.md
Normal file
197
docs/parsers/crontab_u.md
Normal file
@@ -0,0 +1,197 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.crontab_u"></a>
|
||||
|
||||
# jc.parsers.crontab\_u
|
||||
|
||||
jc - JSON Convert `crontab -l` command output and crontab
|
||||
file parser
|
||||
|
||||
This version of the `crontab -l` parser supports output that contains user
|
||||
information for processes.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ crontab -l | jc --crontab-u
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('crontab_u', crontab_u_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"variables": [
|
||||
{
|
||||
"name": string,
|
||||
"value": string
|
||||
}
|
||||
],
|
||||
"schedule": [
|
||||
{
|
||||
"minute": [
|
||||
string
|
||||
],
|
||||
"hour": [
|
||||
string
|
||||
],
|
||||
"day_of_month": [
|
||||
string
|
||||
],
|
||||
"month": [
|
||||
string
|
||||
],
|
||||
"day_of_week": [
|
||||
string
|
||||
],
|
||||
"occurrence": string,
|
||||
"user": string,
|
||||
"command": string
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/crontab | jc --crontab-u -p
|
||||
{
|
||||
"variables": [
|
||||
{
|
||||
"name": "PATH",
|
||||
"value": "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sb..."
|
||||
},
|
||||
{
|
||||
"name": "SHELL",
|
||||
"value": "/bin/sh"
|
||||
}
|
||||
],
|
||||
"schedule": [
|
||||
{
|
||||
"minute": [
|
||||
"25"
|
||||
],
|
||||
"hour": [
|
||||
"6"
|
||||
],
|
||||
"day_of_month": [
|
||||
"*"
|
||||
],
|
||||
"month": [
|
||||
"*"
|
||||
],
|
||||
"day_of_week": [
|
||||
"*"
|
||||
],
|
||||
"user": "root",
|
||||
"command": "test -x /usr/sbin/anacron || ( cd / && run-parts ..."
|
||||
},
|
||||
{
|
||||
"minute": [
|
||||
"47"
|
||||
],
|
||||
"hour": [
|
||||
"6"
|
||||
],
|
||||
"day_of_month": [
|
||||
"*"
|
||||
],
|
||||
"month": [
|
||||
"*"
|
||||
],
|
||||
"day_of_week": [
|
||||
"7"
|
||||
],
|
||||
"user": "root",
|
||||
"command": "test -x /usr/sbin/anacron || ( cd / && run-parts ..."
|
||||
},
|
||||
{
|
||||
"minute": [
|
||||
"52"
|
||||
],
|
||||
"hour": [
|
||||
"6"
|
||||
],
|
||||
"day_of_month": [
|
||||
"1"
|
||||
],
|
||||
"month": [
|
||||
"*"
|
||||
],
|
||||
"day_of_week": [
|
||||
"*"
|
||||
],
|
||||
"user": "root",
|
||||
"command": "test -x /usr/sbin/anacron || ( cd / && run-parts ..."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
$ cat /etc/crontab | jc --crontab-u -p -r
|
||||
{
|
||||
"variables": [
|
||||
{
|
||||
"name": "PATH",
|
||||
"value": "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/..."
|
||||
},
|
||||
{
|
||||
"name": "SHELL",
|
||||
"value": "/bin/sh"
|
||||
}
|
||||
],
|
||||
"schedule": [
|
||||
{
|
||||
"minute": "25",
|
||||
"hour": "6",
|
||||
"day_of_month": "*",
|
||||
"month": "*",
|
||||
"day_of_week": "*",
|
||||
"user": "root",
|
||||
"command": "test -x /usr/sbin/anacron || ( cd / && run-parts ..."
|
||||
},
|
||||
{
|
||||
"minute": "47",
|
||||
"hour": "6",
|
||||
"day_of_month": "*",
|
||||
"month": "*",
|
||||
"day_of_week": "7",
|
||||
"user": "root",
|
||||
"command": "test -x /usr/sbin/anacron || ( cd / && run-parts ..."
|
||||
},
|
||||
{
|
||||
"minute": "52",
|
||||
"hour": "6",
|
||||
"day_of_month": "1",
|
||||
"month": "*",
|
||||
"day_of_week": "*",
|
||||
"user": "root",
|
||||
"command": "test -x /usr/sbin/anacron || ( cd / && run-parts ..."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
<a id="jc.parsers.crontab_u.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/crontab_u.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/crontab_u.py)
|
||||
|
||||
Version 1.10 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
107
docs/parsers/csv.md
Normal file
107
docs/parsers/csv.md
Normal file
@@ -0,0 +1,107 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.csv"></a>
|
||||
|
||||
# jc.parsers.csv
|
||||
|
||||
jc - JSON Convert `csv` file parser
|
||||
|
||||
The `csv` parser will attempt to automatically detect the delimiter
|
||||
character. If the delimiter cannot be detected it will default to comma.
|
||||
The first row of the file must be a header row.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat file.csv | jc --csv
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('csv', csv_output)
|
||||
|
||||
Schema:
|
||||
|
||||
CSV file converted to a Dictionary:
|
||||
https://docs.python.org/3/library/csv.html
|
||||
|
||||
[
|
||||
{
|
||||
"column_name1": string,
|
||||
"column_name2": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat homes.csv
|
||||
"Sell", "List", "Living", "Rooms", "Beds", "Baths", "Age", "Acres"...
|
||||
142, 160, 28, 10, 5, 3, 60, 0.28, 3167
|
||||
175, 180, 18, 8, 4, 1, 12, 0.43, 4033
|
||||
129, 132, 13, 6, 3, 1, 41, 0.33, 1471
|
||||
...
|
||||
|
||||
$ cat homes.csv | jc --csv -p
|
||||
[
|
||||
{
|
||||
"Sell": "142",
|
||||
"List": "160",
|
||||
"Living": "28",
|
||||
"Rooms": "10",
|
||||
"Beds": "5",
|
||||
"Baths": "3",
|
||||
"Age": "60",
|
||||
"Acres": "0.28",
|
||||
"Taxes": "3167"
|
||||
},
|
||||
{
|
||||
"Sell": "175",
|
||||
"List": "180",
|
||||
"Living": "18",
|
||||
"Rooms": "8",
|
||||
"Beds": "4",
|
||||
"Baths": "1",
|
||||
"Age": "12",
|
||||
"Acres": "0.43",
|
||||
"Taxes": "4033"
|
||||
},
|
||||
{
|
||||
"Sell": "129",
|
||||
"List": "132",
|
||||
"Living": "13",
|
||||
"Rooms": "6",
|
||||
"Beds": "3",
|
||||
"Baths": "1",
|
||||
"Age": "41",
|
||||
"Acres": "0.33",
|
||||
"Taxes": "1471"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.csv.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: Union[str, bytes],
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/csv.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/csv.py)
|
||||
|
||||
Version 1.5 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
91
docs/parsers/csv_s.md
Normal file
91
docs/parsers/csv_s.md
Normal file
@@ -0,0 +1,91 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.csv_s"></a>
|
||||
|
||||
# jc.parsers.csv\_s
|
||||
|
||||
jc - JSON Convert `csv` file streaming parser
|
||||
|
||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||
> Dictionaries (module)
|
||||
|
||||
The `csv` streaming parser will attempt to automatically detect the
|
||||
delimiter character. If the delimiter cannot be detected it will default
|
||||
to comma. The first row of the file must be a header row.
|
||||
|
||||
> Note: The first 100 rows are read into memory to enable delimiter
|
||||
> detection, then the rest of the rows are loaded lazily.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat file.csv | jc --csv-s
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
|
||||
result = jc.parse('csv_s', csv_output.splitlines())
|
||||
for item in result:
|
||||
# do something
|
||||
|
||||
Schema:
|
||||
|
||||
CSV file converted to a Dictionary:
|
||||
https://docs.python.org/3/library/csv.html
|
||||
|
||||
{
|
||||
"column_name1": string,
|
||||
"column_name2": string,
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
"success": boolean, # false if error parsing
|
||||
"error": string, # exists if "success" is false
|
||||
"line": string # exists if "success" is false
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat homes.csv
|
||||
"Sell", "List", "Living", "Rooms", "Beds", "Baths", "Age", "Acres"...
|
||||
142, 160, 28, 10, 5, 3, 60, 0.28, 3167
|
||||
175, 180, 18, 8, 4, 1, 12, 0.43, 4033
|
||||
129, 132, 13, 6, 3, 1, 41, 0.33, 1471
|
||||
...
|
||||
|
||||
$ cat homes.csv | jc --csv-s
|
||||
{"Sell":"142","List":"160","Living":"28","Rooms":"10","Beds":"5"...}
|
||||
{"Sell":"175","List":"180","Living":"18","Rooms":"8","Beds":"4"...}
|
||||
{"Sell":"129","List":"132","Living":"13","Rooms":"6","Beds":"3"...}
|
||||
...
|
||||
|
||||
<a id="jc.parsers.csv_s.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
@add_jc_meta
|
||||
def parse(data, raw=False, quiet=False, ignore_exceptions=False)
|
||||
```
|
||||
|
||||
Main text parsing generator function. Returns an iterable object.
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (iterable) line-based text data to parse
|
||||
(e.g. sys.stdin or str.splitlines())
|
||||
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
ignore_exceptions: (boolean) ignore parsing exceptions if True
|
||||
|
||||
Returns:
|
||||
|
||||
Iterable of Dictionaries
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/csv_s.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/csv_s.py)
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
309
docs/parsers/curl_head.md
Normal file
309
docs/parsers/curl_head.md
Normal file
@@ -0,0 +1,309 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.curl_head"></a>
|
||||
|
||||
# jc.parsers.curl\_head
|
||||
|
||||
jc - JSON Convert `curl --head` command output parser
|
||||
|
||||
This parser converts standard and verbose `curl --head` output.
|
||||
|
||||
When converting verbose output from `curl` (to gather request headers, for
|
||||
example) you will need to redirect STDERR to STDOUT with `2>&1`. The magic
|
||||
syntax will not work in this case.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ curl --head www.example.com | jc --curl-head
|
||||
$ curl -Ivs www.example.com 2>&1 | jc --curl-head
|
||||
|
||||
or
|
||||
|
||||
$ jc curl --head www.example.com
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('curl_head', curl_head_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"_type": string, # request or response
|
||||
"_request_method": string,
|
||||
"_request_uri": string,
|
||||
"_request_version": string,
|
||||
"_response_version": string,
|
||||
"_response_status": integer,
|
||||
"_response_reason": string or null,
|
||||
"<header>": string,
|
||||
|
||||
# well-known headers:
|
||||
|
||||
"accept": [
|
||||
string
|
||||
],
|
||||
"accept-ch": [
|
||||
string
|
||||
],
|
||||
"accept-ch-lifetime": integer,
|
||||
"accept-encoding": [
|
||||
string
|
||||
],
|
||||
"accept-language": [
|
||||
string
|
||||
],
|
||||
"accept-patch": [
|
||||
string
|
||||
],
|
||||
"accept-post": [
|
||||
string
|
||||
],
|
||||
"accept-ranges": [
|
||||
string
|
||||
],
|
||||
"access-control-allow-headers": [
|
||||
string
|
||||
],
|
||||
"access-control-allow-methods": [
|
||||
string
|
||||
],
|
||||
"access-control-expose-headers": [
|
||||
string
|
||||
],
|
||||
"access-control-max-age": integer,
|
||||
"access-control-request-headers": [
|
||||
string
|
||||
],
|
||||
"age": integer,
|
||||
"allow": [
|
||||
string
|
||||
],
|
||||
"alt-svc": [
|
||||
string
|
||||
],
|
||||
"cache-control": [
|
||||
string
|
||||
],
|
||||
"clear-site-data": [
|
||||
string
|
||||
],
|
||||
"connection": [
|
||||
string
|
||||
],
|
||||
"content-encoding": [
|
||||
string
|
||||
],
|
||||
"content-dpr": integer,
|
||||
"content-language": [
|
||||
string
|
||||
],
|
||||
"content-length": integer,
|
||||
"content-security-policy": [
|
||||
string
|
||||
],
|
||||
"content-security-policy-report-only": [
|
||||
string
|
||||
],
|
||||
"cookie": [
|
||||
string
|
||||
],
|
||||
"critical-ch": [
|
||||
string
|
||||
],
|
||||
"date": string,
|
||||
"date_epoch_utc": integer,
|
||||
"expect-ct": [
|
||||
string
|
||||
],
|
||||
"expires": string,
|
||||
"expires_epoch_utc": integer,
|
||||
"device-memory": integer,
|
||||
"downlink": integer,
|
||||
"dpr": integer,
|
||||
"forwarded": [
|
||||
string
|
||||
],
|
||||
"if-match": [
|
||||
string
|
||||
],
|
||||
"if-modified-since": string,
|
||||
"if-modified-since_epoch_utc": integer,
|
||||
"if-none-match": [
|
||||
string
|
||||
],
|
||||
"if-range": string,
|
||||
"if-range_epoch_utc": integer,
|
||||
"if-unmodified-since": string,
|
||||
"if-unmodified-since_epoch_utc": integer,
|
||||
"im": [
|
||||
string
|
||||
],
|
||||
"keep-alive": [
|
||||
string
|
||||
],
|
||||
"large-allocation": integer,
|
||||
"last-modified": string,
|
||||
"last-modified_epoch_utc": integer,
|
||||
"link": [
|
||||
string
|
||||
],
|
||||
"max-forwards": integer,
|
||||
"memento-datetime": string,
|
||||
"memento-datetime_epoch_utc": integer,
|
||||
"permissions-policy": [
|
||||
string
|
||||
],
|
||||
"permissions-policy-report-only": [
|
||||
string
|
||||
],
|
||||
"pragma": [
|
||||
string
|
||||
],
|
||||
"proxy-authenticate": [
|
||||
string
|
||||
],
|
||||
"reporting-endpoints": [
|
||||
string
|
||||
],
|
||||
"retry-after": string,
|
||||
"retry-after_epoch_utc": integer,
|
||||
"rtt": integer,
|
||||
"sec-ch-ua": [
|
||||
string
|
||||
],
|
||||
"sec-ch-ua-full-version-list": [
|
||||
string
|
||||
],
|
||||
"server": [
|
||||
string
|
||||
],
|
||||
"server-timing": [
|
||||
string
|
||||
],
|
||||
"set-cookie": [
|
||||
string
|
||||
],
|
||||
"timing-allow-origin": [
|
||||
string
|
||||
],
|
||||
"trailer": [
|
||||
string
|
||||
],
|
||||
"transfer-encoding": [
|
||||
string
|
||||
],
|
||||
"upgrade": [
|
||||
string
|
||||
],
|
||||
"upgrade-insecure-requests": integer,
|
||||
"vary": [
|
||||
string
|
||||
],
|
||||
"via": [
|
||||
string
|
||||
],
|
||||
"warning": [
|
||||
string
|
||||
],
|
||||
"www-authenticate": [
|
||||
string
|
||||
],
|
||||
"x-cache-hits": [
|
||||
integer
|
||||
],
|
||||
"x-content-duration": float
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ curl --head www.example.com | jc --curl-head -p
|
||||
[
|
||||
{
|
||||
"_type": "response",
|
||||
"_response_version": "HTTP/1.1",
|
||||
"_response_status": 200,
|
||||
"_response_reason": [
|
||||
"OK"
|
||||
],
|
||||
"accept-ranges": [
|
||||
"bytes"
|
||||
],
|
||||
"age": 241144,
|
||||
"cache-control": [
|
||||
"max-age=604800"
|
||||
],
|
||||
"content-type": "text/html; charset=UTF-8",
|
||||
"date": "Sun, 04 Feb 2024 23:26:29 GMT",
|
||||
"etag": "\"3147526947\"",
|
||||
"expires": "Sun, 11 Feb 2024 23:26:29 GMT",
|
||||
"last-modified": "Thu, 17 Oct 2019 07:18:26 GMT",
|
||||
"server": [
|
||||
"ECS (sac/2508)"
|
||||
],
|
||||
"x-cache": "HIT",
|
||||
"content-length": 1256,
|
||||
"date_epoch_utc": 1707089189,
|
||||
"expires_epoch_utc": 1707693989,
|
||||
"last-modified_epoch_utc": 1571296706
|
||||
}
|
||||
]
|
||||
|
||||
$ curl --head www.example.com | jc --curl-head -p -r
|
||||
[
|
||||
{
|
||||
"_type": "response",
|
||||
"_response_version": "HTTP/1.1",
|
||||
"_response_status": 200,
|
||||
"_response_reason": [
|
||||
"OK"
|
||||
],
|
||||
"accept-ranges": [
|
||||
"bytes"
|
||||
],
|
||||
"age": "225102",
|
||||
"cache-control": [
|
||||
"max-age=604800"
|
||||
],
|
||||
"content-type": "text/html; charset=UTF-8",
|
||||
"date": "Sun, 04 Feb 2024 23:28:17 GMT",
|
||||
"etag": "\"3147526947\"",
|
||||
"expires": "Sun, 11 Feb 2024 23:28:17 GMT",
|
||||
"last-modified": "Thu, 17 Oct 2019 07:18:26 GMT",
|
||||
"server": [
|
||||
"ECS (sac/2575)"
|
||||
],
|
||||
"x-cache": "HIT",
|
||||
"content-length": "1256"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.curl_head.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/curl_head.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/curl_head.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
107
docs/parsers/date.md
Normal file
107
docs/parsers/date.md
Normal file
@@ -0,0 +1,107 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.date"></a>
|
||||
|
||||
# jc.parsers.date
|
||||
|
||||
jc - JSON Convert `date` command output parser
|
||||
|
||||
The `epoch` calculated timestamp field is naive. (i.e. based on the local
|
||||
time of the system the parser is run on)
|
||||
|
||||
The `epoch_utc` calculated timestamp field is timezone-aware and is only
|
||||
available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ date | jc --date
|
||||
|
||||
or
|
||||
|
||||
$ jc date
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('date', date_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"year": integer,
|
||||
"month": string,
|
||||
"month_num": integer,
|
||||
"day": integer,
|
||||
"weekday": string,
|
||||
"weekday_num": integer,
|
||||
"hour": integer,
|
||||
"hour_24": integer,
|
||||
"minute": integer,
|
||||
"second": integer,
|
||||
"period": string,
|
||||
"timezone": string,
|
||||
"utc_offset": string, # null if timezone field is not UTC
|
||||
"day_of_year": integer,
|
||||
"week_of_year": integer,
|
||||
"iso": string,
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"timezone_aware": boolean # [2]
|
||||
}
|
||||
|
||||
[0] naive timestamp
|
||||
[1] timezone-aware timestamp. Only available if timezone field is UTC
|
||||
[2] if true, all fields are correctly based on UTC
|
||||
|
||||
Examples:
|
||||
|
||||
$ date | jc --date -p
|
||||
{
|
||||
"year": 2021,
|
||||
"month": "Mar",
|
||||
"month_num": 3,
|
||||
"day": 25,
|
||||
"weekday": "Thu",
|
||||
"weekday_num": 4,
|
||||
"hour": 2,
|
||||
"hour_24": 2,
|
||||
"minute": 2,
|
||||
"second": 26,
|
||||
"period": "AM",
|
||||
"timezone": "UTC",
|
||||
"utc_offset": "+0000",
|
||||
"day_of_year": 84,
|
||||
"week_of_year": 12,
|
||||
"iso": "2021-03-25T02:02:26+00:00",
|
||||
"epoch": 1616662946,
|
||||
"epoch_utc": 1616637746,
|
||||
"timezone_aware": true
|
||||
}
|
||||
|
||||
<a id="jc.parsers.date.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, freebsd
|
||||
|
||||
Source: [`jc/parsers/date.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/date.py)
|
||||
|
||||
This parser can be used with the `--slurp` command-line option.
|
||||
|
||||
Version 2.6 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
95
docs/parsers/datetime_iso.md
Normal file
95
docs/parsers/datetime_iso.md
Normal file
@@ -0,0 +1,95 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.datetime_iso"></a>
|
||||
|
||||
# jc.parsers.datetime\_iso
|
||||
|
||||
jc - JSON Convert ISO 8601 Datetime string parser
|
||||
|
||||
This parser supports standard ISO 8601 strings that include both date and
|
||||
time. If no timezone or offset information is available in the string, then
|
||||
UTC timezone is used.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ echo "2022-07-20T14:52:45Z" | jc --iso-datetime
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('iso_datetime', iso_8601_string)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"year": integer,
|
||||
"month": string,
|
||||
"month_num": integer,
|
||||
"day": integer,
|
||||
"weekday": string,
|
||||
"weekday_num": integer,
|
||||
"hour": integer,
|
||||
"hour_24": integer,
|
||||
"minute": integer,
|
||||
"second": integer,
|
||||
"microsecond": integer,
|
||||
"period": string,
|
||||
"utc_offset": string,
|
||||
"day_of_year": integer,
|
||||
"week_of_year": integer,
|
||||
"iso": string,
|
||||
"timestamp": integer # [0]
|
||||
}
|
||||
|
||||
[0] timezone aware UNIX timestamp expressed in UTC
|
||||
|
||||
Examples:
|
||||
|
||||
$ echo "2022-07-20T14:52:45Z" | jc --iso-datetime -p
|
||||
{
|
||||
"year": 2022,
|
||||
"month": "Jul",
|
||||
"month_num": 7,
|
||||
"day": 20,
|
||||
"weekday": "Wed",
|
||||
"weekday_num": 3,
|
||||
"hour": 2,
|
||||
"hour_24": 14,
|
||||
"minute": 52,
|
||||
"second": 45,
|
||||
"microsecond": 0,
|
||||
"period": "PM",
|
||||
"utc_offset": "+0000",
|
||||
"day_of_year": 201,
|
||||
"week_of_year": 29,
|
||||
"iso": "2022-07-20T14:52:45+00:00",
|
||||
"timestamp": 1658328765
|
||||
}
|
||||
|
||||
<a id="jc.parsers.datetime_iso.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, aix, freebsd, darwin, win32, cygwin
|
||||
|
||||
Source: [`jc/parsers/datetime_iso.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/datetime_iso.py)
|
||||
|
||||
This parser can be used with the `--slurp` command-line option.
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
107
docs/parsers/debconf_show.md
Normal file
107
docs/parsers/debconf_show.md
Normal file
@@ -0,0 +1,107 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.debconf_show"></a>
|
||||
|
||||
# jc.parsers.debconf\_show
|
||||
|
||||
jc - JSON Convert `debconf-show` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ debconf-show onlyoffice-documentserver | jc --debconf-show
|
||||
|
||||
or
|
||||
|
||||
$ jc debconf-show onlyoffice-documentserver
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('debconf_show', debconf_show_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"asked": boolean,
|
||||
"packagename": string,
|
||||
"name": string,
|
||||
"value": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ debconf-show onlyoffice-documentserver | jc --debconf-show -p
|
||||
[
|
||||
{
|
||||
"asked": true,
|
||||
"packagename": "onlyoffice",
|
||||
"name": "jwt_secret",
|
||||
"value": "aL8ei2iereuzee7cuJ6Cahjah1ixee2ah"
|
||||
},
|
||||
{
|
||||
"asked": false,
|
||||
"packagename": "onlyoffice",
|
||||
"name": "db_pwd",
|
||||
"value": "(password omitted)"
|
||||
},
|
||||
{
|
||||
"asked": true,
|
||||
"packagename": "onlyoffice",
|
||||
"name": "rabbitmq_pwd",
|
||||
"value": "(password omitted)"
|
||||
},
|
||||
{
|
||||
"asked": true,
|
||||
"packagename": "onlyoffice",
|
||||
"name": "db_port",
|
||||
"value": "5432"
|
||||
},
|
||||
{
|
||||
"asked": true,
|
||||
"packagename": "onlyoffice",
|
||||
"name": "db_user",
|
||||
"value": "onlyoffice"
|
||||
},
|
||||
{
|
||||
"asked": true,
|
||||
"packagename": "onlyoffice",
|
||||
"name": "rabbitmq_proto",
|
||||
"value": "amqp"
|
||||
},
|
||||
{
|
||||
"asked": true,
|
||||
"packagename": "onlyoffice",
|
||||
"name": "cluster_mode",
|
||||
"value": "false"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.debconf_show.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/debconf_show.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/debconf_show.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,13 +1,41 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.df"></a>
|
||||
|
||||
# jc.parsers.df
|
||||
jc - JSON CLI output utility df Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `df` command output parser
|
||||
|
||||
specify --df as the first argument if the piped input is coming from df
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ df | jc --df
|
||||
|
||||
'linux', 'darwin'
|
||||
or
|
||||
|
||||
$ jc df
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('df', df_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filesystem": string,
|
||||
"size": string,
|
||||
"1k_blocks": integer,
|
||||
"512_blocks": integer,
|
||||
"used": integer,
|
||||
"available": integer,
|
||||
"capacity_percent": integer,
|
||||
"ifree": integer,
|
||||
"iused": integer,
|
||||
"use_percent": integer,
|
||||
"iused_percent": integer,
|
||||
"mounted_on": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -69,46 +97,12 @@ Examples:
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.df.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filesystem": string,
|
||||
"size": string,
|
||||
"1k_blocks": integer,
|
||||
"512_blocks": integer,
|
||||
"used": integer,
|
||||
"available": integer,
|
||||
"capacity_percent": integer,
|
||||
"ifree": integer,
|
||||
"iused": integer,
|
||||
"use_percent": integer,
|
||||
"iused_percent": integer,
|
||||
"mounted_on": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -116,10 +110,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, freebsd
|
||||
|
||||
Source: [`jc/parsers/df.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/df.py)
|
||||
|
||||
Version 1.11 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
@@ -1,20 +1,120 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.dig"></a>
|
||||
|
||||
# jc.parsers.dig
|
||||
jc - JSON CLI output utility dig Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `dig` command output parser
|
||||
|
||||
Specify --dig as the first argument if the piped input is coming from dig
|
||||
Options supported:
|
||||
- `+noall +answer` options are supported in cases where only the answer
|
||||
information is desired.
|
||||
- `+axfr` option is supported on its own
|
||||
- `+nsid` option is supported
|
||||
|
||||
Compatibility:
|
||||
The `when_epoch` calculated timestamp field is naive. (i.e. based on the
|
||||
local time of the system the parser is run on)
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||
The `when_epoch_utc` calculated timestamp field is timezone-aware and is
|
||||
only available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ dig example.com | jc --dig
|
||||
|
||||
or
|
||||
|
||||
$ jc dig example.com
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('dig', dig_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"id": integer,
|
||||
"opcode": string,
|
||||
"status": string,
|
||||
"flags": [
|
||||
string
|
||||
],
|
||||
"query_num": integer,
|
||||
"answer_num": integer,
|
||||
"authority_num": integer,
|
||||
"additional_num": integer,
|
||||
"axfr": [
|
||||
{
|
||||
"name": string,
|
||||
"class": string,
|
||||
"type": string,
|
||||
"ttl": integer,
|
||||
"data": string
|
||||
}
|
||||
],
|
||||
"opt_pseudosection": {
|
||||
"edns": {
|
||||
"version": integer,
|
||||
"flags": [
|
||||
string
|
||||
],
|
||||
"udp": integer
|
||||
},
|
||||
"cookie": string
|
||||
},
|
||||
"question": {
|
||||
"name": string,
|
||||
"class": string,
|
||||
"type": string
|
||||
},
|
||||
"answer": [
|
||||
{
|
||||
"name": string,
|
||||
"class": string,
|
||||
"type": string,
|
||||
"ttl": integer,
|
||||
"data": string
|
||||
}
|
||||
],
|
||||
"additional": [
|
||||
{
|
||||
"name": string,
|
||||
"class": string,
|
||||
"type": string,
|
||||
"ttl": integer,
|
||||
"data": string
|
||||
}
|
||||
],
|
||||
"authority": [
|
||||
{
|
||||
"name": string,
|
||||
"class": string,
|
||||
"type": string,
|
||||
"ttl": integer,
|
||||
"data": string
|
||||
}
|
||||
],
|
||||
"query_size": integer,
|
||||
"query_time": integer, # in msec
|
||||
"server": string,
|
||||
"when": string,
|
||||
"when_epoch": integer, # [0]
|
||||
"when_epoch_utc": integer, # [1]
|
||||
"rcvd": integer
|
||||
"size": string
|
||||
}
|
||||
]
|
||||
|
||||
[0] naive timestamp if "when" field is parsable, else null
|
||||
[1] timezone aware timestamp available for UTC, else null
|
||||
|
||||
Examples:
|
||||
|
||||
$ dig cnn.com www.cnn.com @205.251.194.64 | jc --dig -p
|
||||
$ dig example.com | jc --dig -p
|
||||
[
|
||||
{
|
||||
"id": 34128,
|
||||
"id": 2951,
|
||||
"opcode": "QUERY",
|
||||
"status": "NOERROR",
|
||||
"flags": [
|
||||
@@ -23,117 +123,43 @@ Examples:
|
||||
"ra"
|
||||
],
|
||||
"query_num": 1,
|
||||
"answer_num": 4,
|
||||
"answer_num": 1,
|
||||
"authority_num": 0,
|
||||
"additional_num": 1,
|
||||
"opt_pseudosection": {
|
||||
"edns": {
|
||||
"version": 0,
|
||||
"flags": [],
|
||||
"udp": 4096
|
||||
}
|
||||
},
|
||||
"question": {
|
||||
"name": "cnn.com.",
|
||||
"name": "example.com.",
|
||||
"class": "IN",
|
||||
"type": "A"
|
||||
},
|
||||
"answer": [
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"name": "example.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": 60,
|
||||
"data": "151.101.65.67"
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": 60,
|
||||
"data": "151.101.193.67"
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": 60,
|
||||
"data": "151.101.1.67"
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": 60,
|
||||
"data": "151.101.129.67"
|
||||
"ttl": 39302,
|
||||
"data": "93.184.216.34"
|
||||
}
|
||||
],
|
||||
"query_time": 37,
|
||||
"server": "2600",
|
||||
"when": "Tue Nov 12 07:14:42 PST 2019",
|
||||
"rcvd": 100
|
||||
},
|
||||
{
|
||||
"id": 15273,
|
||||
"opcode": "QUERY",
|
||||
"status": "NOERROR",
|
||||
"flags": [
|
||||
"qr",
|
||||
"aa",
|
||||
"rd"
|
||||
],
|
||||
"query_num": 1,
|
||||
"answer_num": 1,
|
||||
"authority_num": 4,
|
||||
"additional_num": 1,
|
||||
"question": {
|
||||
"name": "www.cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A"
|
||||
},
|
||||
"answer": [
|
||||
{
|
||||
"name": "www.cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "CNAME",
|
||||
"ttl": 300,
|
||||
"data": "turner-tls.map.fastly.net."
|
||||
}
|
||||
],
|
||||
"authority": [
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "NS",
|
||||
"ttl": 3600,
|
||||
"data": "ns-1086.awsdns-07.org."
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "NS",
|
||||
"ttl": 3600,
|
||||
"data": "ns-1630.awsdns-11.co.uk."
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "NS",
|
||||
"ttl": 3600,
|
||||
"data": "ns-47.awsdns-05.com."
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "NS",
|
||||
"ttl": 3600,
|
||||
"data": "ns-576.awsdns-08.net."
|
||||
}
|
||||
],
|
||||
"query_time": 23,
|
||||
"server": "205.251.194.64#53(205.251.194.64)",
|
||||
"when": "Tue Nov 12 07:14:42 PST 2019",
|
||||
"rcvd": 212
|
||||
"query_time": 49,
|
||||
"server": "2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)",
|
||||
"when": "Fri Apr 16 16:05:10 PDT 2021",
|
||||
"rcvd": 56,
|
||||
"when_epoch": 1618614310,
|
||||
"when_epoch_utc": null
|
||||
}
|
||||
]
|
||||
|
||||
$ dig cnn.com www.cnn.com @205.251.194.64 | jc --dig -p -r
|
||||
[
|
||||
{
|
||||
"id": "23843",
|
||||
"id": "46052",
|
||||
"opcode": "QUERY",
|
||||
"status": "NOERROR",
|
||||
"flags": [
|
||||
@@ -142,117 +168,41 @@ Examples:
|
||||
"ra"
|
||||
],
|
||||
"query_num": "1",
|
||||
"answer_num": "4",
|
||||
"answer_num": "1",
|
||||
"authority_num": "0",
|
||||
"additional_num": "1",
|
||||
"opt_pseudosection": {
|
||||
"edns": {
|
||||
"version": "0",
|
||||
"flags": [],
|
||||
"udp": "4096"
|
||||
}
|
||||
},
|
||||
"question": {
|
||||
"name": "cnn.com.",
|
||||
"name": "example.com.",
|
||||
"class": "IN",
|
||||
"type": "A"
|
||||
},
|
||||
"answer": [
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"name": "example.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": "30",
|
||||
"data": "151.101.193.67"
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": "30",
|
||||
"data": "151.101.1.67"
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": "30",
|
||||
"data": "151.101.65.67"
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": "30",
|
||||
"data": "151.101.129.67"
|
||||
"ttl": "40426",
|
||||
"data": "93.184.216.34"
|
||||
}
|
||||
],
|
||||
"query_time": "24 msec",
|
||||
"server": "192.168.1.254#53(192.168.1.254)",
|
||||
"when": "Tue Nov 12 07:16:19 PST 2019",
|
||||
"rcvd": "100"
|
||||
},
|
||||
{
|
||||
"id": "8266",
|
||||
"opcode": "QUERY",
|
||||
"status": "NOERROR",
|
||||
"flags": [
|
||||
"qr",
|
||||
"aa",
|
||||
"rd"
|
||||
],
|
||||
"query_num": "1",
|
||||
"answer_num": "1",
|
||||
"authority_num": "4",
|
||||
"additional_num": "1",
|
||||
"question": {
|
||||
"name": "www.cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A"
|
||||
},
|
||||
"answer": [
|
||||
{
|
||||
"name": "www.cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "CNAME",
|
||||
"ttl": "300",
|
||||
"data": "turner-tls.map.fastly.net."
|
||||
}
|
||||
],
|
||||
"authority": [
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "NS",
|
||||
"ttl": "3600",
|
||||
"data": "ns-1086.awsdns-07.org."
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "NS",
|
||||
"ttl": "3600",
|
||||
"data": "ns-1630.awsdns-11.co.uk."
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "NS",
|
||||
"ttl": "3600",
|
||||
"data": "ns-47.awsdns-05.com."
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "NS",
|
||||
"ttl": "3600",
|
||||
"data": "ns-576.awsdns-08.net."
|
||||
}
|
||||
],
|
||||
"query_time": "26 msec",
|
||||
"server": "205.251.194.64#53(205.251.194.64)",
|
||||
"when": "Tue Nov 12 07:16:19 PST 2019",
|
||||
"rcvd": "212"
|
||||
"query_time": "48 msec",
|
||||
"server": "2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)",
|
||||
"when": "Fri Apr 16 16:06:12 PDT 2021",
|
||||
"rcvd": "56"
|
||||
}
|
||||
]
|
||||
|
||||
$ dig -x 1.1.1.1 | jc --dig -p
|
||||
[
|
||||
{
|
||||
"id": 34898,
|
||||
"id": 20785,
|
||||
"opcode": "QUERY",
|
||||
"status": "NOERROR",
|
||||
"flags": [
|
||||
@@ -264,6 +214,13 @@ Examples:
|
||||
"answer_num": 1,
|
||||
"authority_num": 0,
|
||||
"additional_num": 1,
|
||||
"opt_pseudosection": {
|
||||
"edns": {
|
||||
"version": 0,
|
||||
"flags": [],
|
||||
"udp": 4096
|
||||
}
|
||||
},
|
||||
"question": {
|
||||
"name": "1.1.1.1.in-addr.arpa.",
|
||||
"class": "IN",
|
||||
@@ -274,21 +231,23 @@ Examples:
|
||||
"name": "1.1.1.1.in-addr.arpa.",
|
||||
"class": "IN",
|
||||
"type": "PTR",
|
||||
"ttl": 952,
|
||||
"ttl": 1800,
|
||||
"data": "one.one.one.one."
|
||||
}
|
||||
],
|
||||
"query_time": 103,
|
||||
"server": "2600",
|
||||
"when": "Tue Nov 12 07:15:33 PST 2019",
|
||||
"rcvd": 78
|
||||
"query_time": 40,
|
||||
"server": "2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)",
|
||||
"when": "Sat Apr 17 14:50:50 PDT 2021",
|
||||
"rcvd": 78,
|
||||
"when_epoch": 1618696250,
|
||||
"when_epoch_utc": null
|
||||
}
|
||||
]
|
||||
|
||||
$ dig -x 1.1.1.1 | jc --dig -p -r
|
||||
[
|
||||
{
|
||||
"id": "50986",
|
||||
"id": "32644",
|
||||
"opcode": "QUERY",
|
||||
"status": "NOERROR",
|
||||
"flags": [
|
||||
@@ -300,6 +259,13 @@ Examples:
|
||||
"answer_num": "1",
|
||||
"authority_num": "0",
|
||||
"additional_num": "1",
|
||||
"opt_pseudosection": {
|
||||
"edns": {
|
||||
"version": "0",
|
||||
"flags": [],
|
||||
"udp": "4096"
|
||||
}
|
||||
},
|
||||
"question": {
|
||||
"name": "1.1.1.1.in-addr.arpa.",
|
||||
"class": "IN",
|
||||
@@ -314,78 +280,55 @@ Examples:
|
||||
"data": "one.one.one.one."
|
||||
}
|
||||
],
|
||||
"query_time": "38 msec",
|
||||
"server": "2600",
|
||||
"when": "Tue Nov 12 07:17:19 PST 2019",
|
||||
"query_time": "52 msec",
|
||||
"server": "2600:1700:bab0:d40::1#53(2600:1700:bab0:d40::1)",
|
||||
"when": "Sat Apr 17 14:51:46 PDT 2021",
|
||||
"rcvd": "78"
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
$ dig +noall +answer cnn.com | jc --dig -p
|
||||
[
|
||||
{
|
||||
"id": integer,
|
||||
"opcode": string,
|
||||
"status": string,
|
||||
"flags": [
|
||||
string
|
||||
],
|
||||
"query_num": integer,
|
||||
"answer_num": integer,
|
||||
"authority_num": integer,
|
||||
"additional_num": integer,
|
||||
"question": {
|
||||
"name": string,
|
||||
"class": string,
|
||||
"type": string
|
||||
},
|
||||
"answer": [
|
||||
{
|
||||
"name": string,
|
||||
"class": string,
|
||||
"type": string,
|
||||
"ttl": integer,
|
||||
"data": string
|
||||
}
|
||||
],
|
||||
"authority": [
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": 60,
|
||||
"data": "151.101.193.67"
|
||||
},
|
||||
{
|
||||
"name": string,
|
||||
"class": string,
|
||||
"type": string,
|
||||
"ttl": integer,
|
||||
"data": string
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": 60,
|
||||
"data": "151.101.65.67"
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": 60,
|
||||
"data": "151.101.1.67"
|
||||
},
|
||||
{
|
||||
"name": "cnn.com.",
|
||||
"class": "IN",
|
||||
"type": "A",
|
||||
"ttl": 60,
|
||||
"data": "151.101.129.67"
|
||||
}
|
||||
],
|
||||
"query_time": integer, # in msec
|
||||
"server": string,
|
||||
"when": string,
|
||||
"rcvd": integer
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
<a id="jc.parsers.dig.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -393,10 +336,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, aix, freebsd, darwin, win32, cygwin
|
||||
|
||||
Source: [`jc/parsers/dig.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/dig.py)
|
||||
|
||||
Version 2.5 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
148
docs/parsers/dir.md
Normal file
148
docs/parsers/dir.md
Normal file
@@ -0,0 +1,148 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.dir"></a>
|
||||
|
||||
# jc.parsers.dir
|
||||
|
||||
jc - JSON Convert `dir` command output parser
|
||||
|
||||
Options supported:
|
||||
- `/T timefield`
|
||||
- `/O sortorder`
|
||||
- `/C, /-C`
|
||||
- `/S`
|
||||
|
||||
The "Magic" syntax is not supported since the `dir` command is a shell
|
||||
builtin.
|
||||
|
||||
The `epoch` calculated timestamp field is naive. (i.e. based on the local
|
||||
time of the system the parser is run on)
|
||||
|
||||
Usage (cli):
|
||||
|
||||
C:\> dir | jc --dir
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('dir', dir_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"date": string,
|
||||
"time": string,
|
||||
"epoch": integer, # naive timestamp
|
||||
"dir": boolean,
|
||||
"size": integer,
|
||||
"filename: string,
|
||||
"parent": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
C:\> dir | jc --dir -p
|
||||
[
|
||||
{
|
||||
"date": "03/24/2021",
|
||||
"time": "03:15 PM",
|
||||
"dir": true,
|
||||
"size": null,
|
||||
"filename": ".",
|
||||
"parent": "C:\\Program Files\\Internet Explorer",
|
||||
"epoch": 1616624100
|
||||
},
|
||||
{
|
||||
"date": "03/24/2021",
|
||||
"time": "03:15 PM",
|
||||
"dir": true,
|
||||
"size": null,
|
||||
"filename": "..",
|
||||
"parent": "C:\\Program Files\\Internet Explorer",
|
||||
"epoch": 1616624100
|
||||
},
|
||||
{
|
||||
"date": "12/07/2019",
|
||||
"time": "02:49 AM",
|
||||
"dir": true,
|
||||
"size": null,
|
||||
"filename": "en-US",
|
||||
"parent": "C:\\Program Files\\Internet Explorer",
|
||||
"epoch": 1575715740
|
||||
},
|
||||
{
|
||||
"date": "12/07/2019",
|
||||
"time": "02:09 AM",
|
||||
"dir": false,
|
||||
"size": 54784,
|
||||
"filename": "ExtExport.exe",
|
||||
"parent": "C:\\Program Files\\Internet Explorer",
|
||||
"epoch": 1575713340
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
C:\> dir | jc --dir -p -r
|
||||
[
|
||||
{
|
||||
"date": "03/24/2021",
|
||||
"time": "03:15 PM",
|
||||
"dir": true,
|
||||
"size": null,
|
||||
"filename": ".",
|
||||
"parent": "C:\\Program Files\\Internet Explorer"
|
||||
},
|
||||
{
|
||||
"date": "03/24/2021",
|
||||
"time": "03:15 PM",
|
||||
"dir": true,
|
||||
"size": null,
|
||||
"filename": "..",
|
||||
"parent": "C:\\Program Files\\Internet Explorer"
|
||||
},
|
||||
{
|
||||
"date": "12/07/2019",
|
||||
"time": "02:49 AM",
|
||||
"dir": true,
|
||||
"size": null,
|
||||
"filename": "en-US",
|
||||
"parent": "C:\\Program Files\\Internet Explorer"
|
||||
},
|
||||
{
|
||||
"date": "12/07/2019",
|
||||
"time": "02:09 AM",
|
||||
"dir": false,
|
||||
"size": "54,784",
|
||||
"filename": "ExtExport.exe",
|
||||
"parent": "C:\\Program Files\\Internet Explorer"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.dir.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: win32
|
||||
|
||||
Source: [`jc/parsers/dir.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/dir.py)
|
||||
|
||||
Version 1.6 by Rasheed Elsaleh (rasheed@rebelliondefense.com)
|
||||
153
docs/parsers/dmidecode.md
Normal file
153
docs/parsers/dmidecode.md
Normal file
@@ -0,0 +1,153 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.dmidecode"></a>
|
||||
|
||||
# jc.parsers.dmidecode
|
||||
|
||||
jc - JSON Convert `dmidecode` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ dmidecode | jc --dmidecode
|
||||
|
||||
or
|
||||
|
||||
$ jc dmidecode
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('dmidecode', dmidecode_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"handle": string,
|
||||
"type": integer,
|
||||
"bytes": integer,
|
||||
"description": string,
|
||||
"values": { # null if empty
|
||||
"lowercase_no_spaces_keys": string,
|
||||
"multiline_key_values": [
|
||||
string,
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
# dmidecode | jc --dmidecode -p
|
||||
[
|
||||
{
|
||||
"handle": "0x0000",
|
||||
"type": 0,
|
||||
"bytes": 24,
|
||||
"description": "BIOS Information",
|
||||
"values": {
|
||||
"vendor": "Phoenix Technologies LTD",
|
||||
"version": "6.00",
|
||||
"release_date": "04/13/2018",
|
||||
"address": "0xEA490",
|
||||
"runtime_size": "88944 bytes",
|
||||
"rom_size": "64 kB",
|
||||
"characteristics": [
|
||||
"ISA is supported",
|
||||
"PCI is supported",
|
||||
"PC Card (PCMCIA) is supported",
|
||||
"PNP is supported",
|
||||
"APM is supported",
|
||||
"BIOS is upgradeable",
|
||||
"BIOS shadowing is allowed",
|
||||
"ESCD support is available",
|
||||
"Boot from CD is supported",
|
||||
"Selectable boot is supported",
|
||||
"EDD is supported",
|
||||
"Print screen service is supported (int 5h)",
|
||||
"8042 keyboard services are supported (int 9h)",
|
||||
"Serial services are supported (int 14h)",
|
||||
"Printer services are supported (int 17h)",
|
||||
"CGA/mono video services are supported (int 10h)",
|
||||
"ACPI is supported",
|
||||
"Smart battery is supported",
|
||||
"BIOS boot specification is supported",
|
||||
"Function key-initiated network boot is supported",
|
||||
"Targeted content distribution is supported"
|
||||
],
|
||||
"bios_revision": "4.6",
|
||||
"firmware_revision": "0.0"
|
||||
}
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
# dmidecode | jc --dmidecode -p -r
|
||||
[
|
||||
{
|
||||
"handle": "0x0000",
|
||||
"type": "0",
|
||||
"bytes": "24",
|
||||
"description": "BIOS Information",
|
||||
"values": {
|
||||
"vendor": "Phoenix Technologies LTD",
|
||||
"version": "6.00",
|
||||
"release_date": "04/13/2018",
|
||||
"address": "0xEA490",
|
||||
"runtime_size": "88944 bytes",
|
||||
"rom_size": "64 kB",
|
||||
"characteristics": [
|
||||
"ISA is supported",
|
||||
"PCI is supported",
|
||||
"PC Card (PCMCIA) is supported",
|
||||
"PNP is supported",
|
||||
"APM is supported",
|
||||
"BIOS is upgradeable",
|
||||
"BIOS shadowing is allowed",
|
||||
"ESCD support is available",
|
||||
"Boot from CD is supported",
|
||||
"Selectable boot is supported",
|
||||
"EDD is supported",
|
||||
"Print screen service is supported (int 5h)",
|
||||
"8042 keyboard services are supported (int 9h)",
|
||||
"Serial services are supported (int 14h)",
|
||||
"Printer services are supported (int 17h)",
|
||||
"CGA/mono video services are supported (int 10h)",
|
||||
"ACPI is supported",
|
||||
"Smart battery is supported",
|
||||
"BIOS boot specification is supported",
|
||||
"Function key-initiated network boot is supported",
|
||||
"Targeted content distribution is supported"
|
||||
],
|
||||
"bios_revision": "4.6",
|
||||
"firmware_revision": "0.0"
|
||||
}
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.dmidecode.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/dmidecode.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/dmidecode.py)
|
||||
|
||||
Version 1.5 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
159
docs/parsers/dpkg_l.md
Normal file
159
docs/parsers/dpkg_l.md
Normal file
@@ -0,0 +1,159 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.dpkg_l"></a>
|
||||
|
||||
# jc.parsers.dpkg\_l
|
||||
|
||||
jc - JSON Convert `dpkg -l` command output parser
|
||||
|
||||
Set the `COLUMNS` environment variable to a large value to avoid field
|
||||
truncation. For example:
|
||||
|
||||
$ COLUMNS=500 dpkg -l | jc --dpkg-l
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ dpkg -l | jc --dpkg-l
|
||||
|
||||
or
|
||||
|
||||
$ jc dpkg -l
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('dpkg_l', dpkg_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"codes": string,
|
||||
"name": string,
|
||||
"version": string,
|
||||
"architecture": string,
|
||||
"description": string,
|
||||
"desired": string,
|
||||
"status": string,
|
||||
"error": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ dpkg -l | jc --dpkg-l -p
|
||||
[
|
||||
{
|
||||
"codes": "ii",
|
||||
"name": "accountsservice",
|
||||
"version": "0.6.45-1ubuntu1.3",
|
||||
"architecture": "amd64",
|
||||
"description": "query and manipulate user account information",
|
||||
"desired": "install",
|
||||
"status": "installed"
|
||||
},
|
||||
{
|
||||
"codes": "rc",
|
||||
"name": "acl",
|
||||
"version": "2.2.52-3build1",
|
||||
"architecture": "amd64",
|
||||
"description": "Access control list utilities",
|
||||
"desired": "remove",
|
||||
"status": "config-files"
|
||||
},
|
||||
{
|
||||
"codes": "uWR",
|
||||
"name": "acpi",
|
||||
"version": "1.7-1.1",
|
||||
"architecture": "amd64",
|
||||
"description": "displays information on ACPI devices",
|
||||
"desired": "unknown",
|
||||
"status": "trigger await",
|
||||
"error": "reinstall required"
|
||||
},
|
||||
{
|
||||
"codes": "rh",
|
||||
"name": "acpid",
|
||||
"version": "1:2.0.28-1ubuntu1",
|
||||
"architecture": "amd64",
|
||||
"description": "Advanced Configuration and Power Interface...",
|
||||
"desired": "remove",
|
||||
"status": "half installed"
|
||||
},
|
||||
{
|
||||
"codes": "pn",
|
||||
"name": "adduser",
|
||||
"version": "3.116ubuntu1",
|
||||
"architecture": "all",
|
||||
"description": "add and remove users and groups",
|
||||
"desired": "purge",
|
||||
"status": "not installed"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ dpkg -l | jc --dpkg-l -p -r
|
||||
[
|
||||
{
|
||||
"codes": "ii",
|
||||
"name": "accountsservice",
|
||||
"version": "0.6.45-1ubuntu1.3",
|
||||
"architecture": "amd64",
|
||||
"description": "query and manipulate user account information"
|
||||
},
|
||||
{
|
||||
"codes": "rc",
|
||||
"name": "acl",
|
||||
"version": "2.2.52-3build1",
|
||||
"architecture": "amd64",
|
||||
"description": "Access control list utilities"
|
||||
},
|
||||
{
|
||||
"codes": "uWR",
|
||||
"name": "acpi",
|
||||
"version": "1.7-1.1",
|
||||
"architecture": "amd64",
|
||||
"description": "displays information on ACPI devices"
|
||||
},
|
||||
{
|
||||
"codes": "rh",
|
||||
"name": "acpid",
|
||||
"version": "1:2.0.28-1ubuntu1",
|
||||
"architecture": "amd64",
|
||||
"description": "Advanced Configuration and Power Interface..."
|
||||
},
|
||||
{
|
||||
"codes": "pn",
|
||||
"name": "adduser",
|
||||
"version": "3.116ubuntu1",
|
||||
"architecture": "all",
|
||||
"description": "add and remove users and groups"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.dpkg_l.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/dpkg_l.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/dpkg_l.py)
|
||||
|
||||
Version 1.3 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,13 +1,35 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.du"></a>
|
||||
|
||||
# jc.parsers.du
|
||||
jc - JSON CLI output utility du Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `du` command output parser
|
||||
|
||||
specify --du as the first argument if the piped input is coming from du
|
||||
The `du -h` option is not supported with the default output. If you
|
||||
would like to use `du -h` or other options that change the output, be sure
|
||||
to use `jc --raw` (cli) or `raw=True` (module).
|
||||
|
||||
Compatibility:
|
||||
Usage (cli):
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||
$ du | jc --du
|
||||
|
||||
or
|
||||
|
||||
$ jc du
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('du', du_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"size": integer,
|
||||
"name": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -19,23 +41,23 @@ Examples:
|
||||
},
|
||||
{
|
||||
"size": 56,
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/_CodeSignature"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
{
|
||||
"size": 0,
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/Resources/Firmware/usr/local/standalone"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
{
|
||||
"size": 0,
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/Resources/Firmware/usr/local"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
{
|
||||
"size": 0,
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/Resources/Firmware/usr"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
{
|
||||
"size": 1008,
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/Resources/Firmware/dfu"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
...
|
||||
]
|
||||
@@ -48,57 +70,33 @@ Examples:
|
||||
},
|
||||
{
|
||||
"size": "56",
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/_CodeSignature"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
{
|
||||
"size": "0",
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/Resources/Firmware/usr/local/standalone"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
{
|
||||
"size": "0",
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/Resources/Firmware/usr/local"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
{
|
||||
"size": "0",
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/Resources/Firmware/usr"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
{
|
||||
"size": "1008",
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/Contents/Resources/Firmware/dfu"
|
||||
"name": "/usr/standalone/firmware/iBridge1_1Customer.bundle/..."
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.du.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"size": integer,
|
||||
"name": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -106,10 +104,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/du.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/du.py)
|
||||
|
||||
Version 1.6 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
104
docs/parsers/efibootmgr.md
Normal file
104
docs/parsers/efibootmgr.md
Normal file
@@ -0,0 +1,104 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.efibootmgr"></a>
|
||||
|
||||
# jc.parsers.efibootmgr
|
||||
|
||||
jc - JSON Convert `efibootmgr` command output parser
|
||||
|
||||
The `-v` option is also supported.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ sudo efibootmgr | jc --efibootmgr
|
||||
$ sudo efibootmgr -v | jc --efibootmgr
|
||||
|
||||
or
|
||||
|
||||
$ sudo jc efibootmgr
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('efibootmgr', efibootmgr_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"boot_current": string,
|
||||
"timeout_seconds": integer,
|
||||
"boot_order": [
|
||||
string
|
||||
],
|
||||
mirrored_percentage_above_4g: float,
|
||||
mirror_memory_below_4gb: boolean,
|
||||
"boot_options": [
|
||||
{
|
||||
"boot_option_reference": string,
|
||||
"display_name": string,
|
||||
"uefi_device_path": string,
|
||||
"boot_option_enabled": boolean
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ sudo efibootmgr -v | jc --efibootmgr --p
|
||||
{
|
||||
"boot_current": "0002",
|
||||
"timeout_seconds": 0,
|
||||
"boot_order": [
|
||||
"0002",
|
||||
"0000",
|
||||
"0001"
|
||||
],
|
||||
"mirrored_percentage_above_4g": 0.0,
|
||||
"mirror_memory_below_4gb": false,
|
||||
"boot_options": [
|
||||
{
|
||||
"boot_option_reference": "Boot0000",
|
||||
"display_name": "WARNADO",
|
||||
"uefi_device_path": "HD(1,GPT,05b9944c-1c60-492b-a510-7bbedccdc...",
|
||||
"boot_option_enabled": true
|
||||
},
|
||||
{
|
||||
"boot_option_reference": "Boot0001",
|
||||
"display_name": "Embedded NIC 1 Port 1 Partition 1",
|
||||
"uefi_device_path": "VenHw(3a191845-5f86-4e78-8fce-c4cff59f9daa)",
|
||||
"boot_option_enabled": true
|
||||
},
|
||||
{
|
||||
"boot_option_reference": "Boot0002",
|
||||
"display_name": "opensuse-secureboot",
|
||||
"uefi_device_path": "HD(1,GPT,c5d4f69d-6fc2-48c7-acee-af3f30336...",
|
||||
"boot_option_enabled": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
<a id="jc.parsers.efibootmgr.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> JSONDictType
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/efibootmgr.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/efibootmgr.py)
|
||||
|
||||
Version 1.0 by Yaofei Zheng (zyf26256@gmail.com, Yaofei.Zheng@dell.com)
|
||||
71
docs/parsers/email_address.md
Normal file
71
docs/parsers/email_address.md
Normal file
@@ -0,0 +1,71 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.email_address"></a>
|
||||
|
||||
# jc.parsers.email\_address
|
||||
|
||||
jc - JSON Convert Email Address string parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ echo "username@example.com" | jc --email-address
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('email_address', email_address_string)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"username": string,
|
||||
"domain": string,
|
||||
"local": string,
|
||||
"local_plus_suffix": string or null
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ echo 'joe.user@gmail.com' | jc --email-address -p
|
||||
{
|
||||
"username": "joe.user",
|
||||
"domain": "gmail.com",
|
||||
"local": "joe.user",
|
||||
"local_plus_suffix": null
|
||||
}
|
||||
|
||||
$ echo 'joe.user+spam@gmail.com' | jc --email-address -p
|
||||
{
|
||||
"username": "joe.user",
|
||||
"domain": "gmail.com",
|
||||
"local": "joe.user+spam",
|
||||
"local_plus_suffix": "spam"
|
||||
}
|
||||
|
||||
<a id="jc.parsers.email_address.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> Dict
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/email_address.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/email_address.py)
|
||||
|
||||
This parser can be used with the `--slurp` command-line option.
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,13 +1,36 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.env"></a>
|
||||
|
||||
# jc.parsers.env
|
||||
jc - JSON CLI output utility env Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `env` and `printenv` command output parser
|
||||
|
||||
specify --env as the first argument if the piped input is coming from env
|
||||
This parser will output a list of dictionaries each containing `name` and
|
||||
`value` keys. If you would like a simple dictionary output, then use the
|
||||
`-r` command-line option or the `raw=True` argument in the `parse()`
|
||||
function.
|
||||
|
||||
Compatibility:
|
||||
Usage (cli):
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||
$ env | jc --env
|
||||
|
||||
or
|
||||
|
||||
$ jc env
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('env', env_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"value": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -49,36 +72,12 @@ Examples:
|
||||
"_": "/usr/bin/env"
|
||||
}
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.env.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"value": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -86,11 +85,17 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary of raw structured data or
|
||||
list of dictionaries of processed structured data
|
||||
Dictionary of raw structured data or (default)
|
||||
List of Dictionaries of processed structured data (raw)
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/env.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/env.py)
|
||||
|
||||
Version 1.5 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
90
docs/parsers/file.md
Normal file
90
docs/parsers/file.md
Normal file
@@ -0,0 +1,90 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.file"></a>
|
||||
|
||||
# jc.parsers.file
|
||||
|
||||
jc - JSON Convert `file` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ file * | jc --file
|
||||
|
||||
or
|
||||
|
||||
$ jc file *
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('file', file_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filename": string,
|
||||
"type": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ file * | jc --file -p
|
||||
[
|
||||
{
|
||||
"filename": "Applications",
|
||||
"type": "directory"
|
||||
},
|
||||
{
|
||||
"filename": "another file with spaces",
|
||||
"type": "empty"
|
||||
},
|
||||
{
|
||||
"filename": "argstest.py",
|
||||
"type": "Python script text executable, ASCII text"
|
||||
},
|
||||
{
|
||||
"filename": "blkid-p.out",
|
||||
"type": "ASCII text"
|
||||
},
|
||||
{
|
||||
"filename": "blkid-pi.out",
|
||||
"type": "ASCII text, with very long lines"
|
||||
},
|
||||
{
|
||||
"filename": "cd_catalog.xml",
|
||||
"type": "XML 1.0 document text, ASCII text, with CRLF line ..."
|
||||
},
|
||||
{
|
||||
"filename": "centosserial.sh",
|
||||
"type": "Bourne-Again shell script text executable, UTF-8 ..."
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.file.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, aix, freebsd, darwin
|
||||
|
||||
Source: [`jc/parsers/file.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/file.py)
|
||||
|
||||
Version 1.5 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
84
docs/parsers/find.md
Normal file
84
docs/parsers/find.md
Normal file
@@ -0,0 +1,84 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.find"></a>
|
||||
|
||||
# jc.parsers.find
|
||||
|
||||
jc - JSON Convert `find` command output parser
|
||||
|
||||
This parser returns a list of objects by default and a list of strings if
|
||||
the `--raw` option is used.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ find | jc --find
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('find', find_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"path": string,
|
||||
"node": string,
|
||||
"error": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ find | jc --find -p
|
||||
[
|
||||
{
|
||||
"path": "./directory"
|
||||
"node": "filename"
|
||||
},
|
||||
{
|
||||
"path": "./anotherdirectory"
|
||||
"node": "anotherfile"
|
||||
},
|
||||
{
|
||||
"path": null
|
||||
"node": null
|
||||
"error": "find: './inaccessible': Permission denied"
|
||||
}
|
||||
...
|
||||
]
|
||||
|
||||
$ find | jc --find -p -r
|
||||
[
|
||||
"./templates/readme_template",
|
||||
"./templates/manpage_template",
|
||||
"./.github/workflows/pythonapp.yml",
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.find.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of raw strings or
|
||||
List of Dictionaries of processed structured data
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/find.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/find.py)
|
||||
|
||||
Version 1.0 by Solomon Leang (solomonleang@gmail.com)
|
||||
119
docs/parsers/findmnt.md
Normal file
119
docs/parsers/findmnt.md
Normal file
@@ -0,0 +1,119 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.findmnt"></a>
|
||||
|
||||
# jc.parsers.findmnt
|
||||
|
||||
jc - JSON Convert `findmnt` command output parser
|
||||
|
||||
Supports `-a`, `-l`, or no `findmnt` options.
|
||||
|
||||
> Note: Newer versions of `findmnt` have a JSON output option.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ findmnt | jc --findmnt
|
||||
|
||||
or
|
||||
|
||||
$ jc findmnt
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('findmnt', findmnt_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"target": string,
|
||||
"source": string,
|
||||
"fstype": string,
|
||||
"options": [
|
||||
string
|
||||
],
|
||||
"kv_options": {
|
||||
"<key_name>": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ findmnt | jc --findmnt -p
|
||||
[
|
||||
{
|
||||
"target": "/",
|
||||
"source": "/dev/mapper/centos-root",
|
||||
"fstype": "xfs",
|
||||
"options": [
|
||||
"rw",
|
||||
"relatime",
|
||||
"seclabel",
|
||||
"attr2",
|
||||
"inode64",
|
||||
"noquota"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "/sys/fs/cgroup",
|
||||
"source": "tmpfs",
|
||||
"fstype": "tmpfs",
|
||||
"options": [
|
||||
"ro",
|
||||
"nosuid",
|
||||
"nodev",
|
||||
"noexec",
|
||||
"seclabel"
|
||||
],
|
||||
"kv_options": {
|
||||
"mode": "755"
|
||||
}
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ findmnt | jc --findmnt -p -r
|
||||
[
|
||||
{
|
||||
"target": "/",
|
||||
"source": "/dev/mapper/centos-root",
|
||||
"fstype": "xfs",
|
||||
"options": "rw,relatime,seclabel,attr2,inode64,noquota"
|
||||
},
|
||||
{
|
||||
"target": "/sys/fs/cgroup",
|
||||
"source": "tmpfs",
|
||||
"fstype": "tmpfs",
|
||||
"options": "ro,nosuid,nodev,noexec,seclabel,mode=755"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.findmnt.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/findmnt.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/findmnt.py)
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
118
docs/parsers/finger.md
Normal file
118
docs/parsers/finger.md
Normal file
@@ -0,0 +1,118 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.finger"></a>
|
||||
|
||||
# jc.parsers.finger
|
||||
|
||||
jc - JSON Convert `finger` command output parser
|
||||
|
||||
Supports `-s` output option. Does not support the `-l` detail option.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ finger | jc --finger
|
||||
|
||||
or
|
||||
|
||||
$ jc finger
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('finger', finger_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"login": string,
|
||||
"name": string,
|
||||
"tty": string,
|
||||
"idle": string, # null if empty
|
||||
"login_time": string,
|
||||
"details": string,
|
||||
"tty_writeable": boolean,
|
||||
"idle_minutes": integer,
|
||||
"idle_hours": integer,
|
||||
"idle_days": integer,
|
||||
"total_idle_minutes": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ finger | jc --finger -p
|
||||
[
|
||||
{
|
||||
"login": "jdoe",
|
||||
"name": "John Doe",
|
||||
"tty": "tty1",
|
||||
"idle": "14d",
|
||||
"login_time": "Mar 22 21:14",
|
||||
"tty_writeable": false,
|
||||
"idle_minutes": 0,
|
||||
"idle_hours": 0,
|
||||
"idle_days": 14,
|
||||
"total_idle_minutes": 20160
|
||||
},
|
||||
{
|
||||
"login": "jdoe",
|
||||
"name": "John Doe",
|
||||
"tty": "pts/0",
|
||||
"idle": null,
|
||||
"login_time": "Apr 5 15:33",
|
||||
"details": "(192.168.1.22)",
|
||||
"tty_writeable": true,
|
||||
"idle_minutes": 0,
|
||||
"idle_hours": 0,
|
||||
"idle_days": 0,
|
||||
"total_idle_minutes": 0
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ finger | jc --finger -p -r
|
||||
[
|
||||
{
|
||||
"login": "jdoe",
|
||||
"name": "John Doe",
|
||||
"tty": "*tty1",
|
||||
"idle": "14d",
|
||||
"login_time": "Mar 22 21:14"
|
||||
},
|
||||
{
|
||||
"login": "jdoe",
|
||||
"name": "John Doe",
|
||||
"tty": "pts/0",
|
||||
"idle": null,
|
||||
"login_time": "Apr 5 15:33",
|
||||
"details": "(192.168.1.22)"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.finger.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, freebsd
|
||||
|
||||
Source: [`jc/parsers/finger.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/finger.py)
|
||||
|
||||
Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,13 +1,36 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.free"></a>
|
||||
|
||||
# jc.parsers.free
|
||||
jc - JSON CLI output utility free Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `free` command output parser
|
||||
|
||||
specify --free as the first argument if the piped input is coming from free
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ free | jc --free
|
||||
|
||||
'linux'
|
||||
or
|
||||
|
||||
$ jc free
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('free', free_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"type": string,
|
||||
"total": integer,
|
||||
"used": integer,
|
||||
"free": integer,
|
||||
"shared": integer,
|
||||
"buff_cache": integer,
|
||||
"available": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -49,41 +72,12 @@ Examples:
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.free.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"type": string,
|
||||
"total": integer,
|
||||
"used": integer,
|
||||
"free": integer,
|
||||
"shared": integer,
|
||||
"buff_cache": integer,
|
||||
"available": integer
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -91,10 +85,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/free.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/free.py)
|
||||
|
||||
Version 1.7 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
@@ -1,13 +1,31 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.fstab"></a>
|
||||
|
||||
# jc.parsers.fstab
|
||||
jc - JSON CLI output utility fstab Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `fstab` file parser
|
||||
|
||||
specify --fstab as the first argument if the piped input is coming from a fstab file
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ cat /etc/fstab | jc --fstab
|
||||
|
||||
'linux'
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('fstab', fstab_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"fs_spec": string,
|
||||
"fs_file": string,
|
||||
"fs_vfstype": string,
|
||||
"fs_mntops": string,
|
||||
"fs_freq": integer,
|
||||
"fs_passno": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -67,40 +85,12 @@ Examples:
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.fstab.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"fs_spec": string,
|
||||
"fs_file": string,
|
||||
"fs_vfstype": string,
|
||||
"fs_mntops": string,
|
||||
"fs_freq": integer,
|
||||
"fs_passno": integer
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -108,10 +98,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, freebsd
|
||||
|
||||
Source: [`jc/parsers/fstab.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/fstab.py)
|
||||
|
||||
Version 1.7 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
177
docs/parsers/git_log.md
Normal file
177
docs/parsers/git_log.md
Normal file
@@ -0,0 +1,177 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.git_log"></a>
|
||||
|
||||
# jc.parsers.git\_log
|
||||
|
||||
jc - JSON Convert `git log` command output parser
|
||||
|
||||
Can be used with the following format options:
|
||||
- `oneline`
|
||||
- `short`
|
||||
- `medium`
|
||||
- `full`
|
||||
- `fuller`
|
||||
|
||||
Additional options supported:
|
||||
- `--stat`
|
||||
- `--shortstat`
|
||||
|
||||
The `epoch` calculated timestamp field is naive. (i.e. based on the
|
||||
local time of the system the parser is run on)
|
||||
|
||||
The `epoch_utc` calculated timestamp field is timezone-aware and is
|
||||
only available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ git log | jc --git-log
|
||||
|
||||
or
|
||||
|
||||
$ jc git log
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('git_log', git_log_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"commit": string,
|
||||
"author": string/null,
|
||||
"author_email": string/null,
|
||||
"date": string,
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"commit_by": string/null,
|
||||
"commit_by_email": string/null,
|
||||
"commit_by_date": string,
|
||||
"message": string,
|
||||
"stats" : {
|
||||
"files_changed": integer,
|
||||
"insertions": integer,
|
||||
"deletions": integer,
|
||||
"files": [
|
||||
string
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
[0] naive timestamp if "date" field is parsable, else null
|
||||
[1] timezone aware timestamp available for UTC, else null
|
||||
|
||||
Examples:
|
||||
|
||||
$ git log --stat | jc --git-log -p
|
||||
[
|
||||
{
|
||||
"commit": "728d882ed007b3c8b785018874a0eb06e1143b66",
|
||||
"author": "Kelly Brazil",
|
||||
"author_email": "kellyjonbrazil@gmail.com",
|
||||
"date": "Wed Apr 20 09:50:19 2022 -0400",
|
||||
"stats": {
|
||||
"files_changed": 2,
|
||||
"insertions": 90,
|
||||
"deletions": 12,
|
||||
"files": [
|
||||
"docs/parsers/git_log.md",
|
||||
"jc/parsers/git_log.py"
|
||||
]
|
||||
},
|
||||
"message": "add timestamp docs and examples",
|
||||
"epoch": 1650462619,
|
||||
"epoch_utc": null
|
||||
},
|
||||
{
|
||||
"commit": "b53e42aca623181aa9bc72194e6eeef1e9a3a237",
|
||||
"author": "Kelly Brazil",
|
||||
"author_email": "kellyjonbrazil@gmail.com",
|
||||
"date": "Wed Apr 20 09:44:42 2022 -0400",
|
||||
"stats": {
|
||||
"files_changed": 5,
|
||||
"insertions": 29,
|
||||
"deletions": 6,
|
||||
"files": [
|
||||
"docs/parsers/git_log.md",
|
||||
"docs/utils.md",
|
||||
"jc/parsers/git_log.py",
|
||||
"jc/utils.py",
|
||||
"man/jc.1"
|
||||
]
|
||||
},
|
||||
"message": "add calculated timestamp",
|
||||
"epoch": 1650462282,
|
||||
"epoch_utc": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ git log --stat | jc --git-log -p -r
|
||||
[
|
||||
{
|
||||
"commit": "728d882ed007b3c8b785018874a0eb06e1143b66",
|
||||
"author": "Kelly Brazil",
|
||||
"author_email": "kellyjonbrazil@gmail.com",
|
||||
"date": "Wed Apr 20 09:50:19 2022 -0400",
|
||||
"stats": {
|
||||
"files_changed": "2",
|
||||
"insertions": "90",
|
||||
"deletions": "12",
|
||||
"files": [
|
||||
"docs/parsers/git_log.md",
|
||||
"jc/parsers/git_log.py"
|
||||
]
|
||||
},
|
||||
"message": "add timestamp docs and examples"
|
||||
},
|
||||
{
|
||||
"commit": "b53e42aca623181aa9bc72194e6eeef1e9a3a237",
|
||||
"author": "Kelly Brazil",
|
||||
"author_email": "kellyjonbrazil@gmail.com",
|
||||
"date": "Wed Apr 20 09:44:42 2022 -0400",
|
||||
"stats": {
|
||||
"files_changed": "5",
|
||||
"insertions": "29",
|
||||
"deletions": "6",
|
||||
"files": [
|
||||
"docs/parsers/git_log.md",
|
||||
"docs/utils.md",
|
||||
"jc/parsers/git_log.py",
|
||||
"jc/utils.py",
|
||||
"man/jc.1"
|
||||
]
|
||||
},
|
||||
"message": "add calculated timestamp"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.git_log.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/git_log.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/git_log.py)
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
113
docs/parsers/git_log_s.md
Normal file
113
docs/parsers/git_log_s.md
Normal file
@@ -0,0 +1,113 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.git_log_s"></a>
|
||||
|
||||
# jc.parsers.git\_log\_s
|
||||
|
||||
jc - JSON Convert `git log` command output streaming parser
|
||||
|
||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||
> Dictionaries (module)
|
||||
|
||||
Can be used with the following format options:
|
||||
- `oneline`
|
||||
- `short`
|
||||
- `medium`
|
||||
- `full`
|
||||
- `fuller`
|
||||
|
||||
Additional options supported:
|
||||
- `--stat`
|
||||
- `--shortstat`
|
||||
|
||||
The `epoch` calculated timestamp field is naive. (i.e. based on the
|
||||
local time of the system the parser is run on)
|
||||
|
||||
The `epoch_utc` calculated timestamp field is timezone-aware and is
|
||||
only available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ git log | jc --git-log-s
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
|
||||
result = jc.parse('git_log_s', git_log_command_output.splitlines())
|
||||
for item in result:
|
||||
# do something
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"commit": string,
|
||||
"author": string/null,
|
||||
"author_email": string/null,
|
||||
"date": string,
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"commit_by": string/null,
|
||||
"commit_by_email": string/null,
|
||||
"commit_by_date": string,
|
||||
"message": string,
|
||||
"stats" : {
|
||||
"files_changed": integer,
|
||||
"insertions": integer,
|
||||
"deletions": integer,
|
||||
"files": [
|
||||
string
|
||||
]
|
||||
}
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
"success": boolean, # false if error parsing
|
||||
"error": string, # exists if "success" is false
|
||||
"line": string # exists if "success" is false
|
||||
}
|
||||
}
|
||||
|
||||
[0] naive timestamp if "date" field is parsable, else null
|
||||
[1] timezone aware timestamp available for UTC, else null
|
||||
|
||||
Examples:
|
||||
|
||||
$ git log | jc --git-log-s
|
||||
{"commit":"a730ae18c8e81c5261db132df73cd74f272a0a26","author":"Kelly...}
|
||||
{"commit":"930bf439c06c48a952baec05a9896c8d92b7693e","author":"Kelly...}
|
||||
...
|
||||
|
||||
<a id="jc.parsers.git_log_s.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
@add_jc_meta
|
||||
def parse(data: Iterable[str],
|
||||
raw: bool = False,
|
||||
quiet: bool = False,
|
||||
ignore_exceptions: bool = False) -> Union[Iterable[Dict], tuple]
|
||||
```
|
||||
|
||||
Main text parsing generator function. Returns an iterable object.
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (iterable) line-based text data to parse
|
||||
(e.g. sys.stdin or str.splitlines())
|
||||
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
ignore_exceptions: (boolean) ignore parsing exceptions if True
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
Iterable of Dictionaries
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/git_log_s.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/git_log_s.py)
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
94
docs/parsers/git_ls_remote.md
Normal file
94
docs/parsers/git_ls_remote.md
Normal file
@@ -0,0 +1,94 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.git_ls_remote"></a>
|
||||
|
||||
# jc.parsers.git\_ls\_remote
|
||||
|
||||
jc - JSON Convert `git ls-remote` command output parser
|
||||
|
||||
This parser outputs two schemas:
|
||||
|
||||
- Default: A single object with key/value pairs
|
||||
- Raw: An array of objects (`--raw` (cli) or `raw=True (module))
|
||||
|
||||
See the Schema section for more details
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ git ls-remote | jc --git-ls-remote
|
||||
|
||||
or
|
||||
|
||||
$ jc git ls-remote
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('git_ls_remote', git_ls_remote_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
Default:
|
||||
{
|
||||
<reference>: string
|
||||
}
|
||||
|
||||
Raw:
|
||||
[
|
||||
{
|
||||
"reference": string,
|
||||
"commit": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ git ls-remote | jc --git-ls-remote -p
|
||||
{
|
||||
"HEAD": "214cd6b9e09603b3c4fa02203b24fb2bc3d4e338",
|
||||
"refs/heads/dev": "b884f6aacca39e05994596d8fdfa7e7c4f1e0389",
|
||||
"refs/heads/master": "214cd6b9e09603b3c4fa02203b24fb2bc3d4e338",
|
||||
"refs/pull/1/head": "e416c77bed1267254da972b0f95b7ff1d43fccef",
|
||||
...
|
||||
}
|
||||
|
||||
$ git ls-remote | jc --git-ls-remote -p -r
|
||||
[
|
||||
{
|
||||
"reference": "HEAD",
|
||||
"commit": "214cd6b9e09603b3c4fa02203b24fb2bc3d4e338"
|
||||
},
|
||||
{
|
||||
"reference": "refs/heads/dev",
|
||||
"commit": "b884f6aacca39e05994596d8fdfa7e7c4f1e0389"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.git_ls_remote.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> Union[JSONDictType, List[JSONDictType]]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary (default) or List of Dictionaries (raw)
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/git_ls_remote.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/git_ls_remote.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
147
docs/parsers/gpg.md
Normal file
147
docs/parsers/gpg.md
Normal file
@@ -0,0 +1,147 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.gpg"></a>
|
||||
|
||||
# jc.parsers.gpg
|
||||
|
||||
jc - JSON Convert `gpg --with-colons` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ gpg --with-colons --show-keys file.gpg | jc --gpg
|
||||
|
||||
or
|
||||
|
||||
$ jc gpg --with-colons --show-keys file.gpg
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('gpg', gpg_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
Field definitions from https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS
|
||||
|
||||
> Note: Number values are not converted to integers because many field
|
||||
> specifications are overloaded and future augmentations are implied in the
|
||||
> documentation.
|
||||
|
||||
[
|
||||
{
|
||||
"type": string,
|
||||
"validity": string,
|
||||
"key_length": string,
|
||||
"pub_key_alg": string,
|
||||
"key_id": string,
|
||||
"creation_date": string,
|
||||
"expiration_date": string,
|
||||
"certsn_uidhash_trustinfo": string,
|
||||
"owner_trust": string,
|
||||
"user_id": string,
|
||||
"signature_class": string,
|
||||
"key_capabilities": string,
|
||||
"cert_fingerprint_other": string,
|
||||
"flag": string,
|
||||
"token_sn": string,
|
||||
"hash_alg": string,
|
||||
"curve_name": string,
|
||||
"compliance_flags": string,
|
||||
"last_update_date": string,
|
||||
"origin": string,
|
||||
"comment": string,
|
||||
"index": string, # [0]
|
||||
"bits": string, # [0]
|
||||
"value": string, # [0]
|
||||
"version": string, # [1], [4]
|
||||
"signature_count": string, # [1]
|
||||
"encryption_count": string, # [1]
|
||||
"policy": string, # [1]
|
||||
"signature_first_seen": string, # [1]
|
||||
"signature_most_recent_seen": string, # [1]
|
||||
"encryption_first_done": string, # [1]
|
||||
"encryption_most_recent_done": string, # [1]
|
||||
"staleness_reason": string, # [2]
|
||||
"trust_model": string, # [2]
|
||||
"trust_db_created": string, # [2]
|
||||
"trust_db_expires": string, # [2]
|
||||
"marginally_trusted_users": string, # [2]
|
||||
"completely_trusted_users": string, # [2]
|
||||
"cert_chain_max_depth": string, # [2]
|
||||
"subpacket_number": string, # [3]
|
||||
"hex_flags": string, # [3]
|
||||
"subpacket_length": string, # [3]
|
||||
"subpacket_data": string, # [3]
|
||||
"pubkey": string, # [4]
|
||||
"cipher": string, # [4]
|
||||
"digest": string, # [4]
|
||||
"compress": string, # [4]
|
||||
"group": string, # [4]
|
||||
"members": string, # [4]
|
||||
"curve_names": string, # [4]
|
||||
}
|
||||
]
|
||||
|
||||
All blank values are converted to null/None.
|
||||
|
||||
[0] for 'pkd' type
|
||||
[1] for 'tfs' type
|
||||
[2] for 'tru' type
|
||||
[3] for 'skp' type
|
||||
[4] for 'cfg' type
|
||||
|
||||
Examples:
|
||||
|
||||
$ gpg --with-colons --show-keys file.gpg | jc --gpg -p
|
||||
[
|
||||
{
|
||||
"type": "pub",
|
||||
"validity": "f",
|
||||
"key_length": "1024",
|
||||
"pub_key_alg": "17",
|
||||
"key_id": "6C7EE1B8621CC013",
|
||||
"creation_date": "899817715",
|
||||
"expiration_date": "1055898235",
|
||||
"certsn_uidhash_trustinfo": null,
|
||||
"owner_trust": "m",
|
||||
"user_id": null,
|
||||
"signature_class": null,
|
||||
"key_capabilities": "scESC",
|
||||
"cert_fingerprint_other": null,
|
||||
"flag": null,
|
||||
"token_sn": null,
|
||||
"hash_alg": null,
|
||||
"curve_name": null,
|
||||
"compliance_flags": null,
|
||||
"last_update_date": null,
|
||||
"origin": null,
|
||||
"comment": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.gpg.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/gpg.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/gpg.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
137
docs/parsers/group.md
Normal file
137
docs/parsers/group.md
Normal file
@@ -0,0 +1,137 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.group"></a>
|
||||
|
||||
# jc.parsers.group
|
||||
|
||||
jc - JSON Convert `/etc/group` file parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat /etc/group | jc --group
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('group', group_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"group_name": string,
|
||||
"password": string,
|
||||
"gid": integer,
|
||||
"members": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/group | jc --group -p
|
||||
[
|
||||
{
|
||||
"group_name": "nobody",
|
||||
"password": "*",
|
||||
"gid": -2,
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "nogroup",
|
||||
"password": "*",
|
||||
"gid": -1,
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "wheel",
|
||||
"password": "*",
|
||||
"gid": 0,
|
||||
"members": [
|
||||
"root"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "certusers",
|
||||
"password": "*",
|
||||
"gid": 29,
|
||||
"members": [
|
||||
"root",
|
||||
"_jabber",
|
||||
"_postfix",
|
||||
"_cyrus",
|
||||
"_calendar",
|
||||
"_dovecot"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat /etc/group | jc --group -p -r
|
||||
[
|
||||
{
|
||||
"group_name": "nobody",
|
||||
"password": "*",
|
||||
"gid": "-2",
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "nogroup",
|
||||
"password": "*",
|
||||
"gid": "-1",
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "wheel",
|
||||
"password": "*",
|
||||
"gid": "0",
|
||||
"members": [
|
||||
"root"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "certusers",
|
||||
"password": "*",
|
||||
"gid": "29",
|
||||
"members": [
|
||||
"root",
|
||||
"_jabber",
|
||||
"_postfix",
|
||||
"_cyrus",
|
||||
"_calendar",
|
||||
"_dovecot"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.group.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/group.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/group.py)
|
||||
|
||||
Version 1.5 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
105
docs/parsers/gshadow.md
Normal file
105
docs/parsers/gshadow.md
Normal file
@@ -0,0 +1,105 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.gshadow"></a>
|
||||
|
||||
# jc.parsers.gshadow
|
||||
|
||||
jc - JSON Convert `/etc/gshadow` file parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat /etc/gshadow | jc --gshadow
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('gshadow', gshadow_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"group_name": string,
|
||||
"password": string,
|
||||
"administrators": [
|
||||
string
|
||||
],
|
||||
"members": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /etc/gshadow | jc --gshadow -p
|
||||
[
|
||||
{
|
||||
"group_name": "root",
|
||||
"password": "*",
|
||||
"administrators": [],
|
||||
"members": []
|
||||
},
|
||||
{
|
||||
"group_name": "adm",
|
||||
"password": "*",
|
||||
"administrators": [],
|
||||
"members": [
|
||||
"syslog",
|
||||
"joeuser"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ cat /etc/gshadow | jc --gshadow -p -r
|
||||
[
|
||||
{
|
||||
"group_name": "root",
|
||||
"password": "*",
|
||||
"administrators": [
|
||||
""
|
||||
],
|
||||
"members": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_name": "adm",
|
||||
"password": "*",
|
||||
"administrators": [
|
||||
""
|
||||
],
|
||||
"members": [
|
||||
"syslog",
|
||||
"joeuser"
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.gshadow.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/gshadow.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/gshadow.py)
|
||||
|
||||
Version 1.3 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
65
docs/parsers/hash.md
Normal file
65
docs/parsers/hash.md
Normal file
@@ -0,0 +1,65 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.hash"></a>
|
||||
|
||||
# jc.parsers.hash
|
||||
|
||||
jc - JSON Convert `hash` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ hash | jc --hash
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('hash', hash_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"command": string,
|
||||
"hits": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ hash | jc --hash -p
|
||||
[
|
||||
{
|
||||
"hits": 2,
|
||||
"command": "/bin/cat"
|
||||
},
|
||||
{
|
||||
"hits": 1,
|
||||
"command": "/bin/ls"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.hash.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/hash.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/hash.py)
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
96
docs/parsers/hashsum.md
Normal file
96
docs/parsers/hashsum.md
Normal file
@@ -0,0 +1,96 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.hashsum"></a>
|
||||
|
||||
# jc.parsers.hashsum
|
||||
|
||||
jc - JSON Convert `hash sum` command output parser
|
||||
|
||||
This parser works with the following hash calculation utilities:
|
||||
- `md5`
|
||||
- `md5sum`
|
||||
- `shasum`
|
||||
- `sha1sum`
|
||||
- `sha224sum`
|
||||
- `sha256sum`
|
||||
- `sha384sum`
|
||||
- `sha512sum`
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ md5sum file.txt | jc --hashsum
|
||||
|
||||
or
|
||||
|
||||
$ jc md5sum file.txt
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('hashsum', md5sum_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filename": string,
|
||||
"hash": string,
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ md5sum * | jc --hashsum -p
|
||||
[
|
||||
{
|
||||
"filename": "devtoolset-3-gcc-4.9.2-6.el7.x86_64.rpm",
|
||||
"hash": "65fc958c1add637ec23c4b137aecf3d3"
|
||||
},
|
||||
{
|
||||
"filename": "digout",
|
||||
"hash": "5b9312ee5aff080927753c63a347707d"
|
||||
},
|
||||
{
|
||||
"filename": "dmidecode.out",
|
||||
"hash": "716fd11c2ac00db109281f7110b8fb9d"
|
||||
},
|
||||
{
|
||||
"filename": "file with spaces in the name",
|
||||
"hash": "d41d8cd98f00b204e9800998ecf8427e"
|
||||
},
|
||||
{
|
||||
"filename": "id-centos.out",
|
||||
"hash": "4295be239a14ad77ef3253103de976d2"
|
||||
},
|
||||
{
|
||||
"filename": "ifcfg.json",
|
||||
"hash": "01fda0d9ba9a75618b072e64ff512b43"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.hashsum.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/hashsum.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/hashsum.py)
|
||||
|
||||
Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
345
docs/parsers/hciconfig.md
Normal file
345
docs/parsers/hciconfig.md
Normal file
@@ -0,0 +1,345 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.hciconfig"></a>
|
||||
|
||||
# jc.parsers.hciconfig
|
||||
|
||||
jc - JSON Convert `hciconfig` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ hciconfig | jc --hciconfig
|
||||
|
||||
or
|
||||
|
||||
$ jc hciconfig
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('hciconfig', hciconfig_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"device": string,
|
||||
"type": string,
|
||||
"bus": string,
|
||||
"bd_address": string,
|
||||
"acl_mtu": integer,
|
||||
"acl_mtu_packets": integer,
|
||||
"sco_mtu": integer,
|
||||
"sco_mtu_packets": integer,
|
||||
"state": [
|
||||
string
|
||||
],
|
||||
"rx_bytes": integer,
|
||||
"rx_acl": integer,
|
||||
"rx_sco": integer,
|
||||
"rx_events": integer,
|
||||
"rx_errors": integer,
|
||||
"tx_bytes": integer,
|
||||
"tx_acl": integer,
|
||||
"tx_sco": integer,
|
||||
"tx_commands": integer,
|
||||
"tx_errors": integer,
|
||||
"features": [
|
||||
string
|
||||
],
|
||||
"packet_type": [
|
||||
string
|
||||
],
|
||||
"link_policy": [
|
||||
string
|
||||
],
|
||||
"link_mode": [
|
||||
string
|
||||
],
|
||||
"name": string,
|
||||
"class": string,
|
||||
"service_classes": [
|
||||
string # 'Unspecified' is null
|
||||
],
|
||||
"device_class": string,
|
||||
"hci_version": string,
|
||||
"hci_revision": string,
|
||||
"lmp_version": string,
|
||||
"lmp_subversion": string,
|
||||
"manufacturer": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ hciconfig -a | jc --hciconfig -p
|
||||
[
|
||||
{
|
||||
"device": "hci0",
|
||||
"type": "Primary",
|
||||
"bus": "USB",
|
||||
"bd_address": "00:1A:7D:DA:71:13",
|
||||
"acl_mtu": 310,
|
||||
"acl_mtu_packets": 10,
|
||||
"sco_mtu": 64,
|
||||
"sco_mtu_packets": 8,
|
||||
"state": [
|
||||
"UP",
|
||||
"RUNNING"
|
||||
],
|
||||
"rx_bytes": 13905869,
|
||||
"rx_acl": 0,
|
||||
"rx_sco": 0,
|
||||
"rx_events": 393300,
|
||||
"rx_errors": 0,
|
||||
"tx_bytes": 62629,
|
||||
"tx_acl": 0,
|
||||
"tx_sco": 0,
|
||||
"tx_commands": 3893,
|
||||
"tx_errors": 0,
|
||||
"features": [
|
||||
"0xff",
|
||||
"0xff",
|
||||
"0x8f",
|
||||
"0xfe",
|
||||
"0xdb",
|
||||
"0xff",
|
||||
"0x5b",
|
||||
"0x87"
|
||||
],
|
||||
"packet_type": [
|
||||
"DM1",
|
||||
"DM3",
|
||||
"DM5",
|
||||
"DH1",
|
||||
"DH3",
|
||||
"DH5",
|
||||
"HV1",
|
||||
"HV2",
|
||||
"HV3"
|
||||
],
|
||||
"link_policy": [
|
||||
"RSWITCH",
|
||||
"HOLD",
|
||||
"SNIFF",
|
||||
"PARK"
|
||||
],
|
||||
"link_mode": [
|
||||
"SLAVE",
|
||||
"ACCEPT"
|
||||
],
|
||||
"name": "CSR8510 A10",
|
||||
"class": "0x000000",
|
||||
"service_classes": null,
|
||||
"device_class": "Miscellaneous",
|
||||
"hci_version": "4.0 (0x6)",
|
||||
"hci_revision": "0x22bb",
|
||||
"lmp_version": "4.0 (0x6)",
|
||||
"lmp_subversion": "0x22bb",
|
||||
"manufacturer": "Cambridge Silicon Radio (10)"
|
||||
},
|
||||
{
|
||||
"device": "hci1",
|
||||
"type": "Primary",
|
||||
"bus": "USB",
|
||||
"bd_address": "00:1A:7D:DA:71:13",
|
||||
"acl_mtu": 310,
|
||||
"acl_mtu_packets": 10,
|
||||
"sco_mtu": 64,
|
||||
"sco_mtu_packets": 8,
|
||||
"state": [
|
||||
"DOWN"
|
||||
],
|
||||
"rx_bytes": 4388363,
|
||||
"rx_acl": 0,
|
||||
"rx_sco": 0,
|
||||
"rx_events": 122021,
|
||||
"rx_errors": 0,
|
||||
"tx_bytes": 52350,
|
||||
"tx_acl": 0,
|
||||
"tx_sco": 0,
|
||||
"tx_commands": 3480,
|
||||
"tx_errors": 2,
|
||||
"features": [
|
||||
"0xff",
|
||||
"0xff",
|
||||
"0x8f",
|
||||
"0xfe",
|
||||
"0xdb",
|
||||
"0xff",
|
||||
"0x5b",
|
||||
"0x87"
|
||||
],
|
||||
"packet_type": [
|
||||
"DM1",
|
||||
"DM3",
|
||||
"DM5",
|
||||
"DH1",
|
||||
"DH3",
|
||||
"DH5",
|
||||
"HV1",
|
||||
"HV2",
|
||||
"HV3"
|
||||
],
|
||||
"link_policy": [
|
||||
"RSWITCH",
|
||||
"HOLD",
|
||||
"SNIFF",
|
||||
"PARK"
|
||||
],
|
||||
"link_mode": [
|
||||
"SLAVE",
|
||||
"ACCEPT"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
$ hciconfig -a | jc --hciconfig -p -r
|
||||
[
|
||||
{
|
||||
"device": "hci0",
|
||||
"type": "Primary",
|
||||
"bus": "USB",
|
||||
"bd_address": "00:1A:7D:DA:71:13",
|
||||
"acl_mtu": "310",
|
||||
"acl_mtu_packets": "10",
|
||||
"sco_mtu": "64",
|
||||
"sco_mtu_packets": "8",
|
||||
"state": [
|
||||
"UP",
|
||||
"RUNNING"
|
||||
],
|
||||
"rx_bytes": "13905869",
|
||||
"rx_acl": "0",
|
||||
"rx_sco": "0",
|
||||
"rx_events": "393300",
|
||||
"rx_errors": "0",
|
||||
"tx_bytes": "62629",
|
||||
"tx_acl": "0",
|
||||
"tx_sco": "0",
|
||||
"tx_commands": "3893",
|
||||
"tx_errors": "0",
|
||||
"features": [
|
||||
"0xff",
|
||||
"0xff",
|
||||
"0x8f",
|
||||
"0xfe",
|
||||
"0xdb",
|
||||
"0xff",
|
||||
"0x5b",
|
||||
"0x87"
|
||||
],
|
||||
"packet_type": [
|
||||
"DM1",
|
||||
"DM3",
|
||||
"DM5",
|
||||
"DH1",
|
||||
"DH3",
|
||||
"DH5",
|
||||
"HV1",
|
||||
"HV2",
|
||||
"HV3"
|
||||
],
|
||||
"link_policy": [
|
||||
"RSWITCH",
|
||||
"HOLD",
|
||||
"SNIFF",
|
||||
"PARK"
|
||||
],
|
||||
"link_mode": [
|
||||
"SLAVE",
|
||||
"ACCEPT"
|
||||
],
|
||||
"name": "CSR8510 A10",
|
||||
"class": "0x000000",
|
||||
"service_classes": [
|
||||
"Unspecified"
|
||||
],
|
||||
"device_class": "Miscellaneous",
|
||||
"hci_version": "4.0 (0x6)",
|
||||
"hci_revision": "0x22bb",
|
||||
"lmp_version": "4.0 (0x6)",
|
||||
"lmp_subversion": "0x22bb",
|
||||
"manufacturer": "Cambridge Silicon Radio (10)"
|
||||
},
|
||||
{
|
||||
"device": "hci1",
|
||||
"type": "Primary",
|
||||
"bus": "USB",
|
||||
"bd_address": "00:1A:7D:DA:71:13",
|
||||
"acl_mtu": "310",
|
||||
"acl_mtu_packets": "10",
|
||||
"sco_mtu": "64",
|
||||
"sco_mtu_packets": "8",
|
||||
"state": [
|
||||
"DOWN"
|
||||
],
|
||||
"rx_bytes": "4388363",
|
||||
"rx_acl": "0",
|
||||
"rx_sco": "0",
|
||||
"rx_events": "122021",
|
||||
"rx_errors": "0",
|
||||
"tx_bytes": "52350",
|
||||
"tx_acl": "0",
|
||||
"tx_sco": "0",
|
||||
"tx_commands": "3480",
|
||||
"tx_errors": "2",
|
||||
"features": [
|
||||
"0xff",
|
||||
"0xff",
|
||||
"0x8f",
|
||||
"0xfe",
|
||||
"0xdb",
|
||||
"0xff",
|
||||
"0x5b",
|
||||
"0x87"
|
||||
],
|
||||
"packet_type": [
|
||||
"DM1",
|
||||
"DM3",
|
||||
"DM5",
|
||||
"DH1",
|
||||
"DH3",
|
||||
"DH5",
|
||||
"HV1",
|
||||
"HV2",
|
||||
"HV3"
|
||||
],
|
||||
"link_policy": [
|
||||
"RSWITCH",
|
||||
"HOLD",
|
||||
"SNIFF",
|
||||
"PARK"
|
||||
],
|
||||
"link_mode": [
|
||||
"SLAVE",
|
||||
"ACCEPT"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.hciconfig.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/hciconfig.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/hciconfig.py)
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,32 +1,54 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.history"></a>
|
||||
|
||||
# jc.parsers.history
|
||||
jc - JSON CLI output utility history Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `history` command output parser
|
||||
|
||||
specify --history as the first argument if the piped input is coming from history
|
||||
This parser will output a list of dictionaries each containing `line` and
|
||||
`command` keys. If you would like a simple dictionary output, then use the
|
||||
`-r` command-line option or the `raw=True` argument in the `parse()`
|
||||
function.
|
||||
|
||||
Compatibility:
|
||||
The "Magic" syntax is not supported since the `history` command is a shell
|
||||
builtin.
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||
Usage (cli):
|
||||
|
||||
$ history | jc --history
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('history', history_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"line": integer,
|
||||
"command": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ history | jc --history -p
|
||||
[
|
||||
{
|
||||
"line": "118",
|
||||
"line": 118,
|
||||
"command": "sleep 100"
|
||||
},
|
||||
{
|
||||
"line": "119",
|
||||
"line": 119,
|
||||
"command": "ls /bin"
|
||||
},
|
||||
{
|
||||
"line": "120",
|
||||
"command": "echo "hello""
|
||||
"line": 120,
|
||||
"command": "echo \"hello\""
|
||||
},
|
||||
{
|
||||
"line": "121",
|
||||
"line": 121,
|
||||
"command": "docker images"
|
||||
},
|
||||
...
|
||||
@@ -36,41 +58,17 @@ Examples:
|
||||
{
|
||||
"118": "sleep 100",
|
||||
"119": "ls /bin",
|
||||
"120": "echo "hello"",
|
||||
"120": "echo \"hello\"",
|
||||
"121": "docker images",
|
||||
...
|
||||
}
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.history.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"line": string,
|
||||
"command": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -78,11 +76,17 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary of raw structured data or
|
||||
list of dictionaries of processed structured data
|
||||
List of Dictionaries of processed structured data
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/history.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/history.py)
|
||||
|
||||
Version 1.7 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
115
docs/parsers/host.md
Normal file
115
docs/parsers/host.md
Normal file
@@ -0,0 +1,115 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.host"></a>
|
||||
|
||||
# jc.parsers.host
|
||||
|
||||
jc - JSON Convert `host` command output parser
|
||||
|
||||
Supports parsing of the most commonly used RR types (A, AAAA, MX, TXT)
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ host google.com | jc --host
|
||||
|
||||
or
|
||||
|
||||
$ jc host google.com
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('host', host_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"hostname": string,
|
||||
"address": [
|
||||
string
|
||||
],
|
||||
"v6-address": [
|
||||
string
|
||||
],
|
||||
"mail": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
[
|
||||
{
|
||||
"nameserver": string,
|
||||
"zone": string,
|
||||
"mname": string,
|
||||
"rname": string,
|
||||
"serial": integer,
|
||||
"refresh": integer,
|
||||
"retry": integer,
|
||||
"expire": integer,
|
||||
"minimum": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ host google.com | jc --host
|
||||
[
|
||||
{
|
||||
"hostname": "google.com",
|
||||
"address": [
|
||||
"142.251.39.110"
|
||||
],
|
||||
"v6-address": [
|
||||
"2a00:1450:400e:811::200e"
|
||||
],
|
||||
"mail": [
|
||||
"smtp.google.com."
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
$ jc host -C sunet.se
|
||||
[
|
||||
{
|
||||
"nameserver": "2001:6b0:7::2",
|
||||
"zone": "sunet.se",
|
||||
"mname": "sunic.sunet.se.",
|
||||
"rname": "hostmaster.sunet.se.",
|
||||
"serial": "2023090401",
|
||||
"refresh": "28800",
|
||||
"retry": "7200",
|
||||
"expire": "604800",
|
||||
"minimum": "300"
|
||||
},
|
||||
{
|
||||
...
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.host.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/host.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/host.py)
|
||||
|
||||
Version 1.0 by Pettai (pettai@sunet.se)
|
||||
@@ -1,13 +1,29 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.hosts"></a>
|
||||
|
||||
# jc.parsers.hosts
|
||||
jc - JSON CLI output utility hosts Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `/etc/hosts` file parser
|
||||
|
||||
specify --hosts as the first argument if the piped input is coming from a hosts file
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ cat /etc/hosts | jc --hosts
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('hosts', hosts_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"ip": string,
|
||||
"hostname": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -58,38 +74,12 @@ Examples:
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.hosts.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"ip": string,
|
||||
"hostname": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -97,10 +87,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/hosts.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/hosts.py)
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
336
docs/parsers/http_headers.md
Normal file
336
docs/parsers/http_headers.md
Normal file
@@ -0,0 +1,336 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.http_headers"></a>
|
||||
|
||||
# jc.parsers.http\_headers
|
||||
|
||||
jc - JSON Convert HTTP headers parser
|
||||
|
||||
Converts HTTP request and response headers into a list of dictionaries.
|
||||
Well-known headers are processed to allow multiple instances which are
|
||||
aggregated into an array along with any comma-separated values. Integer,
|
||||
float, and datetimes are converted where defined in the specifications.
|
||||
|
||||
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
|
||||
https://datatracker.ietf.org/doc/html/rfc2616
|
||||
https://datatracker.ietf.org/doc/html/rfc3229
|
||||
https://datatracker.ietf.org/doc/html/rfc7089
|
||||
https://datatracker.ietf.org/doc/html/rfc7231
|
||||
https://datatracker.ietf.org/doc/html/rfc5789
|
||||
|
||||
If you are converting HTTP headers from `curl` verbose output, use the
|
||||
`curl-head` parser which will strip the `>` and `<` characters and remove
|
||||
non-header lines that begin with `*`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat headers.txt | jc --http-headers
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('http_headers', http_headers_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"_type": string, # request or response
|
||||
"_request_method": string,
|
||||
"_request_uri": string,
|
||||
"_request_version": string,
|
||||
"_response_version": string,
|
||||
"_response_status": integer,
|
||||
"_response_reason": string or null,
|
||||
"<header>": string,
|
||||
|
||||
# well-known headers:
|
||||
|
||||
"accept": [
|
||||
string
|
||||
],
|
||||
"accept-ch": [
|
||||
string
|
||||
],
|
||||
"accept-ch-lifetime": integer,
|
||||
"accept-encoding": [
|
||||
string
|
||||
],
|
||||
"accept-language": [
|
||||
string
|
||||
],
|
||||
"accept-patch": [
|
||||
string
|
||||
],
|
||||
"accept-post": [
|
||||
string
|
||||
],
|
||||
"accept-ranges": [
|
||||
string
|
||||
],
|
||||
"access-control-allow-headers": [
|
||||
string
|
||||
],
|
||||
"access-control-allow-methods": [
|
||||
string
|
||||
],
|
||||
"access-control-expose-headers": [
|
||||
string
|
||||
],
|
||||
"access-control-max-age": integer,
|
||||
"access-control-request-headers": [
|
||||
string
|
||||
],
|
||||
"age": integer,
|
||||
"allow": [
|
||||
string
|
||||
],
|
||||
"alt-svc": [
|
||||
string
|
||||
],
|
||||
"cache-control": [
|
||||
string
|
||||
],
|
||||
"clear-site-data": [
|
||||
string
|
||||
],
|
||||
"connection": [
|
||||
string
|
||||
],
|
||||
"content-encoding": [
|
||||
string
|
||||
],
|
||||
"content-dpr": integer,
|
||||
"content-language": [
|
||||
string
|
||||
],
|
||||
"content-length": integer,
|
||||
"content-security-policy": [
|
||||
string
|
||||
],
|
||||
"content-security-policy-report-only": [
|
||||
string
|
||||
],
|
||||
"cookie": [
|
||||
string
|
||||
],
|
||||
"critical-ch": [
|
||||
string
|
||||
],
|
||||
"date": string,
|
||||
"date_epoch_utc": integer,
|
||||
"expect-ct": [
|
||||
string
|
||||
],
|
||||
"expires": string,
|
||||
"expires_epoch_utc": integer,
|
||||
"device-memory": integer,
|
||||
"downlink": integer,
|
||||
"dpr": integer,
|
||||
"forwarded": [
|
||||
string
|
||||
],
|
||||
"if-match": [
|
||||
string
|
||||
],
|
||||
"if-modified-since": string,
|
||||
"if-modified-since_epoch_utc": integer,
|
||||
"if-none-match": [
|
||||
string
|
||||
],
|
||||
"if-range": string,
|
||||
"if-range_epoch_utc": integer,
|
||||
"if-unmodified-since": string,
|
||||
"if-unmodified-since_epoch_utc": integer,
|
||||
"im": [
|
||||
string
|
||||
],
|
||||
"keep-alive": [
|
||||
string
|
||||
],
|
||||
"large-allocation": integer,
|
||||
"last-modified": string,
|
||||
"last-modified_epoch_utc": integer,
|
||||
"link": [
|
||||
string
|
||||
],
|
||||
"max-forwards": integer,
|
||||
"memento-datetime": string,
|
||||
"memento-datetime_epoch_utc": integer,
|
||||
"permissions-policy": [
|
||||
string
|
||||
],
|
||||
"permissions-policy-report-only": [
|
||||
string
|
||||
],
|
||||
"pragma": [
|
||||
string
|
||||
],
|
||||
"proxy-authenticate": [
|
||||
string
|
||||
],
|
||||
"reporting-endpoints": [
|
||||
string
|
||||
],
|
||||
"retry-after": string,
|
||||
"retry-after_epoch_utc": integer,
|
||||
"rtt": integer,
|
||||
"sec-ch-ua": [
|
||||
string
|
||||
],
|
||||
"sec-ch-ua-full-version-list": [
|
||||
string
|
||||
],
|
||||
"server": [
|
||||
string
|
||||
],
|
||||
"server-timing": [
|
||||
string
|
||||
],
|
||||
"set-cookie": [
|
||||
string
|
||||
],
|
||||
"timing-allow-origin": [
|
||||
string
|
||||
],
|
||||
"trailer": [
|
||||
string
|
||||
],
|
||||
"transfer-encoding": [
|
||||
string
|
||||
],
|
||||
"upgrade": [
|
||||
string
|
||||
],
|
||||
"upgrade-insecure-requests": integer,
|
||||
"vary": [
|
||||
string
|
||||
],
|
||||
"via": [
|
||||
string
|
||||
],
|
||||
"warning": [
|
||||
string
|
||||
],
|
||||
"www-authenticate": [
|
||||
string
|
||||
],
|
||||
"x-cache-hits": [
|
||||
integer
|
||||
],
|
||||
"x-content-duration": float
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat headers.txt | jc --http-headers -p
|
||||
[
|
||||
{
|
||||
"_type": "request",
|
||||
"_request_method": "HEAD",
|
||||
"_request_uri": "/",
|
||||
"_request_version": "HTTP/1.1",
|
||||
"host": "example.com",
|
||||
"user-agent": "curl/8.1.2",
|
||||
"accept": [
|
||||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_type": "response",
|
||||
"_response_version": "HTTP/1.1",
|
||||
"_response_status": 200,
|
||||
"_response_reason": [
|
||||
"OK"
|
||||
],
|
||||
"accept-ranges": [
|
||||
"bytes"
|
||||
],
|
||||
"age": 140203,
|
||||
"cache-control": [
|
||||
"max-age=604800"
|
||||
],
|
||||
"content-type": "text/html; charset=UTF-8",
|
||||
"date": "Sun, 04 Feb 2024 02:25:07 GMT",
|
||||
"etag": "\"3147526947\"",
|
||||
"expires": "Sun, 11 Feb 2024 02:25:07 GMT",
|
||||
"last-modified": "Thu, 17 Oct 2019 07:18:26 GMT",
|
||||
"server": [
|
||||
"ECS (sac/252F)"
|
||||
],
|
||||
"x-cache": "HIT",
|
||||
"content-length": 1256,
|
||||
"date_epoch_utc": 1707013507,
|
||||
"expires_epoch_utc": 1707618307,
|
||||
"last-modified_epoch_utc": 1571296706
|
||||
}
|
||||
]
|
||||
|
||||
$ cat headers.txt | jc --http-headers -p -r
|
||||
[
|
||||
{
|
||||
"_type": "request",
|
||||
"_request_method": "HEAD",
|
||||
"_request_uri": "/",
|
||||
"_request_version": "HTTP/1.1",
|
||||
"host": "example.com",
|
||||
"user-agent": "curl/8.1.2",
|
||||
"accept": [
|
||||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_type": "response",
|
||||
"_response_version": "HTTP/1.1",
|
||||
"_response_status": 200,
|
||||
"_response_reason": [
|
||||
"OK"
|
||||
],
|
||||
"accept-ranges": [
|
||||
"bytes"
|
||||
],
|
||||
"age": "140203",
|
||||
"cache-control": [
|
||||
"max-age=604800"
|
||||
],
|
||||
"content-type": "text/html; charset=UTF-8",
|
||||
"date": "Sun, 04 Feb 2024 02:25:07 GMT",
|
||||
"etag": "\"3147526947\"",
|
||||
"expires": "Sun, 11 Feb 2024 02:25:07 GMT",
|
||||
"last-modified": "Thu, 17 Oct 2019 07:18:26 GMT",
|
||||
"server": [
|
||||
"ECS (sac/252F)"
|
||||
],
|
||||
"x-cache": "HIT",
|
||||
"content-length": "1256"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.http_headers.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/http_headers.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/http_headers.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
135
docs/parsers/id.md
Normal file
135
docs/parsers/id.md
Normal file
@@ -0,0 +1,135 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.id"></a>
|
||||
|
||||
# jc.parsers.id
|
||||
|
||||
jc - JSON Convert `id` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ id | jc --id
|
||||
|
||||
or
|
||||
|
||||
$ jc id
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('id', id_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"uid": {
|
||||
"id": integer,
|
||||
"name": string
|
||||
},
|
||||
"gid": {
|
||||
"id": integer,
|
||||
"name": string
|
||||
},
|
||||
"groups": [
|
||||
{
|
||||
"id": integer,
|
||||
"name": string
|
||||
},
|
||||
{
|
||||
"id": integer,
|
||||
"name": string
|
||||
}
|
||||
],
|
||||
"context": {
|
||||
"user": string,
|
||||
"role": string,
|
||||
"type": string,
|
||||
"level": string
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ id | jc --id -p
|
||||
{
|
||||
"uid": {
|
||||
"id": 1000,
|
||||
"name": "joeuser"
|
||||
},
|
||||
"gid": {
|
||||
"id": 1000,
|
||||
"name": "joeuser"
|
||||
},
|
||||
"groups": [
|
||||
{
|
||||
"id": 1000,
|
||||
"name": "joeuser"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "wheel"
|
||||
}
|
||||
],
|
||||
"context": {
|
||||
"user": "unconfined_u",
|
||||
"role": "unconfined_r",
|
||||
"type": "unconfined_t",
|
||||
"level": "s0-s0:c0.c1023"
|
||||
}
|
||||
}
|
||||
|
||||
$ id | jc --id -p -r
|
||||
{
|
||||
"uid": {
|
||||
"id": "1000",
|
||||
"name": "joeuser"
|
||||
},
|
||||
"gid": {
|
||||
"id": "1000",
|
||||
"name": "joeuser"
|
||||
},
|
||||
"groups": [
|
||||
{
|
||||
"id": "1000",
|
||||
"name": "joeuser"
|
||||
},
|
||||
{
|
||||
"id": "10",
|
||||
"name": "wheel"
|
||||
}
|
||||
],
|
||||
"context": {
|
||||
"user": "unconfined_u",
|
||||
"role": "unconfined_r",
|
||||
"type": "unconfined_t",
|
||||
"level": "s0-s0:c0.c1023"
|
||||
}
|
||||
}
|
||||
|
||||
<a id="jc.parsers.id.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/id.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/id.py)
|
||||
|
||||
This parser can be used with the `--slurp` command-line option.
|
||||
|
||||
Version 1.7 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,19 +1,118 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.ifconfig"></a>
|
||||
|
||||
# jc.parsers.ifconfig
|
||||
jc - JSON CLI output utility ifconfig Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `ifconfig` command output parser
|
||||
|
||||
specify --ifconfig as the first argument if the piped input is coming from ifconfig
|
||||
No `ifconfig` options are supported.
|
||||
|
||||
no ifconfig options are supported.
|
||||
Consider using the `ip` command instead of `ifconfig` as it supports native
|
||||
JSON output.
|
||||
|
||||
Compatibility:
|
||||
Usage (cli):
|
||||
|
||||
'linux', 'aix', 'freebsd', 'darwin'
|
||||
$ ifconfig | jc --ifconfig
|
||||
|
||||
or
|
||||
|
||||
$ jc ifconfig
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('ifconfig', ifconfig_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"type": string,
|
||||
"metric": integer
|
||||
"flags": integer,
|
||||
"state": [
|
||||
string
|
||||
],
|
||||
"mtu": integer,
|
||||
"mac_addr": string,
|
||||
"ipv4_addr": string, # [0]
|
||||
"ipv4_mask": string, # [0]
|
||||
"ipv4_bcast": string, # [0]
|
||||
"ipv6_addr": string, # [0]
|
||||
"ipv6_mask": integer, # [0]
|
||||
"ipv6_scope": string, # [0]
|
||||
"ipv6_scope_id": string, # [0]
|
||||
"ipv6_type": string, # [0]
|
||||
"rx_packets": integer,
|
||||
"rx_bytes": integer,
|
||||
"rx_errors": integer,
|
||||
"rx_dropped": integer,
|
||||
"rx_overruns": integer,
|
||||
"rx_frame": integer,
|
||||
"tx_packets": integer,
|
||||
"tx_bytes": integer,
|
||||
"tx_errors": integer,
|
||||
"tx_dropped": integer,
|
||||
"tx_overruns": integer,
|
||||
"tx_carrier": integer,
|
||||
"tx_collisions": integer,
|
||||
"options": string,
|
||||
"options_flags": [
|
||||
string
|
||||
],
|
||||
"status": string,
|
||||
"hw_address": string,
|
||||
"media": string,
|
||||
"media_flags": [
|
||||
string
|
||||
],
|
||||
"nd6_options": integer,
|
||||
"nd6_flags": [
|
||||
string
|
||||
],
|
||||
"plugged": string,
|
||||
"vendor": string,
|
||||
"vendor_pn": string,
|
||||
"vendor_sn": string,
|
||||
"vendor_date": string,
|
||||
"module_temperature": string,
|
||||
"module_voltage": string
|
||||
"ipv4": [
|
||||
{
|
||||
"address": string,
|
||||
"mask": string,
|
||||
"broadcast": string
|
||||
}
|
||||
],
|
||||
"ipv6: [
|
||||
{
|
||||
"address": string,
|
||||
"scope_id": string,
|
||||
"mask": integer,
|
||||
"scope": string,
|
||||
"type": string
|
||||
}
|
||||
],
|
||||
"lanes": [
|
||||
{
|
||||
"lane": integer,
|
||||
"rx_power_mw": float,
|
||||
"rx_power_dbm": float,
|
||||
"tx_bias_ma": float
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
[0] these fields only pick up the last IP address in the interface
|
||||
output and are here for backwards compatibility. For information on
|
||||
all IP addresses, use the `ipv4` and `ipv6` objects which contain an
|
||||
array of IP address objects.
|
||||
|
||||
Examples:
|
||||
|
||||
$ ifconfig | jc --ifconfig -p
|
||||
$ ifconfig ens33 | jc --ifconfig -p
|
||||
[
|
||||
{
|
||||
"name": "ens33",
|
||||
@@ -25,179 +124,105 @@ Examples:
|
||||
"MULTICAST"
|
||||
],
|
||||
"mtu": 1500,
|
||||
"type": "Ethernet",
|
||||
"mac_addr": "00:0c:29:3b:58:0e",
|
||||
"ipv4_addr": "192.168.71.137",
|
||||
"ipv4_mask": "255.255.255.0",
|
||||
"ipv4_bcast": "192.168.71.255",
|
||||
"ipv6_addr": "fe80::c1cb:715d:bc3e:b8a0",
|
||||
"ipv6_mask": 64,
|
||||
"ipv6_scope": "0x20",
|
||||
"mac_addr": "00:0c:29:3b:58:0e",
|
||||
"type": "Ethernet",
|
||||
"ipv6_type": "link",
|
||||
"metric": null,
|
||||
"rx_packets": 8061,
|
||||
"rx_bytes": 1514413,
|
||||
"rx_errors": 0,
|
||||
"rx_dropped": 0,
|
||||
"rx_overruns": 0,
|
||||
"rx_frame": 0,
|
||||
"tx_packets": 4502,
|
||||
"tx_errors": 0,
|
||||
"tx_dropped": 0,
|
||||
"tx_overruns": 0,
|
||||
"tx_carrier": 0,
|
||||
"tx_collisions": 0,
|
||||
"rx_bytes": 1514413,
|
||||
"tx_bytes": 866622,
|
||||
"tx_errors": 0,
|
||||
"tx_dropped": 0,
|
||||
"tx_overruns": 0,
|
||||
"tx_carrier": 0,
|
||||
"tx_collisions": 0,
|
||||
"metric": null
|
||||
},
|
||||
{
|
||||
"name": "lo",
|
||||
"flags": 73,
|
||||
"state": [
|
||||
"UP",
|
||||
"LOOPBACK",
|
||||
"RUNNING"
|
||||
"ipv4": [
|
||||
{
|
||||
"address": "192.168.71.137",
|
||||
"mask": "255.255.255.0",
|
||||
"broadcast": "192.168.71.255"
|
||||
}
|
||||
],
|
||||
"mtu": 65536,
|
||||
"ipv4_addr": "127.0.0.1",
|
||||
"ipv4_mask": "255.0.0.0",
|
||||
"ipv4_bcast": null,
|
||||
"ipv6_addr": "::1",
|
||||
"ipv6_mask": 128,
|
||||
"ipv6_scope": "0x10",
|
||||
"mac_addr": null,
|
||||
"type": "Local Loopback",
|
||||
"rx_packets": 73,
|
||||
"rx_bytes": 6009,
|
||||
"rx_errors": 0,
|
||||
"rx_dropped": 0,
|
||||
"rx_overruns": 0,
|
||||
"rx_frame": 0,
|
||||
"tx_packets": 73,
|
||||
"tx_bytes": 6009,
|
||||
"tx_errors": 0,
|
||||
"tx_dropped": 0,
|
||||
"tx_overruns": 0,
|
||||
"tx_carrier": 0,
|
||||
"tx_collisions": 0,
|
||||
"metric": null
|
||||
"ipv6": [
|
||||
{
|
||||
"address": "fe80::c1cb:715d:bc3e:b8a0",
|
||||
"scope_id": null,
|
||||
"mask": 64,
|
||||
"scope": "0x20",
|
||||
"type": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
$ ifconfig | jc --ifconfig -p -r
|
||||
$ ifconfig ens33 | jc --ifconfig -p -r
|
||||
[
|
||||
{
|
||||
"name": "ens33",
|
||||
"flags": "4163",
|
||||
"state": "UP,BROADCAST,RUNNING,MULTICAST",
|
||||
"mtu": "1500",
|
||||
"type": "Ethernet",
|
||||
"mac_addr": "00:0c:29:3b:58:0e",
|
||||
"ipv4_addr": "192.168.71.137",
|
||||
"ipv4_mask": "255.255.255.0",
|
||||
"ipv4_bcast": "192.168.71.255",
|
||||
"ipv6_addr": "fe80::c1cb:715d:bc3e:b8a0",
|
||||
"ipv6_mask": "64",
|
||||
"ipv6_scope": "0x20",
|
||||
"mac_addr": "00:0c:29:3b:58:0e",
|
||||
"type": "Ethernet",
|
||||
"ipv6_type": "link",
|
||||
"metric": null,
|
||||
"rx_packets": "8061",
|
||||
"rx_bytes": "1514413",
|
||||
"rx_errors": "0",
|
||||
"rx_dropped": "0",
|
||||
"rx_overruns": "0",
|
||||
"rx_frame": "0",
|
||||
"tx_packets": "4502",
|
||||
"tx_errors": "0",
|
||||
"tx_dropped": "0",
|
||||
"tx_overruns": "0",
|
||||
"tx_carrier": "0",
|
||||
"tx_collisions": "0",
|
||||
"rx_bytes": "1514413",
|
||||
"tx_bytes": "866622",
|
||||
"tx_errors": "0",
|
||||
"tx_dropped": "0",
|
||||
"tx_overruns": "0",
|
||||
"tx_carrier": "0",
|
||||
"tx_collisions": "0",
|
||||
"metric": null
|
||||
},
|
||||
{
|
||||
"name": "lo",
|
||||
"flags": "73",
|
||||
"state": "UP,LOOPBACK,RUNNING",
|
||||
"mtu": "65536",
|
||||
"ipv4_addr": "127.0.0.1",
|
||||
"ipv4_mask": "255.0.0.0",
|
||||
"ipv4_bcast": null,
|
||||
"ipv6_addr": "::1",
|
||||
"ipv6_mask": "128",
|
||||
"ipv6_scope": "0x10",
|
||||
"mac_addr": null,
|
||||
"type": "Local Loopback",
|
||||
"rx_packets": "73",
|
||||
"rx_bytes": "6009",
|
||||
"rx_errors": "0",
|
||||
"rx_dropped": "0",
|
||||
"rx_overruns": "0",
|
||||
"rx_frame": "0",
|
||||
"tx_packets": "73",
|
||||
"tx_bytes": "6009",
|
||||
"tx_errors": "0",
|
||||
"tx_dropped": "0",
|
||||
"tx_overruns": "0",
|
||||
"tx_carrier": "0",
|
||||
"tx_collisions": "0",
|
||||
"metric": null
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"flags": integer,
|
||||
"state": [
|
||||
string
|
||||
"ipv4": [
|
||||
{
|
||||
"address": "192.168.71.137",
|
||||
"mask": "255.255.255.0",
|
||||
"broadcast": "192.168.71.255"
|
||||
}
|
||||
],
|
||||
"mtu": integer,
|
||||
"ipv4_addr": string,
|
||||
"ipv4_mask": string,
|
||||
"ipv4_bcast": string,
|
||||
"ipv6_addr": string,
|
||||
"ipv6_mask": integer,
|
||||
"ipv6_scope": string,
|
||||
"mac_addr": string,
|
||||
"type": string,
|
||||
"rx_packets": integer,
|
||||
"rx_bytes": integer,
|
||||
"rx_errors": integer,
|
||||
"rx_dropped": integer,
|
||||
"rx_overruns": integer,
|
||||
"rx_frame": integer,
|
||||
"tx_packets": integer,
|
||||
"tx_bytes": integer,
|
||||
"tx_errors": integer,
|
||||
"tx_dropped": integer,
|
||||
"tx_overruns": integer,
|
||||
"tx_carrier": integer,
|
||||
"tx_collisions": integer,
|
||||
"metric": integer
|
||||
"ipv6": [
|
||||
{
|
||||
"address": "fe80::c1cb:715d:bc3e:b8a0",
|
||||
"scope_id": null,
|
||||
"mask": "64",
|
||||
"scope": "0x20",
|
||||
"type": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
<a id="jc.parsers.ifconfig.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -205,10 +230,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, aix, freebsd, darwin
|
||||
|
||||
Source: [`jc/parsers/ifconfig.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/ifconfig.py)
|
||||
|
||||
Version 2.3 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
101
docs/parsers/ini.md
Normal file
101
docs/parsers/ini.md
Normal file
@@ -0,0 +1,101 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.ini"></a>
|
||||
|
||||
# jc.parsers.ini
|
||||
|
||||
jc - JSON Convert INI file parser
|
||||
|
||||
Parses standard INI files.
|
||||
|
||||
- Delimiter can be `=` or `:`. Missing values are supported.
|
||||
- Comment prefix can be `#` or `;`. Comments must be on their own line.
|
||||
- If duplicate keys are found, only the last value will be used.
|
||||
- If any section names have the same name as a top-level key, the top-level
|
||||
key will be overwritten by the section data.
|
||||
|
||||
> Note: Values starting and ending with double or single quotation marks
|
||||
> will have the marks removed. If you would like to keep the quotation
|
||||
> marks, use the `-r` command-line argument or the `raw=True` argument in
|
||||
> `parse()`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat foo.ini | jc --ini
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('ini', ini_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
INI document converted to a dictionary - see the python configparser
|
||||
standard library documentation for more details.
|
||||
|
||||
{
|
||||
"<key1>": string,
|
||||
"<key2>": string,
|
||||
"<section1>": {
|
||||
"<key1>": string,
|
||||
"<key2>": string
|
||||
},
|
||||
"<section2>": {
|
||||
"<key1>": string,
|
||||
"<key2>": string
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat example.ini
|
||||
foo = fiz
|
||||
bar = buz
|
||||
|
||||
[section1]
|
||||
fruit = apple
|
||||
color = blue
|
||||
|
||||
[section2]
|
||||
fruit = pear
|
||||
color = green
|
||||
|
||||
$ cat example.ini | jc --ini -p
|
||||
{
|
||||
"foo": "fiz",
|
||||
"bar": "buz",
|
||||
"section1": {
|
||||
"fruit": "apple",
|
||||
"color": "blue"
|
||||
},
|
||||
"section2": {
|
||||
"fruit": "pear",
|
||||
"color": "green"
|
||||
}
|
||||
}
|
||||
|
||||
<a id="jc.parsers.ini.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary representing the INI file.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/ini.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/ini.py)
|
||||
|
||||
Version 2.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
123
docs/parsers/ini_dup.md
Normal file
123
docs/parsers/ini_dup.md
Normal file
@@ -0,0 +1,123 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.ini_dup"></a>
|
||||
|
||||
# jc.parsers.ini\_dup
|
||||
|
||||
jc - JSON Convert INI with duplicate key file parser
|
||||
|
||||
Parses standard INI files and preserves duplicate values. All values are
|
||||
contained in lists/arrays.
|
||||
|
||||
- Delimiter can be `=` or `:`. Missing values are supported.
|
||||
- Comment prefix can be `#` or `;`. Comments must be on their own line.
|
||||
- If any section names have the same name as a top-level key, the top-level
|
||||
key will be overwritten by the section data.
|
||||
- If multi-line values are used, each line will be a separate item in the
|
||||
value list. Blank lines in multi-line values are not supported.
|
||||
|
||||
> Note: Values starting and ending with double or single quotation marks
|
||||
> will have the marks removed. If you would like to keep the quotation
|
||||
> marks, use the `-r` command-line argument or the `raw=True` argument in
|
||||
> `parse()`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat foo.ini | jc --ini-dup
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('ini_dup', ini_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
INI document converted to a dictionary - see the python configparser
|
||||
standard library documentation for more details.
|
||||
|
||||
{
|
||||
"<key1>": [
|
||||
string
|
||||
],
|
||||
"<key2>": [
|
||||
string
|
||||
],
|
||||
"<section1>": {
|
||||
"<key1>": [
|
||||
string
|
||||
],
|
||||
"<key2>": [
|
||||
string
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat example.ini
|
||||
foo = fiz
|
||||
bar = buz
|
||||
|
||||
[section1]
|
||||
fruit = apple
|
||||
color = blue
|
||||
color = red
|
||||
|
||||
[section2]
|
||||
fruit = pear
|
||||
fruit = peach
|
||||
color = green
|
||||
|
||||
$ cat example.ini | jc --ini-dup -p
|
||||
{
|
||||
"foo": [
|
||||
"fiz"
|
||||
],
|
||||
"bar": [
|
||||
"buz"
|
||||
],
|
||||
"section1": {
|
||||
"fruit": [
|
||||
"apple"
|
||||
],
|
||||
"color": [
|
||||
"blue",
|
||||
"red"
|
||||
]
|
||||
},
|
||||
"section2": {
|
||||
"fruit": [
|
||||
"pear",
|
||||
"peach"
|
||||
],
|
||||
"color": [
|
||||
"green"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
<a id="jc.parsers.ini_dup.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary representing the INI file.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/ini_dup.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/ini_dup.py)
|
||||
|
||||
Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
187
docs/parsers/iostat.md
Normal file
187
docs/parsers/iostat.md
Normal file
@@ -0,0 +1,187 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.iostat"></a>
|
||||
|
||||
# jc.parsers.iostat
|
||||
|
||||
jc - JSON Convert `iostat` command output parser
|
||||
|
||||
> Note: `iostat` version 11 and higher include a JSON output option
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ iostat | jc --iostat
|
||||
|
||||
or
|
||||
|
||||
$ jc iostat
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('iostat', iostat_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"type": string,
|
||||
"percent_user": float,
|
||||
"percent_nice": float,
|
||||
"percent_system": float,
|
||||
"percent_iowait": float,
|
||||
"percent_steal": float,
|
||||
"percent_idle": float,
|
||||
"device": string,
|
||||
"tps": float,
|
||||
"kb_read_s": float,
|
||||
"mb_read_s": float,
|
||||
"kb_wrtn_s": float,
|
||||
"mb_wrtn_s": float,
|
||||
"kb_read": integer,
|
||||
"mb_read": integer,
|
||||
"kb_wrtn": integer,
|
||||
"mb_wrtn": integer,
|
||||
'kb_dscd': integer,
|
||||
'mb_dscd': integer,
|
||||
"rrqm_s": float,
|
||||
"wrqm_s": float,
|
||||
"r_s": float,
|
||||
"w_s": float,
|
||||
"rmb_s": float,
|
||||
"rkb_s": float,
|
||||
"wmb_s": float,
|
||||
"wkb_s": float,
|
||||
"avgrq_sz": float,
|
||||
"avgqu_sz": float,
|
||||
"await": float,
|
||||
"r_await": float,
|
||||
"w_await": float,
|
||||
"svctm": float,
|
||||
"aqu_sz": float,
|
||||
"rareq_sz": float,
|
||||
"wareq_sz": float,
|
||||
"d_s": float,
|
||||
"dkb_s": float,
|
||||
"dmb_s": float,
|
||||
"drqm_s": float,
|
||||
"percent_drqm": float,
|
||||
"d_await": float,
|
||||
"dareq_sz": float,
|
||||
"f_s": float,
|
||||
"f_await": float,
|
||||
"kb_dscd_s": float,
|
||||
"mb_dscd_s": float,
|
||||
"percent_util": float,
|
||||
"percent_rrqm": float,
|
||||
"percent_wrqm": float
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ iostat | jc --iostat -p
|
||||
[
|
||||
{
|
||||
"percent_user": 0.15,
|
||||
"percent_nice": 0.0,
|
||||
"percent_system": 0.18,
|
||||
"percent_iowait": 0.0,
|
||||
"percent_steal": 0.0,
|
||||
"percent_idle": 99.67,
|
||||
"type": "cpu"
|
||||
},
|
||||
{
|
||||
"device": "sda",
|
||||
"tps": 0.29,
|
||||
"kb_read_s": 7.22,
|
||||
"kb_wrtn_s": 1.25,
|
||||
"kb_read": 194341,
|
||||
"kb_wrtn": 33590,
|
||||
"type": "device"
|
||||
},
|
||||
{
|
||||
"device": "dm-0",
|
||||
"tps": 0.29,
|
||||
"kb_read_s": 5.99,
|
||||
"kb_wrtn_s": 1.17,
|
||||
"kb_read": 161361,
|
||||
"kb_wrtn": 31522,
|
||||
"type": "device"
|
||||
},
|
||||
{
|
||||
"device": "dm-1",
|
||||
"tps": 0.0,
|
||||
"kb_read_s": 0.08,
|
||||
"kb_wrtn_s": 0.0,
|
||||
"kb_read": 2204,
|
||||
"kb_wrtn": 0,
|
||||
"type": "device"
|
||||
}
|
||||
]
|
||||
|
||||
$ iostat | jc --iostat -p -r
|
||||
[
|
||||
{
|
||||
"percent_user": "0.15",
|
||||
"percent_nice": "0.00",
|
||||
"percent_system": "0.18",
|
||||
"percent_iowait": "0.00",
|
||||
"percent_steal": "0.00",
|
||||
"percent_idle": "99.67",
|
||||
"type": "cpu"
|
||||
},
|
||||
{
|
||||
"device": "sda",
|
||||
"tps": "0.29",
|
||||
"kb_read_s": "7.22",
|
||||
"kb_wrtn_s": "1.25",
|
||||
"kb_read": "194341",
|
||||
"kb_wrtn": "33590",
|
||||
"type": "device"
|
||||
},
|
||||
{
|
||||
"device": "dm-0",
|
||||
"tps": "0.29",
|
||||
"kb_read_s": "5.99",
|
||||
"kb_wrtn_s": "1.17",
|
||||
"kb_read": "161361",
|
||||
"kb_wrtn": "31522",
|
||||
"type": "device"
|
||||
},
|
||||
{
|
||||
"device": "dm-1",
|
||||
"tps": "0.00",
|
||||
"kb_read_s": "0.08",
|
||||
"kb_wrtn_s": "0.00",
|
||||
"kb_read": "2204",
|
||||
"kb_wrtn": "0",
|
||||
"type": "device"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.iostat.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/iostat.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/iostat.py)
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
135
docs/parsers/iostat_s.md
Normal file
135
docs/parsers/iostat_s.md
Normal file
@@ -0,0 +1,135 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.iostat_s"></a>
|
||||
|
||||
# jc.parsers.iostat\_s
|
||||
|
||||
jc - JSON Convert `iostat` command output streaming parser
|
||||
|
||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||
> Dictionaries (module)
|
||||
|
||||
> Note: `iostat` version 11 and higher include a JSON output option
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ iostat | jc --iostat-s
|
||||
|
||||
> Note: When piping `jc` converted `iostat` output to other processes it may
|
||||
> appear the output is hanging due to the OS pipe buffers. This is because
|
||||
> `iostat` output is too small to quickly fill up the buffer. Use the `-u`
|
||||
> option to unbuffer the `jc` output if you would like immediate output. See
|
||||
> the [readme](https://github.com/kellyjonbrazil/jc/tree/master#unbuffering-output)
|
||||
> for more information.
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
|
||||
result = jc.parse('iostat_s', iostat_command_output.splitlines())
|
||||
for item in result:
|
||||
# do something
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"type": string,
|
||||
"percent_user": float,
|
||||
"percent_nice": float,
|
||||
"percent_system": float,
|
||||
"percent_iowait": float,
|
||||
"percent_steal": float,
|
||||
"percent_idle": float,
|
||||
"device": string,
|
||||
"tps": float,
|
||||
"kb_read_s": float,
|
||||
"mb_read_s": float,
|
||||
"kb_wrtn_s": float,
|
||||
"mb_wrtn_s": float,
|
||||
"kb_read": integer,
|
||||
"mb_read": integer,
|
||||
"kb_wrtn": integer,
|
||||
"mb_wrtn": integer,
|
||||
'kb_dscd': integer,
|
||||
'mb_dscd': integer,
|
||||
"rrqm_s": float,
|
||||
"wrqm_s": float,
|
||||
"r_s": float,
|
||||
"w_s": float,
|
||||
"rmb_s": float,
|
||||
"rkb_s": float,
|
||||
"wmb_s": float,
|
||||
"wkb_s": float,
|
||||
"avgrq_sz": float,
|
||||
"avgqu_sz": float,
|
||||
"await": float,
|
||||
"r_await": float,
|
||||
"w_await": float,
|
||||
"svctm": float,
|
||||
"aqu_sz": float,
|
||||
"rareq_sz": float,
|
||||
"wareq_sz": float,
|
||||
"d_s": float,
|
||||
"dkb_s": float,
|
||||
"dmb_s": float,
|
||||
"drqm_s": float,
|
||||
"percent_drqm": float,
|
||||
"d_await": float,
|
||||
"dareq_sz": float,
|
||||
"f_s": float,
|
||||
"f_await": float,
|
||||
"kb_dscd_s": float,
|
||||
"mb_dscd_s": float,
|
||||
"percent_util": float,
|
||||
"percent_rrqm": float,
|
||||
"percent_wrqm": float,
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
"success": boolean, # false if error parsing
|
||||
"error": string, # exists if "success" is false
|
||||
"line": string # exists if "success" is false
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ iostat | jc --iostat-s
|
||||
{"percent_user":0.14,"percent_nice":0.0,"percent_system":0.16,...}
|
||||
{"device":"sda","tps":0.24,"kb_read_s":5.28,"kb_wrtn_s":1.1...}
|
||||
...
|
||||
|
||||
$ iostat | jc --iostat-s -r
|
||||
{"percent_user":"0.14","percent_nice":"0.00","percent_system":"0.16"...}
|
||||
{"device":"sda","tps":"0.24","kb_read_s":"5.28","kb_wrtn_s":"1.10"...}
|
||||
...
|
||||
|
||||
<a id="jc.parsers.iostat_s.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
@add_jc_meta
|
||||
def parse(data, raw=False, quiet=False, ignore_exceptions=False)
|
||||
```
|
||||
|
||||
Main text parsing generator function. Returns an iterable object.
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (iterable) line-based text data to parse
|
||||
(e.g. sys.stdin or str.splitlines())
|
||||
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
ignore_exceptions: (boolean) ignore parsing exceptions if True
|
||||
|
||||
Returns:
|
||||
|
||||
Iterable of Dictionaries
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/iostat_s.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/iostat_s.py)
|
||||
|
||||
Version 1.3 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
559
docs/parsers/ip_address.md
Normal file
559
docs/parsers/ip_address.md
Normal file
@@ -0,0 +1,559 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.ip_address"></a>
|
||||
|
||||
# jc.parsers.ip\_address
|
||||
|
||||
jc - JSON Convert IP Address string parser
|
||||
|
||||
Accepts standard and integer IP address notation for both IPv4 and IPv6
|
||||
addresses. CIDR subnet mask and Scope ID is also allowed for standard
|
||||
notation. See examples below.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ echo '192.168.1.1' | jc --ip-address
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('ip_address', ip_address_string)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"version": integer,
|
||||
"max_prefix_length": integer,
|
||||
"ip": string,
|
||||
"ip_compressed": string,
|
||||
"ip_exploded": string,
|
||||
"ip_split": [
|
||||
string
|
||||
],
|
||||
"scope_id": string/null,
|
||||
"ipv4_mapped": string/null,
|
||||
"six_to_four": string/null,
|
||||
"teredo_client": string/null,
|
||||
"teredo_server": string/null,
|
||||
"dns_ptr": string,
|
||||
"network": string,
|
||||
"broadcast": string,
|
||||
"hostmask": string,
|
||||
"netmask": string,
|
||||
"cidr_netmask": integer,
|
||||
"hosts": integer,
|
||||
"first_host": string,
|
||||
"last_host": string,
|
||||
"is_multicast": boolean,
|
||||
"is_private": boolean,
|
||||
"is_global": boolean,
|
||||
"is_link_local": boolean,
|
||||
"is_loopback": boolean,
|
||||
"is_reserved": boolean,
|
||||
"is_unspecified": boolean,
|
||||
"int": {
|
||||
"ip": integer,
|
||||
"network": integer,
|
||||
"broadcast": integer,
|
||||
"first_host": integer,
|
||||
"last_host": integer
|
||||
},
|
||||
"hex": {
|
||||
"ip": string,
|
||||
"network": string,
|
||||
"broadcast": string,
|
||||
"hostmask": string,
|
||||
"netmask": string,
|
||||
"first_host": string,
|
||||
"last_host": string
|
||||
},
|
||||
"bin": {
|
||||
"ip": string,
|
||||
"network": string,
|
||||
"broadcast": string,
|
||||
"hostmask": string,
|
||||
"netmask": string,
|
||||
"first_host": string,
|
||||
"last_host": string
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ echo 192.168.2.10/24 | jc --ip-address -p
|
||||
{
|
||||
"version": 4,
|
||||
"max_prefix_length": 32,
|
||||
"ip": "192.168.2.10",
|
||||
"ip_compressed": "192.168.2.10",
|
||||
"ip_exploded": "192.168.2.10",
|
||||
"ip_split": [
|
||||
"192",
|
||||
"168",
|
||||
"2",
|
||||
"10"
|
||||
],
|
||||
"scope_id": null,
|
||||
"ipv4_mapped": null,
|
||||
"six_to_four": null,
|
||||
"teredo_client": null,
|
||||
"teredo_server": null,
|
||||
"dns_ptr": "10.2.168.192.in-addr.arpa",
|
||||
"network": "192.168.2.0",
|
||||
"broadcast": "192.168.2.255",
|
||||
"hostmask": "0.0.0.255",
|
||||
"netmask": "255.255.255.0",
|
||||
"cidr_netmask": 24,
|
||||
"hosts": 254,
|
||||
"first_host": "192.168.2.1",
|
||||
"last_host": "192.168.2.254",
|
||||
"is_multicast": false,
|
||||
"is_private": true,
|
||||
"is_global": false,
|
||||
"is_link_local": false,
|
||||
"is_loopback": false,
|
||||
"is_reserved": false,
|
||||
"is_unspecified": false,
|
||||
"int": {
|
||||
"ip": 3232236042,
|
||||
"network": 3232236032,
|
||||
"broadcast": 3232236287,
|
||||
"first_host": 3232236033,
|
||||
"last_host": 3232236286
|
||||
},
|
||||
"hex": {
|
||||
"ip": "c0:a8:02:0a",
|
||||
"network": "c0:a8:02:00",
|
||||
"broadcast": "c0:a8:02:ff",
|
||||
"hostmask": "00:00:00:ff",
|
||||
"netmask": "ff:ff:ff:00",
|
||||
"first_host": "c0:a8:02:01",
|
||||
"last_host": "c0:a8:02:fe"
|
||||
},
|
||||
"bin": {
|
||||
"ip": "11000000101010000000001000001010",
|
||||
"network": "11000000101010000000001000000000",
|
||||
"broadcast": "11000000101010000000001011111111",
|
||||
"hostmask": "00000000000000000000000011111111",
|
||||
"netmask": "11111111111111111111111100000000",
|
||||
"first_host": "11000000101010000000001000000001",
|
||||
"last_host": "11000000101010000000001011111110"
|
||||
}
|
||||
}
|
||||
|
||||
$ echo 3232236042 | jc --ip-address -p
|
||||
{
|
||||
"version": 4,
|
||||
"max_prefix_length": 32,
|
||||
"ip": "192.168.2.10",
|
||||
"ip_compressed": "192.168.2.10",
|
||||
"ip_exploded": "192.168.2.10",
|
||||
"ip_split": [
|
||||
"192",
|
||||
"168",
|
||||
"2",
|
||||
"10"
|
||||
],
|
||||
"scope_id": null,
|
||||
"ipv4_mapped": null,
|
||||
"six_to_four": null,
|
||||
"teredo_client": null,
|
||||
"teredo_server": null,
|
||||
"dns_ptr": "10.2.168.192.in-addr.arpa",
|
||||
"network": "192.168.2.10",
|
||||
"broadcast": "192.168.2.10",
|
||||
"hostmask": "0.0.0.0",
|
||||
"netmask": "255.255.255.255",
|
||||
"cidr_netmask": 32,
|
||||
"hosts": 1,
|
||||
"first_host": "192.168.2.10",
|
||||
"last_host": "192.168.2.10",
|
||||
"is_multicast": false,
|
||||
"is_private": true,
|
||||
"is_global": false,
|
||||
"is_link_local": false,
|
||||
"is_loopback": false,
|
||||
"is_reserved": false,
|
||||
"is_unspecified": false,
|
||||
"int": {
|
||||
"ip": 3232236042,
|
||||
"network": 3232236042,
|
||||
"broadcast": 3232236042,
|
||||
"first_host": 3232236042,
|
||||
"last_host": 3232236042
|
||||
},
|
||||
"hex": {
|
||||
"ip": "c0:a8:02:0a",
|
||||
"network": "c0:a8:02:0a",
|
||||
"broadcast": "c0:a8:02:0a",
|
||||
"hostmask": "00:00:00:00",
|
||||
"netmask": "ff:ff:ff:ff",
|
||||
"first_host": "c0:a8:02:0a",
|
||||
"last_host": "c0:a8:02:0a"
|
||||
},
|
||||
"bin": {
|
||||
"ip": "11000000101010000000001000001010",
|
||||
"network": "11000000101010000000001000001010",
|
||||
"broadcast": "11000000101010000000001000001010",
|
||||
"hostmask": "00000000000000000000000000000000",
|
||||
"netmask": "11111111111111111111111111111111",
|
||||
"first_host": "11000000101010000000001000001010",
|
||||
"last_host": "11000000101010000000001000001010"
|
||||
}
|
||||
}
|
||||
|
||||
$ echo 127:0:de::1%128/96 | jc --ip-address -p
|
||||
{
|
||||
"version": 6,
|
||||
"max_prefix_length": 128,
|
||||
"ip": "127:0:de::1",
|
||||
"ip_compressed": "127:0:de::1",
|
||||
"ip_exploded": "0127:0000:00de:0000:0000:0000:0000:0001",
|
||||
"ip_split": [
|
||||
"0127",
|
||||
"0000",
|
||||
"00de",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"0001"
|
||||
],
|
||||
"scope_id": "128",
|
||||
"ipv4_mapped": null,
|
||||
"six_to_four": null,
|
||||
"teredo_client": null,
|
||||
"teredo_server": null,
|
||||
"dns_ptr": "1.0.0.0.0.0...0.0.0.e.d.0.0.0.0.0.0.7.2.1.0.ip6.arpa",
|
||||
"network": "127:0:de::",
|
||||
"broadcast": "127:0:de::ffff:ffff",
|
||||
"hostmask": "::ffff:ffff",
|
||||
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff::",
|
||||
"cidr_netmask": 96,
|
||||
"hosts": 4294967294,
|
||||
"first_host": "127:0:de::1",
|
||||
"last_host": "127:0:de::ffff:fffe",
|
||||
"is_multicast": false,
|
||||
"is_private": false,
|
||||
"is_global": true,
|
||||
"is_link_local": false,
|
||||
"is_loopback": false,
|
||||
"is_reserved": true,
|
||||
"is_unspecified": false,
|
||||
"int": {
|
||||
"ip": 1531727573536155682370944093904699393,
|
||||
"network": 1531727573536155682370944093904699392,
|
||||
"broadcast": 1531727573536155682370944098199666687,
|
||||
"first_host": 1531727573536155682370944093904699393,
|
||||
"last_host": 1531727573536155682370944098199666686
|
||||
},
|
||||
"hex": {
|
||||
"ip": "01:27:00:00:00:de:00:00:00:00:00:00:00:00:00:01",
|
||||
"network": "01:27:00:00:00:de:00:00:00:00:00:00:00:00:00:00",
|
||||
"broadcast": "01:27:00:00:00:de:00:00:00:00:00:00:ff:ff:ff:ff",
|
||||
"hostmask": "00:00:00:00:00:00:00:00:00:00:00:00:ff:ff:ff:ff",
|
||||
"netmask": "ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:00:00:00:00",
|
||||
"first_host": "01:27:00:00:00:de:00:00:00:00:00:00:00:00:00:01",
|
||||
"last_host": "01:27:00:00:00:de:00:00:00:00:00:00:ff:ff:ff:fe"
|
||||
},
|
||||
"bin": {
|
||||
"ip": "0000000100100111000000000000000000000000110...000000000001",
|
||||
"network": "00000001001001110000000000000000000000...000000000000",
|
||||
"broadcast": "000000010010011100000000000000000000...111111111111",
|
||||
"hostmask": "0000000000000000000000000000000000000...111111111111",
|
||||
"netmask": "11111111111111111111111111111111111111...000000000000",
|
||||
"first_host": "00000001001001110000000000000000000...000000000001",
|
||||
"last_host": "000000010010011100000000000000000000...1111111111110"
|
||||
}
|
||||
}
|
||||
|
||||
$ echo 1531727573536155682370944093904699393 | jc --ip-address -p
|
||||
{
|
||||
"version": 6,
|
||||
"max_prefix_length": 128,
|
||||
"ip": "127:0:de::1",
|
||||
"ip_compressed": "127:0:de::1",
|
||||
"ip_exploded": "0127:0000:00de:0000:0000:0000:0000:0001",
|
||||
"ip_split": [
|
||||
"0127",
|
||||
"0000",
|
||||
"00de",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"0001"
|
||||
],
|
||||
"scope_id": null,
|
||||
"ipv4_mapped": null,
|
||||
"six_to_four": null,
|
||||
"teredo_client": null,
|
||||
"teredo_server": null,
|
||||
"dns_ptr": "1.0.0.0.0.0....0.0.0.0.e.d.0.0.0.0.0.0.7.2.1.0.ip6.arpa",
|
||||
"network": "127:0:de::1",
|
||||
"broadcast": "127:0:de::1",
|
||||
"hostmask": "::",
|
||||
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
|
||||
"cidr_netmask": 128,
|
||||
"hosts": 1,
|
||||
"first_host": "127:0:de::1",
|
||||
"last_host": "127:0:de::1",
|
||||
"is_multicast": false,
|
||||
"is_private": false,
|
||||
"is_global": true,
|
||||
"is_link_local": false,
|
||||
"is_loopback": false,
|
||||
"is_reserved": true,
|
||||
"is_unspecified": false,
|
||||
"int": {
|
||||
"ip": 1531727573536155682370944093904699393,
|
||||
"network": 1531727573536155682370944093904699393,
|
||||
"broadcast": 1531727573536155682370944093904699393,
|
||||
"first_host": 1531727573536155682370944093904699393,
|
||||
"last_host": 1531727573536155682370944093904699393
|
||||
},
|
||||
"hex": {
|
||||
"ip": "01:27:00:00:00:de:00:00:00:00:00:00:00:00:00:01",
|
||||
"network": "01:27:00:00:00:de:00:00:00:00:00:00:00:00:00:01",
|
||||
"broadcast": "01:27:00:00:00:de:00:00:00:00:00:00:00:00:00:01",
|
||||
"hostmask": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00",
|
||||
"netmask": "ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff",
|
||||
"first_host": "01:27:00:00:00:de:00:00:00:00:00:00:00:00:00:01",
|
||||
"last_host": "01:27:00:00:00:de:00:00:00:00:00:00:00:00:00:01"
|
||||
},
|
||||
"bin": {
|
||||
"ip": "0000000100100111000000000000000000000000110111100...000001",
|
||||
"network": "00000001001001110000000000000000000000001101...000001",
|
||||
"broadcast": "000000010010011100000000000000000000000011...000001",
|
||||
"hostmask": "0000000000000000000000000000000000000000000...000000",
|
||||
"netmask": "11111111111111111111111111111111111111111111...111111",
|
||||
"first_host": "00000001001001110000000000000000000000001...000001",
|
||||
"last_host": "000000010010011100000000000000000000000011...0000001"
|
||||
}
|
||||
}
|
||||
|
||||
# IPv4 Mapped Address
|
||||
$ echo ::FFFF:192.168.1.35 | jc --ip-address -p
|
||||
{
|
||||
"version": 6,
|
||||
"max_prefix_length": 128,
|
||||
"ip": "::ffff:c0a8:123",
|
||||
"ip_compressed": "::ffff:c0a8:123",
|
||||
"ip_exploded": "0000:0000:0000:0000:0000:ffff:c0a8:0123",
|
||||
"ip_split": [
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"ffff",
|
||||
"c0a8",
|
||||
"0123"
|
||||
],
|
||||
"scope_id": null,
|
||||
"ipv4_mapped": "192.168.1.35",
|
||||
"six_to_four": null,
|
||||
"teredo_client": null,
|
||||
"teredo_server": null,
|
||||
"dns_ptr": "3.2.1.0.8.a.0.c.f.f.f.f.0.0....0.0.0.0.0.0.ip6.arpa",
|
||||
"network": "::ffff:c0a8:123",
|
||||
"broadcast": "::ffff:c0a8:123",
|
||||
"hostmask": "::",
|
||||
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
|
||||
"cidr_netmask": 128,
|
||||
"hosts": 1,
|
||||
"first_host": "::ffff:c0a8:123",
|
||||
"last_host": "::ffff:c0a8:123",
|
||||
"is_multicast": false,
|
||||
"is_private": true,
|
||||
"is_global": false,
|
||||
"is_link_local": false,
|
||||
"is_loopback": false,
|
||||
"is_reserved": true,
|
||||
"is_unspecified": false,
|
||||
"int": {
|
||||
"ip": 281473913979171,
|
||||
"network": 281473913979171,
|
||||
"broadcast": 281473913979171,
|
||||
"first_host": 281473913979171,
|
||||
"last_host": 281473913979171
|
||||
},
|
||||
"hex": {
|
||||
"ip": "00:00:00:00:00:00:00:00:00:00:ff:ff:c0:a8:01:23",
|
||||
"network": "00:00:00:00:00:00:00:00:00:00:ff:ff:c0:a8:01:23",
|
||||
"broadcast": "00:00:00:00:00:00:00:00:00:00:ff:ff:c0:a8:01:23",
|
||||
"hostmask": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00",
|
||||
"netmask": "ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff",
|
||||
"first_host": "00:00:00:00:00:00:00:00:00:00:ff:ff:c0:a8:01:23",
|
||||
"last_host": "00:00:00:00:00:00:00:00:00:00:ff:ff:c0:a8:01:23"
|
||||
},
|
||||
"bin": {
|
||||
"ip": "000000000000000000000000000000000000000000000...100100011",
|
||||
"network": "0000000000000000000000000000000000000000...000100011",
|
||||
"broadcast": "00000000000000000000000000000000000000...000100011",
|
||||
"hostmask": "000000000000000000000000000000000000000...000000000",
|
||||
"netmask": "1111111111111111111111111111111111111111...111111111",
|
||||
"first_host": "0000000000000000000000000000000000000...100100011",
|
||||
"last_host": "00000000000000000000000000000000000000...0100100011"
|
||||
}
|
||||
}
|
||||
|
||||
# 6to4 Address
|
||||
$ echo 2002:c000:204::/48 | jc --ip-address -p
|
||||
{
|
||||
"version": 6,
|
||||
"max_prefix_length": 128,
|
||||
"ip": "2002:c000:204::",
|
||||
"ip_compressed": "2002:c000:204::",
|
||||
"ip_exploded": "2002:c000:0204:0000:0000:0000:0000:0000",
|
||||
"ip_split": [
|
||||
"2002",
|
||||
"c000",
|
||||
"0204",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000",
|
||||
"0000"
|
||||
],
|
||||
"scope_id": null,
|
||||
"ipv4_mapped": null,
|
||||
"six_to_four": "192.0.2.4",
|
||||
"teredo_client": null,
|
||||
"teredo_server": null,
|
||||
"dns_ptr": "0.0.0.0.0.0.0...0.0.0.4.0.2.0.0.0.0.c.2.0.0.2.ip6.arpa",
|
||||
"network": "2002:c000:204::",
|
||||
"broadcast": "2002:c000:204:ffff:ffff:ffff:ffff:ffff",
|
||||
"hostmask": "::ffff:ffff:ffff:ffff:ffff",
|
||||
"netmask": "ffff:ffff:ffff::",
|
||||
"cidr_netmask": 48,
|
||||
"hosts": 1208925819614629174706174,
|
||||
"first_host": "2002:c000:204::1",
|
||||
"last_host": "2002:c000:204:ffff:ffff:ffff:ffff:fffe",
|
||||
"is_multicast": false,
|
||||
"is_private": false,
|
||||
"is_global": true,
|
||||
"is_link_local": false,
|
||||
"is_loopback": false,
|
||||
"is_reserved": false,
|
||||
"is_unspecified": false,
|
||||
"int": {
|
||||
"ip": 42549574682102084431821433448024768512,
|
||||
"network": 42549574682102084431821433448024768512,
|
||||
"broadcast": 42549574682103293357641048077199474687,
|
||||
"first_host": 42549574682102084431821433448024768513,
|
||||
"last_host": 42549574682103293357641048077199474686
|
||||
},
|
||||
"hex": {
|
||||
"ip": "20:02:c0:00:02:04:00:00:00:00:00:00:00:00:00:00",
|
||||
"network": "20:02:c0:00:02:04:00:00:00:00:00:00:00:00:00:00",
|
||||
"broadcast": "20:02:c0:00:02:04:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff",
|
||||
"hostmask": "00:00:00:00:00:00:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff",
|
||||
"netmask": "ff:ff:ff:ff:ff:ff:00:00:00:00:00:00:00:00:00:00",
|
||||
"first_host": "20:02:c0:00:02:04:00:00:00:00:00:00:00:00:00:01",
|
||||
"last_host": "20:02:c0:00:02:04:ff:ff:ff:ff:ff:ff:ff:ff:ff:fe"
|
||||
},
|
||||
"bin": {
|
||||
"ip": "00100000000000101100000000000000000000100000010...00000000",
|
||||
"network": "001000000000001011000000000000000000001000...00000000",
|
||||
"broadcast": "0010000000000010110000000000000000000010...11111111",
|
||||
"hostmask": "00000000000000000000000000000000000000000...11111111",
|
||||
"netmask": "111111111111111111111111111111111111111111...00000000",
|
||||
"first_host": "001000000000001011000000000000000000001...00000001",
|
||||
"last_host": "0010000000000010110000000000000000000010...111111110"
|
||||
}
|
||||
}
|
||||
|
||||
# Teredo Address
|
||||
$ echo 2001:0000:4136:e378:8000:63bf:3fff:fdd2 | jc --ip-address -p
|
||||
{
|
||||
"version": 6,
|
||||
"max_prefix_length": 128,
|
||||
"ip": "2001:0:4136:e378:8000:63bf:3fff:fdd2",
|
||||
"ip_compressed": "2001:0:4136:e378:8000:63bf:3fff:fdd2",
|
||||
"ip_exploded": "2001:0000:4136:e378:8000:63bf:3fff:fdd2",
|
||||
"ip_split": [
|
||||
"2001",
|
||||
"0000",
|
||||
"4136",
|
||||
"e378",
|
||||
"8000",
|
||||
"63bf",
|
||||
"3fff",
|
||||
"fdd2"
|
||||
],
|
||||
"scope_id": null,
|
||||
"ipv4_mapped": null,
|
||||
"six_to_four": null,
|
||||
"teredo_client": "192.0.2.45",
|
||||
"teredo_server": "65.54.227.120",
|
||||
"dns_ptr": "2.d.d.f.f.f.f.3.f.b.3.6.0.0.0.8.8....0.1.0.0.2.ip6.arpa",
|
||||
"network": "2001:0:4136:e378:8000:63bf:3fff:fdd2",
|
||||
"broadcast": "2001:0:4136:e378:8000:63bf:3fff:fdd2",
|
||||
"hostmask": "::",
|
||||
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
|
||||
"cidr_netmask": 128,
|
||||
"hosts": 1,
|
||||
"first_host": "2001:0:4136:e378:8000:63bf:3fff:fdd2",
|
||||
"last_host": "2001:0:4136:e378:8000:63bf:3fff:fdd2",
|
||||
"is_multicast": false,
|
||||
"is_private": true,
|
||||
"is_global": false,
|
||||
"is_link_local": false,
|
||||
"is_loopback": false,
|
||||
"is_reserved": false,
|
||||
"is_unspecified": false,
|
||||
"int": {
|
||||
"ip": 42540488182158724593221357832373272018,
|
||||
"network": 42540488182158724593221357832373272018,
|
||||
"broadcast": 42540488182158724593221357832373272018,
|
||||
"first_host": 42540488182158724593221357832373272018,
|
||||
"last_host": 42540488182158724593221357832373272018
|
||||
},
|
||||
"hex": {
|
||||
"ip": "20:01:00:00:41:36:e3:78:80:00:63:bf:3f:ff:fd:d2",
|
||||
"network": "20:01:00:00:41:36:e3:78:80:00:63:bf:3f:ff:fd:d2",
|
||||
"broadcast": "20:01:00:00:41:36:e3:78:80:00:63:bf:3f:ff:fd:d2",
|
||||
"hostmask": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00",
|
||||
"netmask": "ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff",
|
||||
"first_host": "20:01:00:00:41:36:e3:78:80:00:63:bf:3f:ff:fd:d2",
|
||||
"last_host": "20:01:00:00:41:36:e3:78:80:00:63:bf:3f:ff:fd:d2"
|
||||
},
|
||||
"bin": {
|
||||
"ip": "0010000000000001000000000000000001000001001...110111010010",
|
||||
"network": "00100000000000010000000000000000010000...110111010010",
|
||||
"broadcast": "001000000000000100000000000000000100...110111010010",
|
||||
"hostmask": "0000000000000000000000000000000000000...000000000000",
|
||||
"netmask": "11111111111111111111111111111111111111...111111111111",
|
||||
"first_host": "00100000000000010000000000000000010...110111010010",
|
||||
"last_host": "001000000000000100000000000000000100...110111010010"
|
||||
}
|
||||
}
|
||||
|
||||
<a id="jc.parsers.ip_address.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> Dict
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/ip_address.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/ip_address.py)
|
||||
|
||||
This parser can be used with the `--slurp` command-line option.
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
76
docs/parsers/ip_route.md
Normal file
76
docs/parsers/ip_route.md
Normal file
@@ -0,0 +1,76 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.ip_route"></a>
|
||||
|
||||
# jc.parsers.ip\_route
|
||||
|
||||
jc - JSON Convert `ip route` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ ip route | jc --ip-route
|
||||
|
||||
or
|
||||
|
||||
$ jc ip-route
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('ip_route', ip_route_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"ip": string,
|
||||
"via": string,
|
||||
"dev": string,
|
||||
"metric": integer,
|
||||
"proto": string,
|
||||
"scope": string,
|
||||
"src": string,
|
||||
"via": string,
|
||||
"status": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ ip route | jc --ip-route -p
|
||||
[
|
||||
{
|
||||
"ip": "10.0.2.0/24",
|
||||
"dev": "enp0s3",
|
||||
"proto": "kernel",
|
||||
"scope": "link",
|
||||
"src": "10.0.2.15",
|
||||
"metric": 100
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.ip_route.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Json objects if data is processed and Raw data if raw = true.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/ip_route.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/ip_route.py)
|
||||
|
||||
Version 1.0 by Julian Jackson (jackson.julian55@yahoo.com)
|
||||
@@ -1,15 +1,47 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.iptables"></a>
|
||||
|
||||
# jc.parsers.iptables
|
||||
jc - JSON CLI output utility ipables Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `iptables` command output parser
|
||||
|
||||
Specify --iptables as the first argument if the piped input is coming from iptables
|
||||
Supports `-vLn` and `--line-numbers` for all tables.
|
||||
|
||||
Supports -vLn and --line-numbers for all tables
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ sudo iptables -L -t nat | jc --iptables
|
||||
|
||||
'linux'
|
||||
or
|
||||
|
||||
$ jc iptables -L -t nat
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('iptables', iptables_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"chain": string,
|
||||
"rules": [
|
||||
{
|
||||
"num" integer,
|
||||
"pkts": integer,
|
||||
"bytes": integer, # converted based on suffix
|
||||
"target": string, # Null if blank
|
||||
"prot": string,
|
||||
"opt": string, # "--" = Null
|
||||
"in": string,
|
||||
"out": string,
|
||||
"source": string,
|
||||
"destination": string,
|
||||
"options": string
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -131,50 +163,12 @@ Examples:
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.iptables.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"chain": string,
|
||||
"rules": [
|
||||
{
|
||||
"num" integer,
|
||||
"pkts": integer,
|
||||
"bytes": integer, # converted based on suffix
|
||||
"target": string,
|
||||
"prot": string,
|
||||
"opt": string, # "--" = Null
|
||||
"in": string,
|
||||
"out": string,
|
||||
"source": string,
|
||||
"destination": string,
|
||||
"options": string
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -182,10 +176,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/iptables.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/iptables.py)
|
||||
|
||||
Version 1.10 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
149
docs/parsers/iw_scan.md
Normal file
149
docs/parsers/iw_scan.md
Normal file
@@ -0,0 +1,149 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.iw_scan"></a>
|
||||
|
||||
# jc.parsers.iw\_scan
|
||||
|
||||
jc - JSON Convert `iw dev <device> scan` command output parser
|
||||
|
||||
This parser is considered beta quality. Not all fields are parsed and there
|
||||
are not enough samples to test.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ iw dev wlan0 scan | jc --iw-scan
|
||||
|
||||
or
|
||||
|
||||
$ jc iw dev wlan0 scan
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('iw_scan', iw_scan_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"foo": string/integer/float, # best guess based on value
|
||||
"bar": string/integer/float,
|
||||
"baz": string/integer/float
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ iw dev wlan0 scan | jc --iw-scan -p
|
||||
[
|
||||
{
|
||||
"bssid": "71:31:72:65:e1:a2",
|
||||
"interface": "wlan0",
|
||||
"freq": 2462,
|
||||
"capability": "ESS Privacy ShortSlotTime (0x0411)",
|
||||
"ssid": "WLAN-1234",
|
||||
"supported_rates": [
|
||||
1.0,
|
||||
2.0,
|
||||
5.5,
|
||||
11.0,
|
||||
18.0,
|
||||
24.0,
|
||||
36.0,
|
||||
54.0
|
||||
],
|
||||
"erp": "<no flags>",
|
||||
"erp_d4.0": "<no flags>",
|
||||
"rsn": "Version: 1",
|
||||
"group_cipher": "CCMP",
|
||||
"pairwise_ciphers": "CCMP",
|
||||
"authentication_suites": "PSK",
|
||||
"capabilities": "0x186c",
|
||||
"extended_supported_rates": [
|
||||
6.0,
|
||||
9.0,
|
||||
12.0,
|
||||
48.0
|
||||
],
|
||||
"ht_rx_mcs_rate_indexes_supported": "0-15",
|
||||
"primary_channel": 11,
|
||||
"secondary_channel_offset": "no secondary",
|
||||
"rifs": 1,
|
||||
"ht_protection": "no",
|
||||
"non-gf_present": 1,
|
||||
"obss_non-gf_present": 0,
|
||||
"dual_beacon": 0,
|
||||
"dual_cts_protection": 0,
|
||||
"stbc_beacon": 0,
|
||||
"l-sig_txop_prot": 0,
|
||||
"pco_active": 0,
|
||||
"pco_phase": 0,
|
||||
"bss_width_channel_transition_delay_factor": 5,
|
||||
"extended_capabilities": "HT Information Exchange Supported",
|
||||
"wmm": "Parameter version 1",
|
||||
"be": "CW 15-1023, AIFSN 3",
|
||||
"bk": "CW 15-1023, AIFSN 7",
|
||||
"vi": "CW 7-15, AIFSN 2, TXOP 3008 usec",
|
||||
"vo": "CW 3-7, AIFSN 2, TXOP 1504 usec",
|
||||
"wps": "Version: 1.0",
|
||||
"wi-fi_protected_setup_state": "2 (Configured)",
|
||||
"selected_registrar": "0x0",
|
||||
"response_type": "3 (AP)",
|
||||
"uuid": "00000000-0000-0003-0000-75317074f1a2",
|
||||
"manufacturer": "Corporation",
|
||||
"model": "VGV8539JW",
|
||||
"model_number": "1.47.000",
|
||||
"serial_number": "J144024542",
|
||||
"primary_device_type": "6-0050f204-1",
|
||||
"device_name": "Wireless Router(WFA)",
|
||||
"config_methods": "Label, PBC",
|
||||
"rf_bands": "0x3",
|
||||
"tsf_usec": 212098649788,
|
||||
"sta_channel_width_mhz": 20,
|
||||
"passive_dwell_tus": 20,
|
||||
"active_dwell_tus": 10,
|
||||
"channel_width_trigger_scan_interval_s": 300,
|
||||
"scan_passive_total_per_channel_tus": 200,
|
||||
"scan_active_total_per_channel_tus": 20,
|
||||
"beacon_interval_tus": 100,
|
||||
"signal_dbm": -80.0,
|
||||
"last_seen_ms": 11420,
|
||||
"selected_rates": [
|
||||
1.0,
|
||||
2.0,
|
||||
5.5,
|
||||
11.0
|
||||
],
|
||||
"obss_scan_activity_threshold_percent": 0.25,
|
||||
"ds_parameter_set_channel": 11,
|
||||
"max_amsdu_length_bytes": 7935,
|
||||
"minimum_rx_ampdu_time_spacing_usec": 16
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.iw_scan.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/iw_scan.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/iw_scan.py)
|
||||
|
||||
Version 0.7 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
113
docs/parsers/iwconfig.md
Normal file
113
docs/parsers/iwconfig.md
Normal file
@@ -0,0 +1,113 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.iwconfig"></a>
|
||||
|
||||
# jc.parsers.iwconfig
|
||||
|
||||
jc - JSON Convert `iwconfig` command output parser
|
||||
|
||||
No `iwconfig` options are supported.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ iwconfig | jc --iwconfig
|
||||
|
||||
or
|
||||
|
||||
$ jc iwconfig
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('iwconfig', iwconfig_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"protocol": string,
|
||||
"essid": string,
|
||||
"mode": string,
|
||||
"frequency": float,
|
||||
"frequency_unit": string,
|
||||
"access_point": string,
|
||||
"bit_rate": float,
|
||||
"bit_rate_unit": string,
|
||||
"tx_power": integer,
|
||||
"tx_power_unit": string,
|
||||
"retry_short_limit": integer,
|
||||
"rts_threshold": boolean,
|
||||
"fragment_threshold": boolean,
|
||||
"power_management": boolean,
|
||||
"link_quality": string,
|
||||
"signal_level": integer,
|
||||
"signal_level_unit": string,
|
||||
"rx_invalid_nwid": integer,
|
||||
"rx_invalid_crypt": integer,
|
||||
"rx_invalid_frag": integer,
|
||||
"tx_excessive_retries": integer,
|
||||
"invalid_misc": integer,
|
||||
"missed_beacon": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ iwconfig | jc --iwconfig -p
|
||||
[
|
||||
{
|
||||
"name": "wlp5s0",
|
||||
"protocol": "IEEE 802.11",
|
||||
"essid": "BLABLABLA",
|
||||
"mode": "Managed",
|
||||
"frequency": 5.18,
|
||||
"frequency_unit": "GHz",
|
||||
"access_point": "E6:64:DA:16:51:BF",
|
||||
"bit_rate": 6.0,
|
||||
"bit_rate_unit": "Mb/s",
|
||||
"tx_power": 30,
|
||||
"tx_power_unit": "dBm",
|
||||
"retry_short_limit": 7,
|
||||
"rts_threshold": false,
|
||||
"fragment_threshold": false,
|
||||
"power_management": true,
|
||||
"link_quality": "61/70",
|
||||
"signal_level": -49,
|
||||
"signal_level_unit": "dBm",
|
||||
"rx_invalid_nwid": 0,
|
||||
"rx_invalid_crypt": 0,
|
||||
"rx_invalid_frag": 0,
|
||||
"tx_excessive_retries": 0,
|
||||
"invalid_misc": 2095,
|
||||
"missed_beacon": 0
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.iwconfig.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/iwconfig.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/iwconfig.py)
|
||||
|
||||
Version 1.1 by Thomas Vincent (vrince@gmail.com)
|
||||
105
docs/parsers/jar_manifest.md
Normal file
105
docs/parsers/jar_manifest.md
Normal file
@@ -0,0 +1,105 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.jar_manifest"></a>
|
||||
|
||||
# jc.parsers.jar\_manifest
|
||||
|
||||
jc - JSON Convert Java `MANIFEST.MF` file parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat MANIFEST.MF | jc --jar-manifest
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('jar_manifest', jar_manifest_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"key1": string,
|
||||
"key2": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat MANIFEST.MF | jc --jar-manifest -p
|
||||
$ unzip -c log4j-core-2.16.0.jar META-INF/MANIFEST.MF | \\
|
||||
jc --jar-manifest -p
|
||||
$ unzip -c 'apache-log4j-2.16.0-bin/*.jar' META-INF/MANIFEST.MF | \\
|
||||
jc --jar-manifest -p
|
||||
|
||||
$ cat MANIFEST.MF | jc --jar-manifest -p
|
||||
[
|
||||
{
|
||||
"Import_Package": "com.conversantmedia.util.concurrent;resoluti...",
|
||||
"Export_Package": "org.apache.logging.log4j.core;uses:=\"org.ap...",
|
||||
"Manifest_Version": "1.0",
|
||||
"Bundle_License": "https://www.apache.org/licenses/LICENSE-2.0.txt",
|
||||
"Bundle_SymbolicName": "org.apache.logging.log4j.core",
|
||||
"Built_By": "matt",
|
||||
"Bnd_LastModified": "1639373735804",
|
||||
"Implementation_Vendor_Id": "org.apache.logging.log4j",
|
||||
"Specification_Title": "Apache Log4j Core",
|
||||
"Log4jReleaseManager": "Matt Sicker",
|
||||
...
|
||||
}
|
||||
]
|
||||
|
||||
$ unzip -c 'apache-log4j-2.16.0-bin/*.jar' META-INF/MANIFEST.MF | \\
|
||||
jc --jar-manifest -p
|
||||
[
|
||||
...
|
||||
{
|
||||
"Archive": "apache-log4j-2.16.0-bin/log4j-spring-boot-2.16.0-so...",
|
||||
"Manifest_Version": "1.0",
|
||||
"Built_By": "matt",
|
||||
"Created_By": "Apache Maven 3.8.4",
|
||||
"Build_Jdk": "1.8.0_312"
|
||||
},
|
||||
{
|
||||
"Archive": "apache-log4j-2.16.0-bin/log4j-spring-boot-2.16.0-ja...",
|
||||
"Manifest_Version": "1.0",
|
||||
"Built_By": "matt",
|
||||
"Created_By": "Apache Maven 3.8.4",
|
||||
"Build_Jdk": "1.8.0_312"
|
||||
},
|
||||
{
|
||||
"Bundle_SymbolicName": "org.apache.logging.log4j.spring-cloud-c...",
|
||||
"Export_Package": "org.apache.logging.log4j.spring.cloud.config...",
|
||||
"Archive": "apache-log4j-2.16.0-bin/log4j-spring-cloud-config-c...",
|
||||
"Manifest_Version": "1.0",
|
||||
"Bundle_License": "https://www.apache.org/licenses/LICENSE-2.0.txt",
|
||||
...
|
||||
}
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.jar_manifest.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/jar_manifest.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/jar_manifest.py)
|
||||
|
||||
Version 0.01 by Matt J (https://github.com/listuser)
|
||||
@@ -1,15 +1,35 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.jobs"></a>
|
||||
|
||||
# jc.parsers.jobs
|
||||
jc - JSON CLI output utility jobs Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `jobs` command output parser
|
||||
|
||||
specify --jobs as the first argument if the piped input is coming from jobs
|
||||
Also supports the `-l` option.
|
||||
|
||||
Also supports the -l option
|
||||
The "Magic" syntax is not supported since the `jobs` command is a shell
|
||||
builtin.
|
||||
|
||||
Compatibility:
|
||||
Usage (cli):
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||
$ jobs | jc --jobs
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('jobs', jobs_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"job_number": integer,
|
||||
"pid": integer,
|
||||
"history": string,
|
||||
"status": string,
|
||||
"command": string
|
||||
}
|
||||
]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -73,39 +93,12 @@ Example:
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.jobs.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"job_number": integer,
|
||||
"pid": integer,
|
||||
"history": string,
|
||||
"status": string,
|
||||
"command": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -113,10 +106,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/jobs.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/jobs.py)
|
||||
|
||||
Version 1.6 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
77
docs/parsers/jwt.md
Normal file
77
docs/parsers/jwt.md
Normal file
@@ -0,0 +1,77 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.jwt"></a>
|
||||
|
||||
# jc.parsers.jwt
|
||||
|
||||
jc - JSON Convert JWT string parser
|
||||
|
||||
> Note: `jc` will not check the integrity of the JWT payload.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ echo "eyJhbGciOiJIUzI1N..." | jc --jwt
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('jwt', jwt_string)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"header": {
|
||||
"alg": string,
|
||||
"typ": string
|
||||
},
|
||||
"payload": {
|
||||
<key name>: string/integer/float/boolean/null
|
||||
},
|
||||
"signature": string # [0]
|
||||
}
|
||||
|
||||
[0] in colon-delimited hex notation
|
||||
|
||||
Examples:
|
||||
|
||||
% echo 'eyJhbGciOiJIUzI1N...' | jc --jwt -p
|
||||
{
|
||||
"header": {
|
||||
"alg": "HS256",
|
||||
"typ": "JWT"
|
||||
},
|
||||
"payload": {
|
||||
"sub": "1234567890",
|
||||
"name": "John Doe",
|
||||
"iat": 1516239022
|
||||
},
|
||||
"signature": "49:f9:4a:c7:04:49:48:c7:8a:28:5d:90:4f:87:f0:a4:c7..."
|
||||
}
|
||||
|
||||
<a id="jc.parsers.jwt.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> Dict
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/jwt.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/jwt.py)
|
||||
|
||||
This parser can be used with the `--slurp` command-line option.
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
84
docs/parsers/kv.md
Normal file
84
docs/parsers/kv.md
Normal file
@@ -0,0 +1,84 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.kv"></a>
|
||||
|
||||
# jc.parsers.kv
|
||||
|
||||
jc - JSON Convert `Key/Value` file and string parser
|
||||
|
||||
Supports files containing simple key/value pairs.
|
||||
|
||||
- Delimiter can be `=` or `:`. Missing values are supported.
|
||||
- Comment prefix can be `#` or `;`. Comments must be on their own line.
|
||||
- If duplicate keys are found, only the last value will be used.
|
||||
|
||||
> Note: Values starting and ending with quotation marks will have the marks
|
||||
> removed. If you would like to keep the quotation marks, use the `-r`
|
||||
> command-line argument or the `raw=True` argument in `parse()`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat foo.txt | jc --kv
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('kv', kv_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
Key/Value document converted to a dictionary - see the python configparser
|
||||
standard library documentation for more details.
|
||||
|
||||
{
|
||||
"key1": string,
|
||||
"key2": string
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat keyvalue.txt
|
||||
# this file contains key/value pairs
|
||||
name = John Doe
|
||||
address=555 California Drive
|
||||
age: 34
|
||||
|
||||
; comments can include # or ;
|
||||
# delimiter can be = or :
|
||||
# quoted values have quotation marks stripped by default
|
||||
# but can be preserved with the -r argument
|
||||
occupation:"Engineer"
|
||||
|
||||
$ cat keyvalue.txt | jc --kv -p
|
||||
{
|
||||
"name": "John Doe",
|
||||
"address": "555 California Drive",
|
||||
"age": "34",
|
||||
"occupation": "Engineer"
|
||||
}
|
||||
|
||||
<a id="jc.parsers.kv.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary representing a Key/Value pair document.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/kv.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/kv.py)
|
||||
|
||||
Version 2.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
91
docs/parsers/kv_dup.md
Normal file
91
docs/parsers/kv_dup.md
Normal file
@@ -0,0 +1,91 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.kv_dup"></a>
|
||||
|
||||
# jc.parsers.kv\_dup
|
||||
|
||||
jc - JSON Convert `Key/Value` with duplicate key file and string parser
|
||||
|
||||
Supports files containing simple key/value pairs and preserves duplicate
|
||||
values. All values are contained in lists/arrays.
|
||||
|
||||
- Delimiter can be `=` or `:`. Missing values are supported.
|
||||
- Comment prefix can be `#` or `;`. Comments must be on their own line.
|
||||
- If multi-line values are used, each line will be a separate item in the
|
||||
value list. Blank lines in multi-line values are not supported.
|
||||
|
||||
> Note: Values starting and ending with quotation marks will have the marks
|
||||
> removed. If you would like to keep the quotation marks, use the `-r`
|
||||
> command-line argument or the `raw=True` argument in `parse()`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat foo.txt | jc --kv-dup
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('kv_dup', kv_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
Key/Value document converted to a dictionary - see the python configparser
|
||||
standard library documentation for more details.
|
||||
|
||||
{
|
||||
"<key1>": [
|
||||
string
|
||||
],
|
||||
"<key2>": [
|
||||
string
|
||||
]
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat keyvalue.txt
|
||||
# this file contains key/value pairs
|
||||
name = John Doe
|
||||
address=555 California Drive
|
||||
age: 34
|
||||
|
||||
; comments can include # or ;
|
||||
# delimiter can be = or :
|
||||
# quoted values have quotation marks stripped by default
|
||||
# but can be preserved with the -r argument
|
||||
occupation:"Engineer"
|
||||
occupation = "Pilot"
|
||||
|
||||
$ cat keyvalue.txt | jc --kv-dup -p
|
||||
{
|
||||
"name": ["John Doe"],
|
||||
"address": ["555 California Drive"],
|
||||
"age": ["34"],
|
||||
"occupation": ["Engineer", "Pilot"]
|
||||
}
|
||||
|
||||
<a id="jc.parsers.kv_dup.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary representing a Key/Value pair document.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/kv_dup.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/kv_dup.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
132
docs/parsers/last.md
Normal file
132
docs/parsers/last.md
Normal file
@@ -0,0 +1,132 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.last"></a>
|
||||
|
||||
# jc.parsers.last
|
||||
|
||||
jc - JSON Convert `last` and `lastb` command output parser
|
||||
|
||||
Supports `-w`, `-F`, and `-x` options.
|
||||
|
||||
Calculated epoch time fields are naive (i.e. based on the local time of the
|
||||
system the parser is run on) since there is no timezone information in the
|
||||
`last` command output.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ last | jc --last
|
||||
|
||||
or
|
||||
|
||||
$ jc last
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('last', last_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"user": string,
|
||||
"tty": string,
|
||||
"hostname": string,
|
||||
"login": string,
|
||||
"logout": string,
|
||||
"duration": string,
|
||||
"login_epoch": integer, # (naive) available w/last -F option
|
||||
"logout_epoch": integer, # (naive) available w/last -F option
|
||||
"duration_seconds": integer # available w/last -F option
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ last -F | jc --last -p
|
||||
[
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys002",
|
||||
"hostname": null,
|
||||
"login": "Mon Dec 28 17:24:10 2020",
|
||||
"logout": "still logged in"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": null,
|
||||
"login": "Mon Dec 28 17:24:10 2020",
|
||||
"logout": "Mon Dec 28 17:25:01 2020",
|
||||
"duration": "00:00",
|
||||
"login_epoch": 1565891826,
|
||||
"logout_epoch": 1565895404,
|
||||
"duration_seconds": 3578
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": null,
|
||||
"login": "Mon Dec 28 17:24:10 2020",
|
||||
"logout": "Mon Dec 28 17:25:01 2020",
|
||||
"duration": "00:00",
|
||||
"login_epoch": 1565891826,
|
||||
"logout_epoch": 1565895404,
|
||||
"duration_seconds": 3578
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ last | jc --last -p -r
|
||||
[
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys002",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 14:31",
|
||||
"logout": "still_logged_in"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 10:38",
|
||||
"logout": "10:38",
|
||||
"duration": "00:00"
|
||||
},
|
||||
{
|
||||
"user": "kbrazil",
|
||||
"tty": "ttys003",
|
||||
"hostname": "-",
|
||||
"login": "Thu Feb 27 10:18",
|
||||
"logout": "10:18",
|
||||
"duration": "00:00"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.last.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/last.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/last.py)
|
||||
|
||||
Version 1.9 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,20 +1,60 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.ls"></a>
|
||||
|
||||
# jc.parsers.ls
|
||||
jc - JSON CLI output utility ls Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `ls` and `vdir` command output parser
|
||||
|
||||
specify --ls as the first argument if the piped input is coming from ls
|
||||
Options supported:
|
||||
- `lbaR1`
|
||||
- `--time-style=full-iso`
|
||||
|
||||
ls options supported:
|
||||
- None
|
||||
- la
|
||||
- h file sizes will be available in text form with -r but larger file sizes
|
||||
with human readable suffixes will be converted to Null in default view
|
||||
since the parser attempts to convert this field to an integer.
|
||||
> Note: The `-1`, `-l`, or `-b` option of `ls` should be used to correctly
|
||||
> parse filenames that include newline characters. Since `ls` does not
|
||||
> encode newlines in filenames when outputting to a pipe it will cause `jc`
|
||||
> to see multiple files instead of a single file if `-1`, `-l`, or `-b` is
|
||||
> not used. Alternatively, `vdir` can be used, which is the same as running
|
||||
> `ls -lb`.
|
||||
|
||||
Compatibility:
|
||||
The `epoch` calculated timestamp field is naive. (i.e. based on the local
|
||||
time of the system the parser is run on)
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'aix', 'freebsd'
|
||||
The `epoch_utc` calculated timestamp field is timezone-aware and is only
|
||||
available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ ls | jc --ls
|
||||
|
||||
or
|
||||
|
||||
$ jc ls
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('ls', ls_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filename": string,
|
||||
"flags": string,
|
||||
"links": integer,
|
||||
"parent": string,
|
||||
"owner": string,
|
||||
"group": string,
|
||||
"size": integer,
|
||||
"date": string,
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer # [1]
|
||||
}
|
||||
]
|
||||
|
||||
[0] naive timestamp if date field exists and can be converted.
|
||||
[1] timezone aware timestamp if date field is in UTC and can
|
||||
be converted.
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -26,12 +66,6 @@ Examples:
|
||||
{
|
||||
"filename": "arch"
|
||||
},
|
||||
{
|
||||
"filename": "awk"
|
||||
},
|
||||
{
|
||||
"filename": "base64"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
@@ -56,15 +90,6 @@ Examples:
|
||||
"size": 62744,
|
||||
"date": "Aug 8 16:14"
|
||||
},
|
||||
{
|
||||
"filename": "arch",
|
||||
"flags": "-rwxr-xr-x.",
|
||||
"links": 1,
|
||||
"owner": "root",
|
||||
"group": "root",
|
||||
"size": 33080,
|
||||
"date": "Aug 19 23:25"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
@@ -89,92 +114,15 @@ Examples:
|
||||
"size": "33080",
|
||||
"date": "Aug 19 23:25"
|
||||
},
|
||||
{
|
||||
"filename": "awk",
|
||||
"link_to": "gawk",
|
||||
"flags": "lrwxrwxrwx.",
|
||||
"links": "1",
|
||||
"owner": "root",
|
||||
"group": "root",
|
||||
"size": "4",
|
||||
"date": "Aug 15 10:53"
|
||||
},
|
||||
{
|
||||
"filename": "base64",
|
||||
"flags": "-rwxr-xr-x.",
|
||||
"links": "1",
|
||||
"owner": "root",
|
||||
"group": "root",
|
||||
"size": "37360",
|
||||
"date": "Aug 19 23:25"
|
||||
},
|
||||
{
|
||||
"filename": "basename",
|
||||
"flags": "-rwxr-xr-x.",
|
||||
"links": "1",
|
||||
"owner": "root",
|
||||
"group": "root",
|
||||
"size": "29032",
|
||||
"date": "Aug 19 23:25"
|
||||
},
|
||||
{
|
||||
"filename": "bash",
|
||||
"flags": "-rwxr-xr-x.",
|
||||
"links": "1",
|
||||
"owner": "root",
|
||||
"group": "root",
|
||||
"size": "964600",
|
||||
"date": "Aug 8 05:06"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ ls -l /usr/bin | jc --ls | jq '.[] | select(.size > 50000000)'
|
||||
{
|
||||
"filename": "emacs",
|
||||
"flags": "-r-xr-xr-x",
|
||||
"links": 1,
|
||||
"owner": "root",
|
||||
"group": "wheel",
|
||||
"size": 117164432,
|
||||
"date": "May 3 2019"
|
||||
}
|
||||
<a id="jc.parsers.ls.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filename": string,
|
||||
"flags": string,
|
||||
"links": integer,
|
||||
"owner": string,
|
||||
"group": string,
|
||||
"size": integer,
|
||||
"date": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -182,10 +130,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/ls.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/ls.py)
|
||||
|
||||
Version 1.12 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
104
docs/parsers/ls_s.md
Normal file
104
docs/parsers/ls_s.md
Normal file
@@ -0,0 +1,104 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.ls_s"></a>
|
||||
|
||||
# jc.parsers.ls\_s
|
||||
|
||||
jc - JSON Convert `ls` and `vdir` command output streaming parser
|
||||
|
||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||
> Dictionaries (module)
|
||||
|
||||
Requires the `-l` option to be used on `ls`. If there are newline characters
|
||||
in the filename, then make sure to use the `-b` option on `ls`.
|
||||
|
||||
The `jc` `-qq` option can be used to ignore parsing errors. (e.g. filenames
|
||||
with newline characters, but `-b` was not used)
|
||||
|
||||
The `epoch` calculated timestamp field is naive (i.e. based on the local
|
||||
time of the system the parser is run on)
|
||||
|
||||
The `epoch_utc` calculated timestamp field is timezone-aware and is only
|
||||
available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ ls | jc --ls-s
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
|
||||
result = jc.parse('ls_s', ls_command_output.splitlines())
|
||||
for item in result:
|
||||
# do something
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"filename": string,
|
||||
"flags": string,
|
||||
"links": integer,
|
||||
"parent": string,
|
||||
"owner": string,
|
||||
"group": string,
|
||||
"size": integer,
|
||||
"date": string,
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
"success": boolean, # false if error parsing
|
||||
"error": string, # exists if "success" is false
|
||||
"line": string # exists if "success" is false
|
||||
}
|
||||
}
|
||||
|
||||
[0] naive timestamp if date field exists and can be converted.
|
||||
[1] timezone aware timestamp if date field is in UTC and can
|
||||
be converted
|
||||
|
||||
Examples:
|
||||
|
||||
$ ls -l /usr/bin | jc --ls-s
|
||||
{"filename":"2to3-","flags":"-rwxr-xr-x","links":4,"owner":"root","...}
|
||||
{"filename":"2to3-2.7","link_to":"../../System/Library/Frameworks/P...}
|
||||
{"filename":"AssetCacheLocatorUtil","flags":"-rwxr-xr-x","links":1,...}
|
||||
...
|
||||
|
||||
$ ls -l /usr/bin | jc --ls-s -r
|
||||
{"filename":"2to3-","flags":"-rwxr-xr-x","links":"4","owner":"roo"..."}
|
||||
{"filename":"2to3-2.7","link_to":"../../System/Library/Frameworks/P...}
|
||||
{"filename":"AssetCacheLocatorUtil","flags":"-rwxr-xr-x","links":"1...}
|
||||
...
|
||||
|
||||
<a id="jc.parsers.ls_s.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
@add_jc_meta
|
||||
def parse(data, raw=False, quiet=False, ignore_exceptions=False)
|
||||
```
|
||||
|
||||
Main text parsing generator function. Returns an iterable object.
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (iterable) line-based text data to parse
|
||||
(e.g. sys.stdin or str.splitlines())
|
||||
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
ignore_exceptions: (boolean) ignore parsing exceptions if True
|
||||
|
||||
Returns:
|
||||
|
||||
Iterable of Dictionaries
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/ls_s.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/ls_s.py)
|
||||
|
||||
Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
91
docs/parsers/lsattr.md
Normal file
91
docs/parsers/lsattr.md
Normal file
@@ -0,0 +1,91 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.lsattr"></a>
|
||||
|
||||
# jc.parsers.lsattr
|
||||
|
||||
jc - JSON Convert `lsattr` command output parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ lsattr | jc --lsattr
|
||||
|
||||
or
|
||||
|
||||
$ jc lsattr
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('lsattr', lsattr_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
Information from https://github.com/mirror/busybox/blob/2d4a3d9e6c1493a9520b907e07a41aca90cdfd94/e2fsprogs/e2fs_lib.c#L40
|
||||
used to define field names
|
||||
|
||||
[
|
||||
{
|
||||
"file": string,
|
||||
"compressed_file": Optional[boolean],
|
||||
"compressed_dirty_file": Optional[boolean],
|
||||
"compression_raw_access": Optional[boolean],
|
||||
"secure_deletion": Optional[boolean],
|
||||
"undelete": Optional[boolean],
|
||||
"synchronous_updates": Optional[boolean],
|
||||
"synchronous_directory_updates": Optional[boolean],
|
||||
"immutable": Optional[boolean],
|
||||
"append_only": Optional[boolean],
|
||||
"no_dump": Optional[boolean],
|
||||
"no_atime": Optional[boolean],
|
||||
"compression_requested": Optional[boolean],
|
||||
"encrypted": Optional[boolean],
|
||||
"journaled_data": Optional[boolean],
|
||||
"indexed_directory": Optional[boolean],
|
||||
"no_tailmerging": Optional[boolean],
|
||||
"top_of_directory_hierarchies": Optional[boolean],
|
||||
"extents": Optional[boolean],
|
||||
"no_cow": Optional[boolean],
|
||||
"casefold": Optional[boolean],
|
||||
"inline_data": Optional[boolean],
|
||||
"project_hierarchy": Optional[boolean],
|
||||
"verity": Optional[boolean],
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ sudo lsattr /etc/passwd | jc --lsattr
|
||||
[
|
||||
{
|
||||
"file": "/etc/passwd",
|
||||
"extents": true
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.lsattr.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/lsattr.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/lsattr.py)
|
||||
|
||||
Version 1.0 by Mark Rotner (rotner.mr@gmail.com)
|
||||
63
docs/parsers/lsb_release.md
Normal file
63
docs/parsers/lsb_release.md
Normal file
@@ -0,0 +1,63 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.lsb_release"></a>
|
||||
|
||||
# jc.parsers.lsb\_release
|
||||
|
||||
jc - JSON Convert `lsb_release` command parser
|
||||
|
||||
This parser is an alias to the Key/Value parser (`--kv`).
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ lsb_release -a | jc --lsb-release
|
||||
|
||||
or
|
||||
$ jc lsb_release -a
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('lsb_release', lsb_release_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"<key>": string
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ lsb_release -a | jc --lsb-release -p
|
||||
{
|
||||
"Distributor ID": "Ubuntu",
|
||||
"Description": "Ubuntu 16.04.6 LTS",
|
||||
"Release": "16.04",
|
||||
"Codename": "xenial"
|
||||
}
|
||||
|
||||
<a id="jc.parsers.lsb_release.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> JSONDictType
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/lsb_release.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/lsb_release.py)
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,236 +1,24 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.lsblk"></a>
|
||||
|
||||
# jc.parsers.lsblk
|
||||
jc - JSON CLI output utility lsblk Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `lsblk` command output parser
|
||||
|
||||
specify --lsblk as the first argument if the piped input is coming from lsblk
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ lsblk | jc --lsblk
|
||||
|
||||
'linux'
|
||||
or
|
||||
|
||||
Examples:
|
||||
$ jc lsblk
|
||||
|
||||
$ lsblk | jc --lsblk -p
|
||||
[
|
||||
{
|
||||
"name": "sda",
|
||||
"maj_min": "8:0",
|
||||
"rm": false,
|
||||
"size": "20G",
|
||||
"ro": false,
|
||||
"type": "disk",
|
||||
"mountpoint": null
|
||||
},
|
||||
{
|
||||
"name": "sda1",
|
||||
"maj_min": "8:1",
|
||||
"rm": false,
|
||||
"size": "1G",
|
||||
"ro": false,
|
||||
"type": "part",
|
||||
"mountpoint": "/boot"
|
||||
},
|
||||
...
|
||||
]
|
||||
Usage (module):
|
||||
|
||||
$ lsblk -o +KNAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID,RA,MODEL,SERIAL,STATE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,RQ-SIZE,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,WSAME,WWN,RAND,PKNAME,HCTL,TRAN,REV,VENDOR | jc --lsblk -p
|
||||
[
|
||||
{
|
||||
"name": "sda",
|
||||
"maj_min": "8:0",
|
||||
"rm": false,
|
||||
"size": "20G",
|
||||
"ro": false,
|
||||
"type": "disk",
|
||||
"mountpoint": null,
|
||||
"kname": "sda",
|
||||
"fstype": null,
|
||||
"label": null,
|
||||
"uuid": null,
|
||||
"partlabel": null,
|
||||
"partuuid": null,
|
||||
"ra": 4096,
|
||||
"model": "VMware Virtual S",
|
||||
"serial": null,
|
||||
"state": "running",
|
||||
"owner": "root",
|
||||
"group": "disk",
|
||||
"mode": "brw-rw----",
|
||||
"alignment": 0,
|
||||
"min_io": 512,
|
||||
"opt_io": 0,
|
||||
"phy_sec": 512,
|
||||
"log_sec": 512,
|
||||
"rota": true,
|
||||
"sched": "deadline",
|
||||
"rq_size": 128,
|
||||
"disc_aln": 0,
|
||||
"disc_gran": "0B",
|
||||
"disc_max": "0B",
|
||||
"disc_zero": false,
|
||||
"wsame": "32M",
|
||||
"wwn": null,
|
||||
"rand": true,
|
||||
"pkname": null,
|
||||
"hctl": "0:0:0:0",
|
||||
"tran": "spi",
|
||||
"rev": "1.0",
|
||||
"vendor": "VMware,"
|
||||
},
|
||||
{
|
||||
"name": "sda1",
|
||||
"maj_min": "8:1",
|
||||
"rm": false,
|
||||
"size": "1G",
|
||||
"ro": false,
|
||||
"type": "part",
|
||||
"mountpoint": "/boot",
|
||||
"kname": "sda1",
|
||||
"fstype": "xfs",
|
||||
"label": null,
|
||||
"uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932",
|
||||
"partlabel": null,
|
||||
"partuuid": null,
|
||||
"ra": 4096,
|
||||
"model": null,
|
||||
"serial": null,
|
||||
"state": null,
|
||||
"owner": "root",
|
||||
"group": "disk",
|
||||
"mode": "brw-rw----",
|
||||
"alignment": 0,
|
||||
"min_io": 512,
|
||||
"opt_io": 0,
|
||||
"phy_sec": 512,
|
||||
"log_sec": 512,
|
||||
"rota": true,
|
||||
"sched": "deadline",
|
||||
"rq_size": 128,
|
||||
"disc_aln": 0,
|
||||
"disc_gran": "0B",
|
||||
"disc_max": "0B",
|
||||
"disc_zero": false,
|
||||
"wsame": "32M",
|
||||
"wwn": null,
|
||||
"rand": true,
|
||||
"pkname": "sda",
|
||||
"hctl": null,
|
||||
"tran": null,
|
||||
"rev": null,
|
||||
"vendor": null
|
||||
},
|
||||
...
|
||||
]
|
||||
import jc
|
||||
result = jc.parse('lsblk', lsblk_command_output)
|
||||
|
||||
$ lsblk -o +KNAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID,RA,MODEL,SERIAL,STATE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,RQ-SIZE,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,WSAME,WWN,RAND,PKNAME,HCTL,TRAN,REV,VENDOR | jc --lsblk -p -r
|
||||
[
|
||||
{
|
||||
"name": "sda",
|
||||
"maj_min": "8:0",
|
||||
"rm": "0",
|
||||
"size": "20G",
|
||||
"ro": "0",
|
||||
"type": "disk",
|
||||
"mountpoint": null,
|
||||
"kname": "sda",
|
||||
"fstype": null,
|
||||
"label": null,
|
||||
"uuid": null,
|
||||
"partlabel": null,
|
||||
"partuuid": null,
|
||||
"ra": "4096",
|
||||
"model": "VMware Virtual S",
|
||||
"serial": null,
|
||||
"state": "running",
|
||||
"owner": "root",
|
||||
"group": "disk",
|
||||
"mode": "brw-rw----",
|
||||
"alignment": "0",
|
||||
"min_io": "512",
|
||||
"opt_io": "0",
|
||||
"phy_sec": "512",
|
||||
"log_sec": "512",
|
||||
"rota": "1",
|
||||
"sched": "deadline",
|
||||
"rq_size": "128",
|
||||
"disc_aln": "0",
|
||||
"disc_gran": "0B",
|
||||
"disc_max": "0B",
|
||||
"disc_zero": "0",
|
||||
"wsame": "32M",
|
||||
"wwn": null,
|
||||
"rand": "1",
|
||||
"pkname": null,
|
||||
"hctl": "0:0:0:0",
|
||||
"tran": "spi",
|
||||
"rev": "1.0",
|
||||
"vendor": "VMware,"
|
||||
},
|
||||
{
|
||||
"name": "sda1",
|
||||
"maj_min": "8:1",
|
||||
"rm": "0",
|
||||
"size": "1G",
|
||||
"ro": "0",
|
||||
"type": "part",
|
||||
"mountpoint": "/boot",
|
||||
"kname": "sda1",
|
||||
"fstype": "xfs",
|
||||
"label": null,
|
||||
"uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932",
|
||||
"partlabel": null,
|
||||
"partuuid": null,
|
||||
"ra": "4096",
|
||||
"model": null,
|
||||
"serial": null,
|
||||
"state": null,
|
||||
"owner": "root",
|
||||
"group": "disk",
|
||||
"mode": "brw-rw----",
|
||||
"alignment": "0",
|
||||
"min_io": "512",
|
||||
"opt_io": "0",
|
||||
"phy_sec": "512",
|
||||
"log_sec": "512",
|
||||
"rota": "1",
|
||||
"sched": "deadline",
|
||||
"rq_size": "128",
|
||||
"disc_aln": "0",
|
||||
"disc_gran": "0B",
|
||||
"disc_max": "0B",
|
||||
"disc_zero": "0",
|
||||
"wsame": "32M",
|
||||
"wwn": null,
|
||||
"rand": "1",
|
||||
"pkname": "sda",
|
||||
"hctl": null,
|
||||
"tran": null,
|
||||
"rev": null,
|
||||
"vendor": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
@@ -277,9 +65,221 @@ Returns:
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
Examples:
|
||||
|
||||
$ lsblk | jc --lsblk -p
|
||||
[
|
||||
{
|
||||
"name": "sda",
|
||||
"maj_min": "8:0",
|
||||
"rm": false,
|
||||
"size": "20G",
|
||||
"ro": false,
|
||||
"type": "disk",
|
||||
"mountpoint": null
|
||||
},
|
||||
{
|
||||
"name": "sda1",
|
||||
"maj_min": "8:1",
|
||||
"rm": false,
|
||||
"size": "1G",
|
||||
"ro": false,
|
||||
"type": "part",
|
||||
"mountpoint": "/boot"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ lsblk -o +KNAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID,RA,MODEL,SERIAL,\\
|
||||
STATE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,\\
|
||||
SCHED,RQ-SIZE,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,WSAME,WWN,RAND,\\
|
||||
PKNAME,HCTL,TRAN,REV,VENDOR | jc --lsblk -p
|
||||
[
|
||||
{
|
||||
"name": "sda",
|
||||
"maj_min": "8:0",
|
||||
"rm": false,
|
||||
"size": "20G",
|
||||
"ro": false,
|
||||
"type": "disk",
|
||||
"mountpoint": null,
|
||||
"kname": "sda",
|
||||
"fstype": null,
|
||||
"label": null,
|
||||
"uuid": null,
|
||||
"partlabel": null,
|
||||
"partuuid": null,
|
||||
"ra": 4096,
|
||||
"model": "VMware Virtual S",
|
||||
"serial": null,
|
||||
"state": "running",
|
||||
"owner": "root",
|
||||
"group": "disk",
|
||||
"mode": "brw-rw----",
|
||||
"alignment": 0,
|
||||
"min_io": 512,
|
||||
"opt_io": 0,
|
||||
"phy_sec": 512,
|
||||
"log_sec": 512,
|
||||
"rota": true,
|
||||
"sched": "deadline",
|
||||
"rq_size": 128,
|
||||
"disc_aln": 0,
|
||||
"disc_gran": "0B",
|
||||
"disc_max": "0B",
|
||||
"disc_zero": false,
|
||||
"wsame": "32M",
|
||||
"wwn": null,
|
||||
"rand": true,
|
||||
"pkname": null,
|
||||
"hctl": "0:0:0:0",
|
||||
"tran": "spi",
|
||||
"rev": "1.0",
|
||||
"vendor": "VMware,"
|
||||
},
|
||||
{
|
||||
"name": "sda1",
|
||||
"maj_min": "8:1",
|
||||
"rm": false,
|
||||
"size": "1G",
|
||||
"ro": false,
|
||||
"type": "part",
|
||||
"mountpoint": "/boot",
|
||||
"kname": "sda1",
|
||||
"fstype": "xfs",
|
||||
"label": null,
|
||||
"uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932",
|
||||
"partlabel": null,
|
||||
"partuuid": null,
|
||||
"ra": 4096,
|
||||
"model": null,
|
||||
"serial": null,
|
||||
"state": null,
|
||||
"owner": "root",
|
||||
"group": "disk",
|
||||
"mode": "brw-rw----",
|
||||
"alignment": 0,
|
||||
"min_io": 512,
|
||||
"opt_io": 0,
|
||||
"phy_sec": 512,
|
||||
"log_sec": 512,
|
||||
"rota": true,
|
||||
"sched": "deadline",
|
||||
"rq_size": 128,
|
||||
"disc_aln": 0,
|
||||
"disc_gran": "0B",
|
||||
"disc_max": "0B",
|
||||
"disc_zero": false,
|
||||
"wsame": "32M",
|
||||
"wwn": null,
|
||||
"rand": true,
|
||||
"pkname": "sda",
|
||||
"hctl": null,
|
||||
"tran": null,
|
||||
"rev": null,
|
||||
"vendor": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ lsblk -o +KNAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID,RA,MODEL,SERIAL,\\
|
||||
STATE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,\\
|
||||
SCHED,RQ-SIZE,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,WSAME,WWN,RAND,\\
|
||||
PKNAME,HCTL,TRAN,REV,VENDOR | jc --lsblk -p -r
|
||||
[
|
||||
{
|
||||
"name": "sda",
|
||||
"maj_min": "8:0",
|
||||
"rm": "0",
|
||||
"size": "20G",
|
||||
"ro": "0",
|
||||
"type": "disk",
|
||||
"mountpoint": null,
|
||||
"kname": "sda",
|
||||
"fstype": null,
|
||||
"label": null,
|
||||
"uuid": null,
|
||||
"partlabel": null,
|
||||
"partuuid": null,
|
||||
"ra": "4096",
|
||||
"model": "VMware Virtual S",
|
||||
"serial": null,
|
||||
"state": "running",
|
||||
"owner": "root",
|
||||
"group": "disk",
|
||||
"mode": "brw-rw----",
|
||||
"alignment": "0",
|
||||
"min_io": "512",
|
||||
"opt_io": "0",
|
||||
"phy_sec": "512",
|
||||
"log_sec": "512",
|
||||
"rota": "1",
|
||||
"sched": "deadline",
|
||||
"rq_size": "128",
|
||||
"disc_aln": "0",
|
||||
"disc_gran": "0B",
|
||||
"disc_max": "0B",
|
||||
"disc_zero": "0",
|
||||
"wsame": "32M",
|
||||
"wwn": null,
|
||||
"rand": "1",
|
||||
"pkname": null,
|
||||
"hctl": "0:0:0:0",
|
||||
"tran": "spi",
|
||||
"rev": "1.0",
|
||||
"vendor": "VMware,"
|
||||
},
|
||||
{
|
||||
"name": "sda1",
|
||||
"maj_min": "8:1",
|
||||
"rm": "0",
|
||||
"size": "1G",
|
||||
"ro": "0",
|
||||
"type": "part",
|
||||
"mountpoint": "/boot",
|
||||
"kname": "sda1",
|
||||
"fstype": "xfs",
|
||||
"label": null,
|
||||
"uuid": "05d927bb-5875-49e3-ada1-7f46cb31c932",
|
||||
"partlabel": null,
|
||||
"partuuid": null,
|
||||
"ra": "4096",
|
||||
"model": null,
|
||||
"serial": null,
|
||||
"state": null,
|
||||
"owner": "root",
|
||||
"group": "disk",
|
||||
"mode": "brw-rw----",
|
||||
"alignment": "0",
|
||||
"min_io": "512",
|
||||
"opt_io": "0",
|
||||
"phy_sec": "512",
|
||||
"log_sec": "512",
|
||||
"rota": "1",
|
||||
"sched": "deadline",
|
||||
"rq_size": "128",
|
||||
"disc_aln": "0",
|
||||
"disc_gran": "0B",
|
||||
"disc_max": "0B",
|
||||
"disc_zero": "0",
|
||||
"wsame": "32M",
|
||||
"wwn": null,
|
||||
"rand": "1",
|
||||
"pkname": "sda",
|
||||
"hctl": null,
|
||||
"tran": null,
|
||||
"rev": null,
|
||||
"vendor": null
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.lsblk.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -287,10 +287,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/lsblk.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/lsblk.py)
|
||||
|
||||
Version 1.9 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
@@ -1,13 +1,35 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.lsmod"></a>
|
||||
|
||||
# jc.parsers.lsmod
|
||||
jc - JSON CLI output utility lsmod Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `lsmod` command output parser
|
||||
|
||||
specify --lsmod as the first argument if the piped input is coming from lsmod
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ lsmod | jc --lsmod
|
||||
|
||||
'linux'
|
||||
or
|
||||
|
||||
$ jc lsmod
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('lsmod', lsmod_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"module": string,
|
||||
"size": integer,
|
||||
"used": integer,
|
||||
"by": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -103,40 +125,12 @@ Examples:
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.lsmod.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"module": string,
|
||||
"size": integer,
|
||||
"used": integer,
|
||||
"by": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -144,10 +138,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/lsmod.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/lsmod.py)
|
||||
|
||||
Version 1.7 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
@@ -1,13 +1,39 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.lsof"></a>
|
||||
|
||||
# jc.parsers.lsof
|
||||
jc - JSON CLI output utility lsof Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `lsof` command output parser
|
||||
|
||||
specify --lsof as the first argument if the piped input is coming from lsof
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ lsof | jc --lsof
|
||||
|
||||
'linux'
|
||||
or
|
||||
|
||||
$ jc lsof
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('lsof', lsof_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"command": string,
|
||||
"pid": integer,
|
||||
"tid": integer,
|
||||
"user": string,
|
||||
"fd": string,
|
||||
"type": string,
|
||||
"device": string,
|
||||
"size_off": integer,
|
||||
"node": integer,
|
||||
"name": string
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -93,44 +119,12 @@ Examples:
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.lsof.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"command": string,
|
||||
"pid": integer,
|
||||
"tid": integer,
|
||||
"user": string,
|
||||
"fd": string,
|
||||
"type": string,
|
||||
"device": string,
|
||||
"size_off": integer,
|
||||
"node": integer,
|
||||
"name": string
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -138,10 +132,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/lsof.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/lsof.py)
|
||||
|
||||
Version 1.6 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
150
docs/parsers/lspci.md
Normal file
150
docs/parsers/lspci.md
Normal file
@@ -0,0 +1,150 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.lspci"></a>
|
||||
|
||||
# jc.parsers.lspci
|
||||
|
||||
jc - JSON Convert `lspci -mmv` command output parser
|
||||
|
||||
This parser supports the following `lspci` options:
|
||||
- `-mmv`
|
||||
- `-nmmv`
|
||||
- `-nnmmv`
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ lspci -nnmmv | jc --lspci
|
||||
|
||||
or
|
||||
|
||||
$ jc lspci -nnmmv
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('lspci', lspci_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"slot": string,
|
||||
"domain": string,
|
||||
"domain_int": integer,
|
||||
"bus": string,
|
||||
"bus_int": integer,
|
||||
"dev": string,
|
||||
"dev_int": integer,
|
||||
"function": string,
|
||||
"function_int": integer,
|
||||
"class": string,
|
||||
"class_id": string,
|
||||
"class_id_int": integer,
|
||||
"vendor": string,
|
||||
"vendor_id": string,
|
||||
"vendor_id_int": integer,
|
||||
"device": string,
|
||||
"device_id": string,
|
||||
"device_id_int": integer,
|
||||
"svendor": string,
|
||||
"svendor_id": string,
|
||||
"svendor_id_int": integer,
|
||||
"sdevice": string,
|
||||
"sdevice_id": string,
|
||||
"sdevice_id_int": integer,
|
||||
"rev": string,
|
||||
"physlot": string,
|
||||
"physlot_int": integer,
|
||||
"progif": string,
|
||||
"progif_int": integer
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ lspci -nnmmv | jc --lspci -p
|
||||
[
|
||||
{
|
||||
"slot": "ff:02:05.0",
|
||||
"domain": "ff",
|
||||
"domain_int": 255,
|
||||
"bus": "02",
|
||||
"bus_int": 2,
|
||||
"dev": "05",
|
||||
"dev_int": 5,
|
||||
"function": "0",
|
||||
"function_int": 0,
|
||||
"class": "SATA controller",
|
||||
"class_id": "0106",
|
||||
"class_id_int": 262,
|
||||
"vendor": "VMware",
|
||||
"vendor_id": "15ad",
|
||||
"vendor_id_int": 5549,
|
||||
"device": "SATA AHCI controller",
|
||||
"device_id": "07e0",
|
||||
"device_id_int": 2016,
|
||||
"svendor": "VMware",
|
||||
"svendor_id": "15ad",
|
||||
"svendor_id_int": 5549,
|
||||
"sdevice": "SATA AHCI controller",
|
||||
"sdevice_id": "07e0",
|
||||
"sdevice_id_int": 2016,
|
||||
"physlot": "37",
|
||||
"physlot_int": 55,
|
||||
"progif": "01",
|
||||
"progif_int": 1
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
$ lspci -nnmmv | jc --lspci -p -r
|
||||
[
|
||||
{
|
||||
"slot": "ff:02:05.0",
|
||||
"domain": "ff",
|
||||
"bus": "02",
|
||||
"dev": "05",
|
||||
"function": "0",
|
||||
"class": "SATA controller",
|
||||
"class_id": "0106",
|
||||
"vendor": "VMware",
|
||||
"vendor_id": "15ad",
|
||||
"device": "SATA AHCI controller",
|
||||
"device_id": "07e0",
|
||||
"svendor": "VMware",
|
||||
"svendor_id": "15ad",
|
||||
"sdevice": "SATA AHCI controller",
|
||||
"sdevice_id": "07e0",
|
||||
"physlot": "37",
|
||||
"progif": "01"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
<a id="jc.parsers.lspci.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str,
|
||||
raw: bool = False,
|
||||
quiet: bool = False) -> List[JSONDictType]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/lspci.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/lspci.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
335
docs/parsers/lsusb.md
Normal file
335
docs/parsers/lsusb.md
Normal file
@@ -0,0 +1,335 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.lsusb"></a>
|
||||
|
||||
# jc.parsers.lsusb
|
||||
|
||||
jc - JSON Convert `lsusb` command output parser
|
||||
|
||||
Supports the `-v` option or no options.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ lsusb -v | jc --lsusb
|
||||
|
||||
or
|
||||
|
||||
$ jc lsusb -v
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('lsusb', lsusb_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
> Note: <item> object keynames are assigned directly from the lsusb
|
||||
> output. If there are duplicate <item> names in a section, only the
|
||||
> last one is converted.
|
||||
|
||||
[
|
||||
{
|
||||
"bus": string,
|
||||
"device": string,
|
||||
"id": string,
|
||||
"description": string,
|
||||
"device_descriptor": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
},
|
||||
"configuration_descriptor": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
},
|
||||
"interface_association": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
},
|
||||
"interface_descriptors": [
|
||||
{
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
},
|
||||
"cdc_header": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
},
|
||||
"cdc_call_management": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
},
|
||||
"cdc_acm": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
},
|
||||
"cdc_union": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
},
|
||||
"cdc_mbim": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
},
|
||||
"cdc_mbim_extended": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
},
|
||||
"videocontrol_descriptors": [
|
||||
{
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"videostreaming_descriptors": [
|
||||
{
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"endpoint_descriptors": [
|
||||
{
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"hub_descriptor": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string,
|
||||
"attributes": [
|
||||
string,
|
||||
]
|
||||
},
|
||||
"hub_port_status": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"attributes": [
|
||||
string
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"device_qualifier": {
|
||||
"<item>": {
|
||||
"value": string,
|
||||
"description": string
|
||||
}
|
||||
},
|
||||
"device_status": {
|
||||
"value": string,
|
||||
"description": string
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ lsusb -v | jc --lsusb -p
|
||||
[
|
||||
{
|
||||
"bus": "002",
|
||||
"device": "001",
|
||||
"id": "1d6b:0001",
|
||||
"description": "Linux Foundation 1.1 root hub",
|
||||
"device_descriptor": {
|
||||
"bLength": {
|
||||
"value": "18"
|
||||
},
|
||||
"bDescriptorType": {
|
||||
"value": "1"
|
||||
},
|
||||
"bcdUSB": {
|
||||
"value": "1.10"
|
||||
},
|
||||
...
|
||||
"bNumConfigurations": {
|
||||
"value": "1"
|
||||
},
|
||||
"configuration_descriptor": {
|
||||
"bLength": {
|
||||
"value": "9"
|
||||
},
|
||||
...
|
||||
"iConfiguration": {
|
||||
"value": "0"
|
||||
},
|
||||
"bmAttributes": {
|
||||
"value": "0xe0",
|
||||
"attributes": [
|
||||
"Self Powered",
|
||||
"Remote Wakeup"
|
||||
]
|
||||
},
|
||||
"MaxPower": {
|
||||
"description": "0mA"
|
||||
},
|
||||
"interface_descriptors": [
|
||||
{
|
||||
"bLength": {
|
||||
"value": "9"
|
||||
},
|
||||
...
|
||||
"bInterfaceProtocol": {
|
||||
"value": "0",
|
||||
"description": "Full speed (or root) hub"
|
||||
},
|
||||
"iInterface": {
|
||||
"value": "0"
|
||||
},
|
||||
"endpoint_descriptors": [
|
||||
{
|
||||
"bLength": {
|
||||
"value": "7"
|
||||
},
|
||||
...
|
||||
"bmAttributes": {
|
||||
"value": "3",
|
||||
"attributes": [
|
||||
"Transfer Type Interrupt",
|
||||
"Synch Type None",
|
||||
"Usage Type Data"
|
||||
]
|
||||
},
|
||||
"wMaxPacketSize": {
|
||||
"value": "0x0002",
|
||||
"description": "1x 2 bytes"
|
||||
},
|
||||
"bInterval": {
|
||||
"value": "255"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"hub_descriptor": {
|
||||
"bLength": {
|
||||
"value": "9"
|
||||
},
|
||||
...
|
||||
"wHubCharacteristic": {
|
||||
"value": "0x000a",
|
||||
"attributes": [
|
||||
"No power switching (usb 1.0)",
|
||||
"Per-port overcurrent protection"
|
||||
]
|
||||
},
|
||||
...
|
||||
"hub_port_status": {
|
||||
"Port 1": {
|
||||
"value": "0000.0103",
|
||||
"attributes": [
|
||||
"power",
|
||||
"enable",
|
||||
"connect"
|
||||
]
|
||||
},
|
||||
"Port 2": {
|
||||
"value": "0000.0103",
|
||||
"attributes": [
|
||||
"power",
|
||||
"enable",
|
||||
"connect"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"device_status": {
|
||||
"value": "0x0001",
|
||||
"description": "Self Powered"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.lsusb.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/lsusb.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/lsusb.py)
|
||||
|
||||
Version 1.4 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
92
docs/parsers/m3u.md
Normal file
92
docs/parsers/m3u.md
Normal file
@@ -0,0 +1,92 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.m3u"></a>
|
||||
|
||||
# jc.parsers.m3u
|
||||
|
||||
jc - JSON Convert M3U and M3U8 file parser
|
||||
|
||||
This parser will make a best-effort to parse extended field information. If
|
||||
the extended fields cannot be successfully parsed, then an `unparsed_info`
|
||||
field will be added to the object. If not using `--quiet`, then a warning
|
||||
message also will be printed to `STDERR`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat playlist.m3u | jc --m3u
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('m3u', m3u_file_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"runtime": integer,
|
||||
"display": string,
|
||||
"path": string,
|
||||
<extended fields>: string, # [0]
|
||||
"unparsed_info": string, # [1]
|
||||
}
|
||||
]
|
||||
|
||||
[0] Field names are pulled directly from the #EXTINF: line
|
||||
[1] Only added if the extended information cannot be parsed
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat playlist.m3u | jc --m3u -p
|
||||
[
|
||||
{
|
||||
"runtime": 105,
|
||||
"display": "Example artist - Example title",
|
||||
"path": "C:\\Files\\My Music\\Example.mp3"
|
||||
},
|
||||
{
|
||||
"runtime": 321,
|
||||
"display": "Example Artist2 - Example title2",
|
||||
"path": "C:\\Files\\My Music\\Favorites\\Example2.ogg"
|
||||
}
|
||||
]
|
||||
|
||||
$ cat playlist.m3u | jc --m3u -p -r
|
||||
[
|
||||
{
|
||||
"runtime": "105",
|
||||
"display": "Example artist - Example title",
|
||||
"path": "C:\\Files\\My Music\\Example.mp3"
|
||||
},
|
||||
{
|
||||
"runtime": "321",
|
||||
"display": "Example Artist2 - Example title2",
|
||||
"path": "C:\\Files\\My Music\\Favorites\\Example2.ogg"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.m3u.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
||||
|
||||
Source: [`jc/parsers/m3u.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/m3u.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
254
docs/parsers/mdadm.md
Normal file
254
docs/parsers/mdadm.md
Normal file
@@ -0,0 +1,254 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.mdadm"></a>
|
||||
|
||||
# jc.parsers.mdadm
|
||||
|
||||
jc - JSON Convert `mdadm` command output parser
|
||||
|
||||
Supports the `--query` and `--examine` options in `mdadm`.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ mdadm --query --detail /dev/md0 | jc --mdadm
|
||||
|
||||
or
|
||||
|
||||
$ mdadm --examine -E /dev/sdb1 | jc --mdadm
|
||||
|
||||
or
|
||||
|
||||
$ jc mdadm --query --detail /dev/md0
|
||||
|
||||
or
|
||||
|
||||
$ jc mdadm --examine -E /dev/sdb1
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('mdadm', mdadm_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"device": string,
|
||||
"magic": string,
|
||||
"version": string,
|
||||
"feature_map": string,
|
||||
"array_uuid": string,
|
||||
"name": string,
|
||||
"name_val": string,
|
||||
"uuid": string,
|
||||
"uuid_val": string,
|
||||
"homehost": string,
|
||||
"container": string,
|
||||
"container_dev": string,
|
||||
"container_member": integer,
|
||||
"controller_guid": string,
|
||||
"container_guid": string,
|
||||
"seq": string,
|
||||
"redundant_hdr": string,
|
||||
"virtual_disks": integer,
|
||||
"creation_time": string,
|
||||
"creation_time_epoch": integer, # naive timestamp
|
||||
"raid_level": string,
|
||||
"array_size": string,
|
||||
"array_size_num": integer,
|
||||
"used_dev_size": string,
|
||||
"used_dev_size_num": integer,
|
||||
"raid_devices": integer,
|
||||
"avail_dev_size": string,
|
||||
"avail_dev_size_num": integer,
|
||||
"data_offset": integer,
|
||||
"super_offset": integer,
|
||||
"unused_space": string,
|
||||
"unused_space_before": integer,
|
||||
"unused_space_after": integer,
|
||||
"state": string,
|
||||
"state_list": [
|
||||
string
|
||||
],
|
||||
"device_uuid": string,
|
||||
"flags": string,
|
||||
"flag_list": [
|
||||
string
|
||||
],
|
||||
"update_time": string,
|
||||
"update_time_epoch": integer, # naive timestamp
|
||||
"bad_block_log": string,
|
||||
"checksum": string,
|
||||
"checksum_val": string,
|
||||
"checksum_state": string,
|
||||
"events": string,
|
||||
"events_num": integer,
|
||||
"events_maj": integer,
|
||||
"events_min": integer,
|
||||
"chunk_size": string,
|
||||
"chunk_size_num": integer,
|
||||
"device_role": string,
|
||||
"array_state": string,
|
||||
"array_state_list": [
|
||||
string
|
||||
],
|
||||
"member_arrays": string,
|
||||
"member_arrays_list": [
|
||||
string
|
||||
],
|
||||
"consistency_policy": string,
|
||||
"rebuild_status": string,
|
||||
"rebuild_status_percent": integer,
|
||||
"resync_status": string,
|
||||
"resync_status_percent": integer,
|
||||
"check_status": string,
|
||||
"check_status_percent": integer,
|
||||
"total_devices": integer,
|
||||
"preferred_minor": integer,
|
||||
"persistence": string,
|
||||
"active_devices": integer,
|
||||
"working_devices": integer,
|
||||
"failed_devices": integer,
|
||||
"spare_devices": integer,
|
||||
"physical_disks": integer,
|
||||
"device_table": [
|
||||
{
|
||||
"number": integer/null,
|
||||
"major": integer/null,
|
||||
"minor": integer/null,
|
||||
"state": [
|
||||
string
|
||||
],
|
||||
"device": string,
|
||||
"raid_device": integer/null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Any fields unspecified above will be string type.
|
||||
|
||||
Examples:
|
||||
|
||||
$ mdadm --query --detail /dev/md0 | jc --mdadm -p
|
||||
{
|
||||
"device": "/dev/md0",
|
||||
"version": "1.1",
|
||||
"creation_time": "Tue Apr 13 23:22:16 2010",
|
||||
"raid_level": "raid1",
|
||||
"array_size": "5860520828 (5.46 TiB 6.00 TB)",
|
||||
"used_dev_size": "5860520828 (5.46 TiB 6.00 TB)",
|
||||
"raid_devices": 2,
|
||||
"total_devices": 2,
|
||||
"persistence": "Superblock is persistent",
|
||||
"intent_bitmap": "Internal",
|
||||
"update_time": "Tue Jul 26 20:16:31 2022",
|
||||
"state": "clean",
|
||||
"active_devices": 2,
|
||||
"working_devices": 2,
|
||||
"failed_devices": 0,
|
||||
"spare_devices": 0,
|
||||
"consistency_policy": "bitmap",
|
||||
"name": "virttest:0",
|
||||
"uuid": "85c5b164:d58a5ada:14f5fe07:d642e843",
|
||||
"events": 2193679,
|
||||
"device_table": [
|
||||
{
|
||||
"number": 3,
|
||||
"major": 8,
|
||||
"minor": 17,
|
||||
"state": [
|
||||
"active",
|
||||
"sync"
|
||||
],
|
||||
"device": "/dev/sdb1",
|
||||
"raid_device": 0
|
||||
},
|
||||
{
|
||||
"number": 2,
|
||||
"major": 8,
|
||||
"minor": 33,
|
||||
"state": [
|
||||
"active",
|
||||
"sync"
|
||||
],
|
||||
"device": "/dev/sdc1",
|
||||
"raid_device": 1
|
||||
}
|
||||
],
|
||||
"array_size_num": 5860520828,
|
||||
"used_dev_size_num": 5860520828,
|
||||
"name_val": "virttest:0",
|
||||
"uuid_val": "85c5b164:d58a5ada:14f5fe07:d642e843",
|
||||
"state_list": [
|
||||
"clean"
|
||||
],
|
||||
"creation_time_epoch": 1271226136,
|
||||
"update_time_epoch": 1658891791
|
||||
}
|
||||
|
||||
$ mdadm --query --detail /dev/md0 | jc --mdadm -p -r
|
||||
{
|
||||
"device": "/dev/md0",
|
||||
"version": "1.1",
|
||||
"creation_time": "Tue Apr 13 23:22:16 2010",
|
||||
"raid_level": "raid1",
|
||||
"array_size": "5860520828 (5.46 TiB 6.00 TB)",
|
||||
"used_dev_size": "5860520828 (5.46 TiB 6.00 TB)",
|
||||
"raid_devices": "2",
|
||||
"total_devices": "2",
|
||||
"persistence": "Superblock is persistent",
|
||||
"intent_bitmap": "Internal",
|
||||
"update_time": "Tue Jul 26 20:16:31 2022",
|
||||
"state": "clean",
|
||||
"active_devices": "2",
|
||||
"working_devices": "2",
|
||||
"failed_devices": "0",
|
||||
"spare_devices": "0",
|
||||
"consistency_policy": "bitmap",
|
||||
"name": "virttest:0",
|
||||
"uuid": "85c5b164:d58a5ada:14f5fe07:d642e843",
|
||||
"events": "2193679",
|
||||
"device_table": [
|
||||
{
|
||||
"number": "3",
|
||||
"major": "8",
|
||||
"minor": "17",
|
||||
"state": "active sync",
|
||||
"device": "/dev/sdb1",
|
||||
"raid_device": "0"
|
||||
},
|
||||
{
|
||||
"number": "2",
|
||||
"major": "8",
|
||||
"minor": "33",
|
||||
"state": "active sync",
|
||||
"device": "/dev/sdc1",
|
||||
"raid_device": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
<a id="jc.parsers.mdadm.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> Dict
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
Dictionary. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/mdadm.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/mdadm.py)
|
||||
|
||||
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,13 +1,35 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.mount"></a>
|
||||
|
||||
# jc.parsers.mount
|
||||
jc - JSON CLI output utility mount Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `mount` command output parser
|
||||
|
||||
specify --mount as the first argument if the piped input is coming from mount
|
||||
Usage (cli):
|
||||
|
||||
Compatibility:
|
||||
$ mount | jc --mount
|
||||
|
||||
'linux', 'darwin'
|
||||
or
|
||||
|
||||
$ jc mount
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('mount', mount_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filesystem": string,
|
||||
"mount_point": string,
|
||||
"type": string,
|
||||
"options": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -17,7 +39,7 @@ Example:
|
||||
"filesystem": "sysfs",
|
||||
"mount_point": "/sys",
|
||||
"type": "sysfs",
|
||||
"access": [
|
||||
"options": [
|
||||
"rw",
|
||||
"nosuid",
|
||||
"nodev",
|
||||
@@ -29,7 +51,7 @@ Example:
|
||||
"filesystem": "proc",
|
||||
"mount_point": "/proc",
|
||||
"type": "proc",
|
||||
"access": [
|
||||
"options": [
|
||||
"rw",
|
||||
"nosuid",
|
||||
"nodev",
|
||||
@@ -41,7 +63,7 @@ Example:
|
||||
"filesystem": "udev",
|
||||
"mount_point": "/dev",
|
||||
"type": "devtmpfs",
|
||||
"access": [
|
||||
"options": [
|
||||
"rw",
|
||||
"nosuid",
|
||||
"relatime",
|
||||
@@ -53,40 +75,12 @@ Example:
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
<a id="jc.parsers.mount.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"filesystem": string,
|
||||
"mount_point": string,
|
||||
"type": string,
|
||||
"access": [
|
||||
string
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -94,10 +88,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, freebsd, aix
|
||||
|
||||
Source: [`jc/parsers/mount.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/mount.py)
|
||||
|
||||
Version 1.9 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
142
docs/parsers/mpstat.md
Normal file
142
docs/parsers/mpstat.md
Normal file
@@ -0,0 +1,142 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.mpstat"></a>
|
||||
|
||||
# jc.parsers.mpstat
|
||||
|
||||
jc - JSON Convert `mpstat` command output parser
|
||||
|
||||
> Note: Latest versions of `mpstat` support JSON output (v11.5.1+)
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ mpstat | jc --mpstat
|
||||
|
||||
or
|
||||
|
||||
$ jc mpstat
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('mpstat', mpstat_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"type": string,
|
||||
"time": string,
|
||||
"cpu": string,
|
||||
"node": string,
|
||||
"average": boolean,
|
||||
"percent_usr": float,
|
||||
"percent_nice": float,
|
||||
"percent_sys": float,
|
||||
"percent_iowait": float,
|
||||
"percent_irq": float,
|
||||
"percent_soft": float,
|
||||
"percent_steal": float,
|
||||
"percent_guest": float,
|
||||
"percent_gnice": float,
|
||||
"percent_idle": float,
|
||||
"intr_s": float,
|
||||
"<x>_s": float, # <x> is an integer
|
||||
"nmi_s": float,
|
||||
"loc_s": float,
|
||||
"spu_s": float,
|
||||
"pmi_s": float,
|
||||
"iwi_s": float,
|
||||
"rtr_s": float,
|
||||
"res_s": float,
|
||||
"cal_s": float,
|
||||
"tlb_s": float,
|
||||
"trm_s": float,
|
||||
"thr_s": float,
|
||||
"dfr_s": float,
|
||||
"mce_s": float,
|
||||
"mcp_s": float,
|
||||
"err_s": float,
|
||||
"mis_s": float,
|
||||
"pin_s": float,
|
||||
"npi_s": float,
|
||||
"piw_s": float,
|
||||
"hi_s": float,
|
||||
"timer_s": float,
|
||||
"net_tx_s": float,
|
||||
"net_rx_s": float,
|
||||
"block_s": float,
|
||||
"irq_poll_s": float,
|
||||
"block_iopoll_s": float,
|
||||
"tasklet_s": float,
|
||||
"sched_s": float,
|
||||
"hrtimer_s": float,
|
||||
"rcu_s": float
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ mpstat | jc --mpstat -p
|
||||
[
|
||||
{
|
||||
"cpu": "all",
|
||||
"percent_usr": 12.94,
|
||||
"percent_nice": 0.0,
|
||||
"percent_sys": 26.42,
|
||||
"percent_iowait": 0.43,
|
||||
"percent_irq": 0.0,
|
||||
"percent_soft": 0.16,
|
||||
"percent_steal": 0.0,
|
||||
"percent_guest": 0.0,
|
||||
"percent_gnice": 0.0,
|
||||
"percent_idle": 60.05,
|
||||
"type": "cpu",
|
||||
"time": "01:58:14 PM"
|
||||
}
|
||||
]
|
||||
|
||||
$ mpstat | jc --mpstat -p -r
|
||||
[
|
||||
{
|
||||
"cpu": "all",
|
||||
"percent_usr": "12.94",
|
||||
"percent_nice": "0.00",
|
||||
"percent_sys": "26.42",
|
||||
"percent_iowait": "0.43",
|
||||
"percent_irq": "0.00",
|
||||
"percent_soft": "0.16",
|
||||
"percent_steal": "0.00",
|
||||
"percent_guest": "0.00",
|
||||
"percent_gnice": "0.00",
|
||||
"percent_idle": "60.05",
|
||||
"type": "cpu",
|
||||
"time": "01:58:14 PM"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.mpstat.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/mpstat.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/mpstat.py)
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
130
docs/parsers/mpstat_s.md
Normal file
130
docs/parsers/mpstat_s.md
Normal file
@@ -0,0 +1,130 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.mpstat_s"></a>
|
||||
|
||||
# jc.parsers.mpstat\_s
|
||||
|
||||
jc - JSON Convert `mpstat` command output streaming parser
|
||||
|
||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||
> Dictionaries (module)
|
||||
|
||||
> Note: Latest versions of `mpstat` support JSON output (v11.5.1+)
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ mpstat | jc --mpstat-s
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
|
||||
result = jc.parse('mpstat_s', mpstat_command_output.splitlines())
|
||||
for item in result:
|
||||
# do something
|
||||
|
||||
Schema:
|
||||
|
||||
{
|
||||
"type": string,
|
||||
"time": string,
|
||||
"cpu": string,
|
||||
"node": string,
|
||||
"average": boolean,
|
||||
"percent_usr": float,
|
||||
"percent_nice": float,
|
||||
"percent_sys": float,
|
||||
"percent_iowait": float,
|
||||
"percent_irq": float,
|
||||
"percent_soft": float,
|
||||
"percent_steal": float,
|
||||
"percent_guest": float,
|
||||
"percent_gnice": float,
|
||||
"percent_idle": float,
|
||||
"intr_s": float,
|
||||
"<x>_s": float, # <x> is an integer
|
||||
"nmi_s": float,
|
||||
"loc_s": float,
|
||||
"spu_s": float,
|
||||
"pmi_s": float,
|
||||
"iwi_s": float,
|
||||
"rtr_s": float,
|
||||
"res_s": float,
|
||||
"cal_s": float,
|
||||
"tlb_s": float,
|
||||
"trm_s": float,
|
||||
"thr_s": float,
|
||||
"dfr_s": float,
|
||||
"mce_s": float,
|
||||
"mcp_s": float,
|
||||
"err_s": float,
|
||||
"mis_s": float,
|
||||
"pin_s": float,
|
||||
"npi_s": float,
|
||||
"piw_s": float,
|
||||
"hi_s": float,
|
||||
"timer_s": float,
|
||||
"net_tx_s": float,
|
||||
"net_rx_s": float,
|
||||
"block_s": float,
|
||||
"irq_poll_s": float,
|
||||
"block_iopoll_s": float,
|
||||
"tasklet_s": float,
|
||||
"sched_s": float,
|
||||
"hrtimer_s": float,
|
||||
"rcu_s": float,
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
"success": boolean, # false if error parsing
|
||||
"error": string, # exists if "success" is false
|
||||
"line": string # exists if "success" is false
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ mpstat -A | jc --mpstat-s
|
||||
{"cpu":"all","percent_usr":0.22,"percent_nice":0.0,"percent_sys":...}
|
||||
{"cpu":"0","percent_usr":0.22,"percent_nice":0.0,"percent_sys":0....}
|
||||
{"cpu":"all","intr_s":37.61,"type":"interrupts","time":"03:15:06 PM"}
|
||||
...
|
||||
|
||||
$ mpstat -A | jc --mpstat-s -r
|
||||
{"cpu":"all","percent_usr":"0.22","percent_nice":"0.00","percent_...}
|
||||
{"cpu":"0","percent_usr":"0.22","percent_nice":"0.00","percent_sy...}
|
||||
{"cpu":"all","intr_s":"37.61","type":"interrupts","time":"03:15:06 PM"}
|
||||
...
|
||||
|
||||
<a id="jc.parsers.mpstat_s.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
@add_jc_meta
|
||||
def parse(data: Iterable[str],
|
||||
raw: bool = False,
|
||||
quiet: bool = False,
|
||||
ignore_exceptions: bool = False) -> Union[Iterable[Dict], tuple]
|
||||
```
|
||||
|
||||
Main text parsing generator function. Returns an iterable object.
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (iterable) line-based text data to parse
|
||||
(e.g. sys.stdin or str.splitlines())
|
||||
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
ignore_exceptions: (boolean) ignore parsing exceptions if True
|
||||
|
||||
Returns:
|
||||
|
||||
Iterable of Dictionaries
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux
|
||||
|
||||
Source: [`jc/parsers/mpstat_s.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/mpstat_s.py)
|
||||
|
||||
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
@@ -1,17 +1,132 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
<a id="jc.parsers.netstat"></a>
|
||||
|
||||
# jc.parsers.netstat
|
||||
jc - JSON CLI output utility netstat Parser
|
||||
|
||||
Usage:
|
||||
jc - JSON Convert `netstat` command output parser
|
||||
|
||||
Specify --netstat as the first argument if the piped input is coming from netstat
|
||||
Caveats:
|
||||
- Use of multiple `l` options is not supported on OSX (e.g. `netstat -rlll`)
|
||||
- Use of the `A` option is not supported on OSX when using the `r` option
|
||||
(e.g. `netstat -rA`)
|
||||
|
||||
Compatibility:
|
||||
Usage (cli):
|
||||
|
||||
'linux'
|
||||
$ netstat | jc --netstat
|
||||
|
||||
or
|
||||
|
||||
$ jc netstat
|
||||
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('netstat', netstat_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"proto": string,
|
||||
"recv_q": integer,
|
||||
"send_q": integer,
|
||||
"transport_protocol" string,
|
||||
"network_protocol": string,
|
||||
"local_address": string,
|
||||
"local_port": string,
|
||||
"local_port_num": integer,
|
||||
"foreign_address": string,
|
||||
"foreign_port": string,
|
||||
"foreign_port_num": integer,
|
||||
"state": string,
|
||||
"program_name": string,
|
||||
"pid": integer,
|
||||
"user": string,
|
||||
"security_context": string,
|
||||
"refcnt": integer,
|
||||
"flags": string,
|
||||
"type": string,
|
||||
"inode": integer,
|
||||
"path": string,
|
||||
"kind": string,
|
||||
"address": string,
|
||||
"unix_inode": string,
|
||||
"conn": string,
|
||||
"refs": string,
|
||||
"nextref": string,
|
||||
"name": string,
|
||||
"unit": integer,
|
||||
"vendor": integer,
|
||||
"class": integer,
|
||||
"subcla": integer,
|
||||
"unix_flags": integer,
|
||||
"pcbcount": integer,
|
||||
"rcvbuf": integer,
|
||||
"sndbuf": integer,
|
||||
"rxbytes": integer,
|
||||
"txbytes": integer,
|
||||
"destination": string,
|
||||
"gateway": string,
|
||||
"route_flags": string,
|
||||
"route_flags_pretty": [
|
||||
string,
|
||||
]
|
||||
"route_refs": integer,
|
||||
"use": integer,
|
||||
"mtu": integer,
|
||||
"expire": string,
|
||||
"genmask": string,
|
||||
"mss": integer,
|
||||
"window": integer,
|
||||
"irtt": integer,
|
||||
"iface": string,
|
||||
"metric": integer,
|
||||
"network": string,
|
||||
"address": string,
|
||||
"ipkts": integer, # - = null
|
||||
"ierrs": integer, # - = null
|
||||
"idrop": integer, # - = null
|
||||
"opkts": integer, # - = null
|
||||
"oerrs": integer, # - = null
|
||||
"coll": integer, # - = null
|
||||
"rx_ok": integer,
|
||||
"rx_err": integer,
|
||||
"rx_drp": integer,
|
||||
"rx_ovr": integer,
|
||||
"tx_ok": integer,
|
||||
"tx_err": integer,
|
||||
"tx_drp": integer,
|
||||
"tx_ovr": integer,
|
||||
"flg": string,
|
||||
"ibytes": integer,
|
||||
"obytes": integer,
|
||||
"r_mbuf": integer,
|
||||
"s_mbuf": integer,
|
||||
"r_clus": integer,
|
||||
"s_clus": integer,
|
||||
"r_hiwa": integer,
|
||||
"s_hiwa": integer,
|
||||
"r_lowa": integer,
|
||||
"s_lowa": integer,
|
||||
"r_bcnt": integer,
|
||||
"s_bcnt": integer,
|
||||
"r_bmax": integer,
|
||||
"s_bmax": integer,
|
||||
"rexmit": integer,
|
||||
"ooorcv": integer,
|
||||
"0_win": integer,
|
||||
"rexmt": float,
|
||||
"persist": float,
|
||||
"keep": float,
|
||||
"2msl": float,
|
||||
"delack": float,
|
||||
"rcvtime": float,
|
||||
}
|
||||
]
|
||||
|
||||
Examples:
|
||||
|
||||
$ sudo netstat -apee | jc --netstat -p
|
||||
# netstat -apee | jc --netstat -p
|
||||
[
|
||||
{
|
||||
"proto": "tcp",
|
||||
@@ -161,204 +276,91 @@ Examples:
|
||||
...
|
||||
]
|
||||
|
||||
$ sudo netstat -apee | jc --netstat -p -r
|
||||
$ netstat -r | jc --netstat -p
|
||||
[
|
||||
{
|
||||
"proto": "tcp",
|
||||
"recv_q": "0",
|
||||
"send_q": "0",
|
||||
"local_address": "localhost",
|
||||
"foreign_address": "0.0.0.0",
|
||||
"state": "LISTEN",
|
||||
"user": "systemd-resolve",
|
||||
"inode": "26958",
|
||||
"program_name": "systemd-resolve",
|
||||
"kind": "network",
|
||||
"pid": "887",
|
||||
"local_port": "domain",
|
||||
"foreign_port": "*",
|
||||
"transport_protocol": "tcp",
|
||||
"network_protocol": "ipv4"
|
||||
"destination": "default",
|
||||
"gateway": "gateway",
|
||||
"genmask": "0.0.0.0",
|
||||
"route_flags": "UG",
|
||||
"mss": 0,
|
||||
"window": 0,
|
||||
"irtt": 0,
|
||||
"iface": "ens33",
|
||||
"kind": "route",
|
||||
"route_flags_pretty": [
|
||||
"UP",
|
||||
"GATEWAY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"proto": "tcp",
|
||||
"recv_q": "0",
|
||||
"send_q": "0",
|
||||
"local_address": "0.0.0.0",
|
||||
"foreign_address": "0.0.0.0",
|
||||
"state": "LISTEN",
|
||||
"user": "root",
|
||||
"inode": "30499",
|
||||
"program_name": "sshd",
|
||||
"kind": "network",
|
||||
"pid": "1186",
|
||||
"local_port": "ssh",
|
||||
"foreign_port": "*",
|
||||
"transport_protocol": "tcp",
|
||||
"network_protocol": "ipv4"
|
||||
"destination": "172.17.0.0",
|
||||
"gateway": "0.0.0.0",
|
||||
"genmask": "255.255.0.0",
|
||||
"route_flags": "U",
|
||||
"mss": 0,
|
||||
"window": 0,
|
||||
"irtt": 0,
|
||||
"iface": "docker0",
|
||||
"kind": "route",
|
||||
"route_flags_pretty": [
|
||||
"UP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"proto": "tcp",
|
||||
"recv_q": "0",
|
||||
"send_q": "0",
|
||||
"local_address": "localhost",
|
||||
"foreign_address": "localhost",
|
||||
"state": "ESTABLISHED",
|
||||
"user": "root",
|
||||
"inode": "46829",
|
||||
"program_name": "sshd: root",
|
||||
"kind": "network",
|
||||
"pid": "2242",
|
||||
"local_port": "ssh",
|
||||
"foreign_port": "52186",
|
||||
"transport_protocol": "tcp",
|
||||
"network_protocol": "ipv4"
|
||||
},
|
||||
{
|
||||
"proto": "tcp",
|
||||
"recv_q": "0",
|
||||
"send_q": "0",
|
||||
"local_address": "localhost",
|
||||
"foreign_address": "localhost",
|
||||
"state": "ESTABLISHED",
|
||||
"user": "root",
|
||||
"inode": "46828",
|
||||
"program_name": "ssh",
|
||||
"kind": "network",
|
||||
"pid": "2241",
|
||||
"local_port": "52186",
|
||||
"foreign_port": "ssh",
|
||||
"transport_protocol": "tcp",
|
||||
"network_protocol": "ipv4"
|
||||
},
|
||||
{
|
||||
"proto": "tcp6",
|
||||
"recv_q": "0",
|
||||
"send_q": "0",
|
||||
"local_address": "[::]",
|
||||
"foreign_address": "[::]",
|
||||
"state": "LISTEN",
|
||||
"user": "root",
|
||||
"inode": "30510",
|
||||
"program_name": "sshd",
|
||||
"kind": "network",
|
||||
"pid": "1186",
|
||||
"local_port": "ssh",
|
||||
"foreign_port": "*",
|
||||
"transport_protocol": "tcp",
|
||||
"network_protocol": "ipv6"
|
||||
},
|
||||
{
|
||||
"proto": "udp",
|
||||
"recv_q": "0",
|
||||
"send_q": "0",
|
||||
"local_address": "localhost",
|
||||
"foreign_address": "0.0.0.0",
|
||||
"state": null,
|
||||
"user": "systemd-resolve",
|
||||
"inode": "26957",
|
||||
"program_name": "systemd-resolve",
|
||||
"kind": "network",
|
||||
"pid": "887",
|
||||
"local_port": "domain",
|
||||
"foreign_port": "*",
|
||||
"transport_protocol": "udp",
|
||||
"network_protocol": "ipv4"
|
||||
},
|
||||
{
|
||||
"proto": "raw6",
|
||||
"recv_q": "0",
|
||||
"send_q": "0",
|
||||
"local_address": "[::]",
|
||||
"foreign_address": "[::]",
|
||||
"state": "7",
|
||||
"user": "systemd-network",
|
||||
"inode": "27001",
|
||||
"program_name": "systemd-network",
|
||||
"kind": "network",
|
||||
"pid": "867",
|
||||
"local_port": "ipv6-icmp",
|
||||
"foreign_port": "*",
|
||||
"transport_protocol": null,
|
||||
"network_protocol": "ipv6"
|
||||
},
|
||||
{
|
||||
"proto": "unix",
|
||||
"refcnt": "2",
|
||||
"flags": null,
|
||||
"type": "DGRAM",
|
||||
"state": null,
|
||||
"inode": "33322",
|
||||
"program_name": "systemd",
|
||||
"path": "/run/user/1000/systemd/notify",
|
||||
"kind": "socket",
|
||||
"pid": " 1607"
|
||||
},
|
||||
{
|
||||
"proto": "unix",
|
||||
"refcnt": "2",
|
||||
"flags": "ACC",
|
||||
"type": "SEQPACKET",
|
||||
"state": "LISTENING",
|
||||
"inode": "20835",
|
||||
"program_name": "init",
|
||||
"path": "/run/udev/control",
|
||||
"kind": "socket",
|
||||
"pid": " 1"
|
||||
},
|
||||
...
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"proto": string,
|
||||
"recv_q": integer,
|
||||
"send_q": integer,
|
||||
"transport_protocol" string,
|
||||
"network_protocol": string,
|
||||
"local_address": string,
|
||||
"local_port": string,
|
||||
"local_port_num": integer,
|
||||
"foreign_address": string,
|
||||
"foreign_port": string,
|
||||
"foreign_port_num": integer,
|
||||
"state": string,
|
||||
"program_name": string,
|
||||
"pid": integer,
|
||||
"user": string,
|
||||
"security_context": string,
|
||||
"refcnt": integer,
|
||||
"flags": string,
|
||||
"type": string,
|
||||
"inode": integer,
|
||||
"path": string,
|
||||
"kind": string
|
||||
"destination": "192.168.71.0",
|
||||
"gateway": "0.0.0.0",
|
||||
"genmask": "255.255.255.0",
|
||||
"route_flags": "U",
|
||||
"mss": 0,
|
||||
"window": 0,
|
||||
"irtt": 0,
|
||||
"iface": "ens33",
|
||||
"kind": "route",
|
||||
"route_flags_pretty": [
|
||||
"UP"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
## parse
|
||||
$ netstat -i | jc --netstat -p
|
||||
[
|
||||
{
|
||||
"iface": "ens33",
|
||||
"mtu": 1500,
|
||||
"rx_ok": 476,
|
||||
"rx_err": 0,
|
||||
"rx_drp": 0,
|
||||
"rx_ovr": 0,
|
||||
"tx_ok": 312,
|
||||
"tx_err": 0,
|
||||
"tx_drp": 0,
|
||||
"tx_ovr": 0,
|
||||
"flg": "BMRU",
|
||||
"kind": "interface"
|
||||
},
|
||||
{
|
||||
"iface": "lo",
|
||||
"mtu": 65536,
|
||||
"rx_ok": 0,
|
||||
"rx_err": 0,
|
||||
"rx_drp": 0,
|
||||
"rx_ovr": 0,
|
||||
"tx_ok": 0,
|
||||
"tx_err": 0,
|
||||
"tx_drp": 0,
|
||||
"tx_ovr": 0,
|
||||
"flg": "LRU",
|
||||
"kind": "interface"
|
||||
}
|
||||
]
|
||||
|
||||
<a id="jc.parsers.netstat.parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
def parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
@@ -366,10 +368,16 @@ Main text parsing function
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
raw: (boolean) unprocessed output if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
List of dictionaries. Raw or processed structured data.
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
### Parser Information
|
||||
Compatibility: linux, darwin, freebsd, win32
|
||||
|
||||
Source: [`jc/parsers/netstat.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/netstat.py)
|
||||
|
||||
Version 1.15 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user