https://github.com/pschmitt/ldifj
Convert LDIF to JSON
https://github.com/pschmitt/ldifj
json ldap ldif
Last synced: about 2 months ago
JSON representation
Convert LDIF to JSON
- Host: GitHub
- URL: https://github.com/pschmitt/ldifj
- Owner: pschmitt
- License: gpl-3.0
- Created: 2023-11-10T17:00:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T09:02:05.000Z (over 2 years ago)
- Last Synced: 2025-01-17T18:00:06.257Z (over 1 year ago)
- Topics: json, ldap, ldif
- Language: Python
- Homepage: http://pypi.org/p/ldifj
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ldifj
This Python script parses LDAP Data Interchange Format (LDIF) files,
and outputs **JSON**!
## 🛠 Installation
Install the required modules with pip(x):
```shell
pip install ldifj
# the cool kids use pipx nowadays:
pipx install ldifj
```
## 🚀 Usage
```console
usage: ldif [-h] [--metadata] [FILE]
positional arguments:
FILE LDIF file to parse, set to '-' to read from stdin
optional arguments:
-h, --help show this help message and exit
--metadata, -m
Include metadata
```
## 📝 Examples
To parse an LDIF file, run:
```shell
ldif example.ldif
```
`ldif` also accepts input from a pipe:
```shell
cat example.ldif | ldif
```
If you want to include the metadata in the returned JSON object:
```bash
ldif --metadata example.ldif
```
## 📜 License
[GNU General Public License v3 (GPL-3)](./LICENSE).