Skip to content

Commit

Permalink
Initial python script
Browse files Browse the repository at this point in the history
  • Loading branch information
alexchantastic committed Nov 3, 2021
1 parent cf7756d commit 31d5176
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lipsum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import sys
from lib.lorem import lorem

args = sys.argv
type = args[1]
count = int(args[2]) if len(args) >= 3 else 1

def lipsum(type):
if type == 'characters':
return ''

elif type == 'words':
return lorem.get_word(count).capitalize()

elif type == 'sentences':
return lorem.get_sentence(count)

elif type == 'paragraphs':
return lorem.get_paragraph(count)

else:
return lorem.get_sentence(count)

print(lipsum(type))

0 comments on commit 31d5176

Please sign in to comment.