2022-01-02 11:00:52 -08:00
|
|
|
[Home](https://kellyjonbrazil.github.io/jc/)
|
2022-01-25 17:07:47 -08:00
|
|
|
<a id="jc.parsers.jar_manifest"></a>
|
|
|
|
|
|
|
|
# jc.parsers.jar\_manifest
|
2022-01-02 11:00:52 -08:00
|
|
|
|
2022-08-15 13:51:48 -07:00
|
|
|
jc - JSON Convert Java `MANIFEST.MF` file parser
|
2022-01-02 11:00:52 -08:00
|
|
|
|
|
|
|
Usage (cli):
|
|
|
|
|
2022-01-25 18:03:34 -08:00
|
|
|
$ cat MANIFEST.MF | jc --jar-manifest
|
2022-01-02 11:00:52 -08:00
|
|
|
|
|
|
|
Usage (module):
|
|
|
|
|
2022-01-25 18:03:34 -08:00
|
|
|
import jc
|
|
|
|
result = jc.parse('jar_manifest', jar_manifest_file_output)
|
2022-01-18 15:38:03 -08:00
|
|
|
|
2022-01-02 11:00:52 -08:00
|
|
|
Schema:
|
|
|
|
|
2022-01-25 18:03:34 -08:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"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",
|
|
|
|
...
|
|
|
|
}
|
|
|
|
...
|
|
|
|
]
|
2022-01-25 17:07:47 -08:00
|
|
|
|
|
|
|
<a id="jc.parsers.jar_manifest.parse"></a>
|
|
|
|
|
2022-03-05 12:15:14 -08:00
|
|
|
### parse
|
2022-01-25 17:07:47 -08:00
|
|
|
|
2022-01-02 11:00:52 -08:00
|
|
|
```python
|
2022-01-25 17:07:47 -08:00
|
|
|
def parse(data, raw=False, quiet=False)
|
2022-01-02 11:00:52 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
Main text parsing function
|
|
|
|
|
2022-01-25 18:03:34 -08:00
|
|
|
Parameters:
|
2022-01-02 11:00:52 -08:00
|
|
|
|
2022-01-25 18:03:34 -08:00
|
|
|
data: (string) text data to parse
|
|
|
|
raw: (boolean) unprocessed output if True
|
|
|
|
quiet: (boolean) suppress warning messages if True
|
2022-01-02 11:00:52 -08:00
|
|
|
|
2022-01-25 18:03:34 -08:00
|
|
|
Returns:
|
2022-01-02 11:00:52 -08:00
|
|
|
|
2022-01-25 18:03:34 -08:00
|
|
|
List of Dictionaries. Raw or processed structured data.
|
2022-01-02 11:00:52 -08:00
|
|
|
|
2022-01-25 19:18:54 -08:00
|
|
|
### Parser Information
|
2022-01-02 11:00:52 -08:00
|
|
|
Compatibility: linux, darwin, cygwin, win32, aix, freebsd
|
|
|
|
|
|
|
|
Version 0.01 by Matt J (https://github.com/listuser)
|