def parseresume():
    the_keyword_dict = KeywordDict()
    the_keyword_dict.open_json_file(sys.argv[1])
    dumb_resume = open(sys.argv[2], "r")
    exp_json = open(sys.argv[3], "w")

    resume_queue = deque(dumb_resume.readlines())
    experience_list = []
    while resume_queue:
        exp = Experience(the_keyword_dict)
        for i in range(5):
            str1 = resume_queue.popleft().strip()
            str2 = resume_queue.popleft().strip()
            # print str1 + " " + str2
            setattr(exp, str1, str2)
        resume_queue.popleft()  # tools
        exp.set_tools(resume_queue.popleft().strip())
        resume_queue.popleft()  # concepts
        exp.set_concepts(resume_queue.popleft().strip())
        resume_queue.popleft()  # keywords
        exp.set_keywords(resume_queue.popleft().strip())
        experience_list.append(exp)
        json.dump(exp.json_compatible(), exp_json, indent=2)
    the_keyword_dict.write_to_json()
    the_keyword_dict.close()
    exp_json.close()
Пример #2
0
def promptexp():
  the_keyword_dict = KeywordDict()
  the_keyword_dict.open_json_file(raw_input("Json File Name:").strip())
  experience_list = []
  while (True):
    position = raw_input("Experience:").strip()

    if len(position) > 0:            
         exp = Experience(the_keyword_dict)        
	 exp.title = position
	 exp.company = raw_input("Organization:").strip()
	 exp.start = raw_input("Start Date:").strip()
	 exp.end = raw_input("End Date:").strip()
	 exp.description = raw_input("Description:").strip()
	 exp.set_tools(raw_input("Tools/Libraries/Languages:").strip())
	 exp.set_concepts(raw_input("CS concepts:").strip())
	 exp.set_keywords(raw_input("Other keywords:").strip())
	 #exp.set_achievements(raw_input("Achievements (optional):").strip())
	 experience_list.append(exp)
    else:
      break
  
  the_keyword_dict.write_to_json()
  the_keyword_dict.close()