Skip to content

pschmitt/ldifj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ldifj

This Python script parses LDAP Data Interchange Format (LDIF) files, and outputs JSON!

🛠 Installation

Install the required modules with pip(x):

pip install ldifj
# the cool kids use pipx nowadays:
pipx install ldifj

🚀 Usage

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:

ldif example.ldif

ldif also accepts input from a pipe:

cat example.ldif | ldif

If you want to include the metadata in the returned JSON object:

ldif --metadata example.ldif

📜 License

GNU General Public License v3 (GPL-3).