Question: I know how to create a standard seed file in rails and seed my database. However, I have a wysiwyg editor that I used to create many pages of content. The content field is a "text" type and contains a full page of HTML. I will be exporting this data out and want to create a seed file with it. 

Any ideas on the best way to create my seed files? 

For example, should I create a reference the content from separate files? or should I just keep the text in one seed file? Would it be possible to show an example of a recommendation?

Answer: 
Create a dictionary from sorted & unique group of letters & indices from 1 to length of the string (you need unicity or several indexes will be generated if there are several occurrences of a letters (as shown below, I have added an S to the word):

```
s="ZEBRASS"
us=set(s)
sl=dict(zip(sorted(us),range(1,len(us)+1)))
print(sl)

```

`sl` contains:

```
{'Z': 6, 'A': 1, 'E': 3, 'R': 4, 'S': 5, 'B': 2}

```

To "encrypt", apply the dictionary to your string:

```
sc = [sl[c] for c in s]
print(sc)

```

result:

```
[6, 3, 2, 4, 1, 5, 5]

```
Create a temp list to store the sorted word, and extract the position from the temp list. Below is the sample code:

```
>>> word = 'ZEBRAS'
>>> sorted_word = sorted(word)

>>> sorted_word
['A', 'B', 'E', 'R', 'S', 'Z']

>>> index_string = [sorted_word.index(a)+1 for a in word]
>>> index_string
[6, 3, 2, 4, 1, 5]

```