1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-23 00:29:59 +02:00

update docs

This commit is contained in:
Kelly Brazil
2021-04-08 15:52:49 -07:00
parent 4290a3cbd1
commit b8b8dfead4
61 changed files with 1500 additions and 1847 deletions

View File

@ -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