Example #1
0
def parse(name):
    """

  Parse resume\n
  Params: name Type: string\n
  Usage: cvscan parse --name <name>\n
  to parse file: ~/cvscan/<name>.pdf
  
  """
    resume = Cvscan(name)
    resume.parse()
Example #2
0
def parsename(name):
    """

  Parse resume\n
  Params: name Type: string\n
  Usage: cvscan parse --name <name>\n
  to parse file: ~/cvscan/<name>.pdf
  
  """
    resume = Cvscan(name)
    resume.parse()
    pprint.pprint(resume.show(), width=1)
Example #3
0
def parsepath(path):
    """
  Parse resume\n
  Params: name Type: string\n
  Usage: cvscan parse --name <name>\n
  to parse file: ~/cvscan/<name>.pdf
  
  """
    directory, name = os.path.split(path)
    name = name.split('.')[0]
    resume = Cvscan(name, directory)
    resume.parse()
    pprint.pprint(resume.show(), width=1)
Example #4
0
def parse(name):
  """
  Parse resume\n
  Params: name Type: string\n
  Usage: cvscan parse --name <name>\n
  to parse file: ~/cvscan/<name>.pdf

  """
  import os

  for filename in os.listdir(name):
       if os.path.isfile(name+'/'+filename+'/CV.json'):
         continue
       try:
         resume = Cvscan(name+'/'+filename+'/CV')
         resume.parse()
         pprint.pprint(resume.show(), width=1)
         f = open(name+'/'+filename+'/CV.json', 'w+')
         f.write(resume.show())
       except Exception as e:
         print(e)
       try:
         print(filename)
       except:
         pass
Example #5
0
def parsedir(dir):
  """

  Parse resume\n
  Params: name Type: string\n
  Usage: cvscan parse --name <name>\n
  to parse file: ~/cvscan/<name>.pdf

  """
  import os
  for filename in os.listdir('/Users/nontawat.charoenphakdee/workspace/cvscan/'+dir):
       resume = Cvscan(dir+'/'+filename[:-4])
       resume.parse()
       pprint.pprint(resume.show(), width=1)
       f = open(filename, 'w+')
       f.write(resume.show())