Thanks, Benedikt! Andrea
Output possibly changes while arguments remain unchanged in each run
Fixed in 1.2: https://sourceforge.net/projects/csv2ldif2/files/csv2ldif2-1.2.tar.gz/download
Version 1.2
Make output sorting stable
Benedikt, in my view giving a specific order to the components in the output shouldn't be required at all. Though I still wonder why there's no fixed and predictable "default order", I mean as a matter of fact the order of the components in the output changes possibly at each run randomly. I can believe no component is missing anyway, though this random behavior suggests the idea of something out of control, and mysterious at the same time - at least for me, since likely I don't know yet all that...
Hi, investigated; reason is that the tool saves its data in a perl hash. And they are, by definition, unordered. So, if this is really important, it might be an option to add the data into a hash using systematic keys (i.e. add a entry counter number to the front of the key) and sort the entries by that. That however will break duplicate handling of several lines for the same entry, and we need a solution for that too. But again, LDIF itself is not ordered per se, so - is this important to you, so...
Hi, investigated; reason is that the tool saves its data in a perl hash. And they are, by definition, unordered. So, if this is really important, it might be an option to add the data into a hash using systematic keys (i.e. add a entry counter number to the front of the key) and sort the entries by that. That however will break duplicate handling of several lines for the same entry, and we need a solution for that too. But again, LDIF itself is not ordered per se, so - is this important to you, so...
Hi, investigated; reason is that the tool saves its data in a perl hash. And they are, by definition, unordered. So, if this is really important, it might be an option to add the data into a hash using systematic keys (i.e. add a entry counter number to the front of the key) and sort the entries by that. But again, LDIF itself is not ordered per se, so - is this important to you, so you need this fixed? What is your usecase? Ref: https://stackoverflow.com/questions/10901084/how-can-i-sort-a-perl...
I attach a csv file with just three records. Thanks! Andrea
Field value detection failure
I think, currently this cannot be fixed because of the way split() works. Look at how the separation of a field is exactly the same syntax as the combination $quote$delim: its both ", in this case. field1,", substring in field2",field3 ^^ ^^ This would need a major code overhaul, maybe by using Text::CSV. So probably cleaning the source data may be easier in your case.
I think, currently this cannot be fixed because of the way split() works. Look at how the separation of a field is exactly the same syntax as the combination $quote$delim: its both ", in this case. This would need a major code overhaul, maybe by using Text::CSV. So probably cleaning the source data may be easier in your case.
I can reproduce this, thanks for reporting. That is (from the code) expected behaviour and the only workaround currently is to avoid that combination. Or escape the comma after the quote: "\, and strip that afterwars using sed.
Hello, yes, thats the way to go. objectClass is threatened like any other attribute, see the readme file or give the -h option. $ ./csv2ldif2.pl -b cn=test <<CSV cn,mail,objectClass,objectClass Foo Bar,foo.bar@example.com,inetOrgPerson,person Test Baz,test.baz@example.com,inetOrgPerson,person CSV dn: cn=Foo Bar,cn=test cn: Foo Bar mail: foo.bar@example.com objectClass: inetOrgPerson objectClass: person dn: cn=Test Baz,cn=test cn: Test Baz mail: test.baz@example.com objectClass: inetOrgPerson objectClass:...
Do you please have test data for me to reproduce? My gut says, this is related to perls internal array handling. But that should not matter - LDIF content files are not ordered.
How to add objectClass attributes?
Hello, yes, thats the way to go. objectClass is threatened like any other attribute, see the readme file or give the -h option. $ ./csv2ldif2.pl -b cn=test <<LDIF cn,mail,objectClass,objectClass Foo Bar,foo.bar@example.com,inetOrgPerson,person Test Baz,test.baz@example.com,inetOrgPerson,person LDIF dn: cn=Foo Bar,cn=test cn: Foo Bar mail: foo.bar@example.com objectClass: inetOrgPerson objectClass: person dn: cn=Test Baz,cn=test cn: Test Baz mail: test.baz@example.com objectClass: inetOrgPerson objectClass:...
How to add objectClass attributes?
Output possibly changes while arguments remain unchanged in each run
Field value detection failure
* added new tool ldap-collate to toolbox
* Typo fix in README
* Updated readme
* Just added some more information to the help ...
In case you get encoding problems with EXCEL exported CSV-files, you probably need...
Could not get Attribute names from CSV line 1: .....
Probably you already solved this. It is important that the first line has to contain...
French character conversion
Hi there, i know this is an old ticket, however it might be helpful to others. With...
* Version 1.1 (2015-01-22)
* extended readme