-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreadmeold.txt
166 lines (130 loc) · 10.9 KB
/
readmeold.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# cover-letter-template-generator
*Problem*: Creating unique cover letters focused on a specific company and why you like them/how you are relevant to that company. I know for me, it takes about 10 mins or longer to create a unique cover for every job. Forty jobs * 10 mins = 400 mins (minimum) per week. 1200 Mins per month - this is a ton of time.
</br>
</br>
*Problem 2*: I am required to enter the jobs that I apply to a secondary application. To apply to 20 jobs, it takes a minute more of my time, times that by 2-3 times per week (3 mins) for a month (12 mins wasted).
</br>
</br>
*Solution*: This application is a program that is oriented around creating fully dynamic and customized cover letters with more ease. Ultimately saving people a significant amount of time.
</br>
</br>
**Feedback -->** If you have any feedback, please feel free to reach out to me by email at [email protected]
# **Make Sure All Commands Below Are Done At The Root Level.**
## **Techonolgies needed:**
* `Python`:
* [Installing python on windows](https://www.ics.uci.edu/~pattis/common/handouts/pythoneclipsejava/python.html)
* [Installing python on mac](https://docs.python.org/3/using/mac.html)
* [Installing python using homebrew](https://docs.brew.sh/Homebrew-and-Python)
* `Python Virtual Environment`:
* [Installing Virtual Environment](https://docs.python.org/3/library/venv.html)
* `Django`:
* [Installing Django on windows](https://docs.djangoproject.com/en/1.8/howto/windows/#:~:text=Django%20can%20be%20installed%20easily,version%20in%20the%20command%20prompt.)
* [Installing Django](https://docs.djangoproject.com/en/3.1/topics/install/)
* `Selenium` for testing:
* [Installing Selenium](https://selenium-python.readthedocs.io/installation.html)
### **Additional Technologies Used**
* `UrlLib3`
* `RandomWords`
* `PhoneField`
* `MultiSelectField`
## *Setup Steps*
I am assuming that you have [Brew](https://treehouse.github.io/installation-guides/mac/homebrew) installed for the following code. If you do not, please copy this `ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` into your terminal.
* *Step 1*: If there is a word in parenthesis next to your name in the terminal, i.e. (venv) X's-Macbook-pro, then you are in the virtual environment.
* *1a*: If you don't have that, please follow this step. In your terminal, please run `pip install virtualenv.` I am following steps from [installing venv](https://sourabhbajaj.com/mac-setup/Python/virtualenv.html)
* *1b*: If you have a project in a directory called my-project, you can set up virtualenv for that project by running: run `cd my-project/virtualenv venv`. If you want your virtualenv also to inherit globally installed packages, run: `virtualenv venv --system-site-packages`
* *1c*: **Important** These commands create a venv/ directory in your project where all dependencies are installed. You need to activate it first, though (in every terminal instance where you are working on your project): `source venv/bin/activate`
* *Step 2*: **If you are inside the virtual environment, see step one to determine if you are.** In your terminal run `pip install -r requirements.txt`. This will run the `requirements.txt` file that will download all necessary third-party files and start the virtual environment for you, as mentioned below.
It will get installed in the venv/ folder and not conflict with other projects. To leave the virtual environment, run: `deactivate`
**Optional**:
To make it easier to work on multiple projects with separate environments, you can install `virtualenvwrapper`. It's an extension to `virtualenv` and makes it easier to create and delete virtual environments without creating dependency conflicts.
To install virtualenvwrapper run: `pip install virtualenvwrapper`
## **STARTING VIRTUAL ENVIRONMENT: `source venv/bin/activate`**
It is crucial to start the virtual environment, and doing the above code will do so.
## Run: `Python3 manage.py runserver`
This will start the server running on http://localhost:3000/. If you are having issues with running the above command using Python3,
try using `Python manage.py runserver`.
If your preference for locally running the server is http://localhost:8000/, please run `Python3 manage.py runserver 8000` or `Python manage.py runserver 8000`
## **Creating a SuperUser**
For this system, it is vital to create a superuser. To do so, click here ([documentation](https://docs.djangoproject.com/en/1.8/intro/tutorial02/)) or follow the below steps:
* run `python manage.py createsuperuser` or `python3 manage.py createsuperuser` in your terminal at the top folder level (CoverLetterGeneratorApp) of the project.
* Follow prompts in the terminal.
**Access to SuperUser**
To access the superuser you'll have to go to `http://localhost:3000/admin` or `http://localhost:8000/admin` and log in. At this point you can edit or delete any information that is in the system.
## **Create a User**
On the homepage, click the User Form to create.
For simplicity, the last user you create will be the one that the system uses for the cover-letter template. You have the option to change it on the form itself if you wish.
**Delete** The test user that currently exists once you have completed your user information.
## **Testing**
Important:
If you don't want to use chrome as your main server, then you'll need to move to change two files - `coverLetters/tests_submit_to_interviewdb.py` and `coverLetters/tests.py`. In the `def setup(self):` function change the `webdriver.` to what you want it to be -> [options](https://selenium-python.readthedocs.io/installation.html#drivers).
Whatever driver you choose, you'll want to drag the driver to the `venv/bin/` path.
-------------
* First, make sure you are in the virtual environment to start the test. In your terminal, it should show `(venv) YourNameHere:ProjectName`.
* Next in your terminal, make sure you are at the root level.
* run: `python manage.py test`
This will run through an assortment of tests, such as making sure the back buttons are present on each back except for admin. Making sure that each form field is working and the different templates are valid.
<br>
If you change the model, you will also need to change these tests.
Submitting to InterviewDB
-------------
If you wish to submit to interview DB, you'll need to make a couple of additions and changes.
* Step 1:
Add a file called `passwords.py` under the `coverLetters` folder. The pathway should look like `coverLetters/passwords.py`.
* Step 2:
Add two functions:
* `def github_password():`
`return 'your-github-password'`
* `def github_login():`
`return 'your-github-username'`
**Don't Wish to Submit to InterviewDB**:
* Go to `coverLetters/tests_submit_to_interviewdb.py` and comment/hash out the entire test.
**Running the test**:
`python manage.py test`
</br>
## **Editing Cover Letter**
### `CoverLetterGeneratorApp/coverLetters/templates/coverletters/cover-letter.html`
### Cover Letter Template
If you want different pre-filled sections (i.e., Top Skills is filled with "Dynamic and accomplished Software Engineer with experience and expertise in") you can go to `coverLetters/models.py` and under that field in the `Job Model` you can either add or change the field `default="x"`.
Currently, the `top_skills` field has a default value of `"Dynamic and accomplished Software Engineer with experience and expertise in"`, which are based on the template I have in there.
Don't worry about bullet_point_one, etc. They won't be added to the cover letter unless you wish it to be so.
## All Job Detail
### `CoverLetterGeneratorApp/coverLetters/templates/jobs`
This is the code's location, which holds the general information for the cover letter, and then the cover letter itself.
### `CoverLetterGeneratorApp/coverLetters/templates/all-jobs`
This is a simple for loop which shows all jobs that have templates and exist in your database.
## Filling Out Form
Each field of the form:
</br>
</br>
<ul>`Template choices:` - This is where you select which version of the template you wish to populate. This is pre-populated with `cover-letter.html` or otherwise known as "Standard Cover Letter".</ul>
<ul>`Choice of user:` - ID 2 - Your User Info - date created: 2020-09-03 - This is whatever user information you provided that will populate the form. </ul>
<ul>`Job posting website:` - Linkedin - Put here the website to which you gathered the information from.This is so that it can say "I saw your job posting from x" </ul>
<ul>`Company:` - The name of the company you are applying to.</ul>
<ul>`Position title:` - Title of the position you are applying to.</ul>
<ul>`City:` - What city is the job in? This is really just for your records.</ul>
<ul>`Link:` - This is the link of the job posting so that you can go back to it.</ul>
<ul>`Recruiter:` - If you have a recruiters name, then put it here.The recruiters name will replace the generic greeting.</ul>
<ul>`Description:` - Job description for your records.</ul>
<ul>`Pre bullet point paragraph one:` - If you want to have a paragraph before the bullet points.</ul>
<ul>`Pre bullet point paragraph two:` - If you want to have a second paragraph before the bullet points.</ul>
<ul>`Top skills:` - These are your top skills that are relevant to the job.
This is prefilled in with "Dynamic and accomplished Software Engineer with experience and expertise in x".</ul>
<ul>`Bullet point x:` - These are the additional reasons why you are good for this position. There are eight fields.</ul>
<ul>`Post bullet point paragraph one:` - If you want to have a paragraph post the bullet points.</ul>
<ul>`Post bullet point paragraph two:` - If you want to have a second paragraph post the bullet points.</ul>
</br>
</br>
## Duplicates
To resolve the issue of potentially putting duplicate information into the database. I used `unique_together` which is a meta class to `models`. See Below:
`class Meta:
unique_together = ('link', 'template_choices', 'position_title')`
To explain what this little piece of code is doing, it is looking at each form submitted to ensure a unique combination of link, template choice, and position title.
I choose these three for a specific reason:
* The link generated by a job is typically unique to that single job, so that alone should solve uniqueness.
* I added in template choices to have multiple cover letters for one job as long as they are different templates.
* Position_title was added in to create one last uniqueness check.
## Future Features
**Front-end**
My goal is a cleaner UI that allows my website to be used by the masses to help everyone generate unique cover letters. Even create their templates from the frontend.
**Users**
With the creation of the frontend, I want each user to create a unique profile so that they can save their data.