mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-23 00:29:59 +02:00
update docs
This commit is contained in:
@ -19,6 +19,22 @@ Usage (module):
|
||||
import jc.parsers.last
|
||||
result = jc.parsers.last.parse(last_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"user": string,
|
||||
"tty": string,
|
||||
"hostname": string,
|
||||
"login": string,
|
||||
"logout": string,
|
||||
"duration": string,
|
||||
"login_epoch": integer, # (naive) available with last -F option
|
||||
"logout_epoch": integer, # (naive) available with last -F option
|
||||
"duration_seconds": integer # available with last -F option
|
||||
}
|
||||
]
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'aix', 'freebsd'
|
||||
@ -93,37 +109,7 @@ Examples:
|
||||
```python
|
||||
info()
|
||||
```
|
||||
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (List of Dictionaries) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"user": string,
|
||||
"tty": string,
|
||||
"hostname": string,
|
||||
"login": string,
|
||||
"logout": string,
|
||||
"duration": string,
|
||||
"login_epoch": integer, # (naive) available with last -F option
|
||||
"logout_epoch": integer, # (naive) available with last -F option
|
||||
"duration_seconds": integer # available with last -F option
|
||||
}
|
||||
]
|
||||
|
||||
Provides parser metadata (version, author, etc.)
|
||||
|
||||
## parse
|
||||
```python
|
||||
|
Reference in New Issue
Block a user