<commit_before># django-to-ldap
Useful scripts to convert django users and groups to ldap structure<commit_msg>Added example configs to Readme<commit_after># django-to-ldap
Useful scripts to convert django users and groups to ldap structure


**Example configs**
```json
// Minimal config
{
	"project_dir": "/path/to/django/project/dir",
	"domain": "dc=example,dc=com",
	"uid_start": 1000,
	"gid_start": 20000,
}

// Advanced config
{
	"project_dir": "/path/to/django/project/dir",
	"domain": "dc=example,dc=com",
	"uid_start": 1000,
	"gid_start": 20000,
	"extended_user_profile": {  // if you have extended the standard user class
		"app_name": "usermanagement", // name of the django app containing the extended user model
		"user_class": "User_profile" // name of the class
	},
	"attribute_mapping": { // maps django attribute names to ldap counter parts
	  "phone_home": "telephoneNumber",
	  "phone_mobile": "mobile",
	  "birth_date": "birthday",
	  "initials": "initials",
	  "email": "mail",
	  "zip_code": "postalCode",
	  "address": "postalAddress"
	}
}


```
{'fraction_non_alphanumeric': 0.14700374531835206, 'fraction_numerical': 0.016853932584269662, 'mean_word_length': 4.747311827956989, 'pattern_counts': {'":': 19, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5020660', 'n_tokens_mistral': 389, 'n_tokens_neox': 354, 'n_words': 102}