Skip to content

Commit

Permalink
New parameter process_url_scheme for LDIFParser.__init__() specifies …
Browse files Browse the repository at this point in the history
…which

URL schemes are processed in URL input.
  • Loading branch information
stroeder committed Dec 12, 2001
1 parent 4e58d8d commit 6a6b43f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Demo/Lib/ldif/ldifcopy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""
ldifcopy - reads LDIF from stdin, retrieve values by URL and
write resulting LDIF to stdout
Written by Michael Stroeder <michael@stroeder.com>
$Id: ldifcopy.py,v 1.2 2001/12/12 22:04:49 stroeder Exp $
This example translates the naming context of data read from
input, sanitizes some attributes, maps/removes object classes,
maps/removes attributes., etc. It's far from being complete though.
Python compability note:
Tested on Python 2.0+, should run on Python 1.5.x.
"""

import sys,ldif

infile = sys.stdin
outfile = sys.stdout

ldif_collector = ldif.LDIFCopy(
infile,
outfile,
process_url_schemes=['file','ftp','http']
)
ldif_collector.parse()

0 comments on commit 6a6b43f

Please sign in to comment.