use of de.svenjacobs.loremipsum.LoremIpsum in project orgzly-android by orgzly.
the class LipsumBookGenerator method generateOrgString.
public static String generateOrgString(int content, int[] notesAndContent) {
StringBuilder result = new StringBuilder();
LoremIpsum loremIpsum = new LoremIpsum();
OrgParserWriter parserWriter = new OrgParserWriter();
result.append(parserWriter.whiteSpacedFilePreface(loremIpsum.getWords(content / CHARS_PER_WORD)));
if (notesAndContent != null) {
for (int i = 0; i < notesAndContent.length; i += 2) {
OrgHead head = new OrgHead();
head.setTitle(loremIpsum.getWords(notesAndContent[i] / CHARS_PER_WORD));
head.setContent(loremIpsum.getWords(notesAndContent[i + 1] / CHARS_PER_WORD));
result.append(parserWriter.whiteSpacedHead(head, 1, false));
}
}
return result.toString();
}
Aggregations