Skip to content

Commit

Permalink
Feature: config support for cover letter and output file
Browse files Browse the repository at this point in the history
  • Loading branch information
krapes committed Jul 12, 2020
1 parent 8321477 commit cbe5a89
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
16 changes: 11 additions & 5 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
username: # Insert your username here
password: # Insert your password here
username:
password:

positions:
- # Position you want to search for
- # positions you want to search for
- # Another position you want to search for
- # A third position you want to search for

locations:
- # Location you want to search in
- # A second location you want to search in
- # Location you want to search for
- # A second location you want to search in

cover_letter_loctn:
- # '/home/PATH_TO_FILE'

output_filename:
- # PATH TO OUTPUT FILE (default output.csv)
12 changes: 10 additions & 2 deletions easyapplybot.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,17 @@ def finish_apply(self):
assert parameters['username'] is not None
assert parameters['password'] is not None


print(parameters)
cover_letter_loctn = parameters.get('cover_letter_loctn', [None])[0]
output_filename = parameters.get('output_filename', ['output.csv'])[0]

bot = EasyApplyBot(parameters['username'],
parameters['password'],
parameters['locations']
cover_letter_loctn=cover_letter_loctn,
filename=output_filename
)

bot.start_apply(parameters['positions'], parameters['locations'])
locations = [l for l in parameters['locations'] if l != None]
positions = [p for p in parameters['positions'] if p != None]
bot.start_apply(positions, locations)

0 comments on commit cbe5a89

Please sign in to comment.