# Class: com.pnfsoftware.jeb.core.ScriptMetadataParser

Parser and generator of [ScriptMetadata](ScriptMetadata) objects. 

 JEB script \(client scripts, plugin scripts\) may start with metadata in comments to provide valuable information to the client or back\-end without requiring full parsing and compilation of the script. The metadata is provided at the top of the source file as inline comments, before any code appears. The inline comment format is `?key=value` where key is the metadata attribute name. 

 Example, in a Python script:  

```

 #?description=A description string
 #?shortcut=CTRL+SHIFT+K
 
```
 

 Example, in a Java script:  

```

 //?description=A description string
 //?shortcut=CTRL+SHIFT+K
 
```

## Constructor: ScriptMetadataParser


## Static Method: extract
- parameter: `file`, type: `java.io.File`
- return type: `com.pnfsoftware.jeb.core.ScriptMetadata`

Description: Extract script metadata using the default comment prefix inferred from the file extension.
parameter: file: script source file
return: extracted metadata
throws: on read error

## Static Method: extract
- parameter: `file`, type: `java.io.File`
- parameter: `commentPrefix`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.ScriptMetadata`

Description: Extract script metadata from the leading comment block of a source file.
parameter: file: script source file
parameter: commentPrefix: comment prefix to use, or null to infer it from the file extension
return: extracted metadata
throws: on read error

