-# Return a random phrase from the phrases list
-def get_random_phrase(phrase_file):
- phrases = list(_read_phrases(phrase_file))
- randomRecord = _random_int(0, len(phrases) - 1)
+# Main program
+def main(args=sys.argv[1:]):
+ parser = argparse.ArgumentParser(description="Latin famous phrases in the terminal.")
+ parser.add_argument("-e", "--english", action='store_true', help="Output English.")
+ parser.add_argument("-l", "--latin", action='store_true', help="Output Latin (default)")
+ parser.add_argument("-n", "--notes", action='store_true', help="Output notes on phrase")
+ parser.add_argument("-m", "--min", type=int, help="Set the minimum length of latin")
+ parser.add_argument("-M", "--max", type=int, help="Set the maximum length of latin")
+ args = parser.parse_args()
+
+ phrases = list(read_phrases("/usr/share/phrases/phrases"))
+ randomRecord = random.randint(0, len(phrases) - 1)