Commit 859b1c0b authored by Dos Santos David's avatar Dos Santos David

add welcome message

parent 7bfb2b56
......@@ -4,9 +4,26 @@ from gogole import commands
from gogole.config import COLLECTIONS
from gogole.tokenizer.simple_tokenizer import SimpleTokenizer
from gogole.tokenizer.no_tokenizer import NoTokenizer
from gogole.indexer import BSBIIndexer
WELCOME_MESSAGE="""
*************************
Welcome to gogole !
*************************
You don't know where to start ? Let me help you !
* analyze all : I'll do some analyzes on the collection you gave me
* index build : I'll build the reversed index for you
* index lookup <token> : I'll tell you in where documents your token is
* search <query> : I'll show you the documents you need
"""
def build_cli_analyze_parser(root_parser):
args_parser_analyze = root_parser.add_parser(
'analyze',
......@@ -59,16 +76,17 @@ if __name__ == "__main__":
main_args = main_parser.parse_args()
parser_cls = COLLECTIONS[main_args.collection]
print("Welcome to Gogole !")
print(WELCOME_MESSAGE)
cli_parser = build_cli_parser()
parser = parser_cls()
tokenizer = SimpleTokenizer()
tokenizer = NoTokenizer()
indexer = BSBIIndexer()
while True:
raw_input = input("google > ")
print('')
raw_input = input("gogole > ")
try:
args = cli_parser.parse_args(raw_input.split(' '))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment