Last active
October 20, 2019 11:29
-
-
Save moonblade/abf8052670a8db49386e486fcbec7182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
from lorem.text import TextLorem | |
import random | |
import time | |
from datetime import datetime | |
def genDate(): | |
d = random.randint(1, int(time.time())) | |
return datetime.fromtimestamp(d).strftime('%d-%m-%Y') | |
testCases = 1 | |
minDates = 1 | |
maxDates = 10 | |
minSeperation = 1 | |
maxSeperation = 10 | |
gen=TextLorem(srange=(minSeperation, maxSeperation)) | |
for x in range(testCases): | |
dates = random.randint(minDates, maxDates) | |
string = [] | |
if random.random() > .5: | |
string.append(gen.sentence()) | |
for y in range(dates): | |
if string: | |
string.append( gen.sentence()) | |
string.append( genDate()) | |
if random.random() > .5: | |
string.append(gen.sentence()) | |
print(' '.join(string), dates) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment