Skip to content

Commit

Permalink
v1.3.0+minor release
Browse files Browse the repository at this point in the history
- Added functionality to extract languages and certifications details

- removed unwanted code

- cleanup

- added summary of changes
  • Loading branch information
DrakenWan committed Dec 9, 2021
1 parent a49de63 commit ebc15c5
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 20 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@ Currently able to extract:-
* - [x] `profile data`
* - [x] `experience section`
* - [x] `education section`
* - [ ] `certifications`
* - [x] `certifications`
* - [ ] `volunteer experience`
* - [x] `skills section`
* - [ ] `accomplishments`
* - [x] `accomplishments`
* - [x] `courses`
* - [x] `projects`
* - [ ] `languages`
* - [ ] `test scores`
* - [ ] `awards`
* - [x] `languages`
* - `test scores` _Planning not to extract these until the previous minor release [bug](https://github.com/DrakenWan/Yale3/issues/1) of accomplishment extraction is not fixed_
* - `awards` _Same as test scores_


removed checkboxes on `test scores` and `awards` section. Planning not to extract these as the information from these is not viable unless the `accomplishments` section bug is fixed with a long term solution. For now assuming that entire `accomplishment` section has been extracted in progress.

## Bugs

Some bugs might have crept in. I strive to make the code as general as possible but the extractor tool may not be perfect. If you find any bug on any profile please let me know in [issues](https://github.com/DrakenWan/Yale3/issues) section.
70 changes: 55 additions & 15 deletions scripts/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ function extract() {
/// Languages, honor-awards)

//first, extract out the array of nodes containing different sections
var coursesection = document.querySelector(".courses")
var coursesection = document.querySelector(".courses");
var projectsection = document.querySelector(".projects");
// var lang_nodes = acc_nodes[2]?.querySelectorAll("div > ul > li") || null;
// var tests = acc_nodes[3]?.querySelectorAll("div > ul > li") || null;
var languagesection = document.querySelector(".languages");
//var tests = acc_nodes[3]?.querySelectorAll("div > ul > li") || null;
// var awards = acc_nodes[4]?.querySelectorAll("div > ul > li") || null;

///extracting different sections starting with course section
Expand Down Expand Up @@ -351,23 +351,63 @@ function extract() {
}
/////PROJECTS EXTRACTION ENDS HERE////


////LANGUAGES EXTRACTION////
var languages = []
if(languagesection) {
var lang_nodes = languagesection.querySelectorAll("div > ul > li") || null;
for(var nodo of lang_nodes) {
var language = nodo.textContent;
languages.push(
getCleanText(language)
);
}
}
////LANGUAGE EXTRACTION ENDS HERE////


var accomplishments = {
"courses": courses || [],
"projects": projects || []
"projects": projects || [],
"languages": languages || []
}

////Accomplishments extraction ends here

//add in the extracted object values here
userProfile = {
"profileData": profileData,
"experiences": experiences,
"education": education,
"skills": skills,
"accomplishments" : accomplishments
}
////Accomplishments extraction ends here

///Licences and Certifications Extraction///
var certnodes = document.querySelectorAll(".pv-profile-section--certifications-section > ul > li");
var certs = [];
if(certnodes) { //if the section exists or nah
for(var nodo of certnodes) {
var summ1 = nodo.querySelector("div.pv-certifications__summary-info--has-extra-details");
var summ2 = nodo.querySelector("div.pv-entity__extra-details");

var certtitle = summ1?.querySelector("h3")?.textContent || null;
var credurl = summ2?.querySelector("a").href || null;

certs.push(
{
"title": getCleanText(certtitle),
"url": credurl
}
);
}//for loop ends
}


///L&C extraction ends here///

//add in the extracted object values here
userProfile = {
"profileData": profileData,
"experiences": experiences,
"education": education,
"skills": skills,
"accomplishments" : accomplishments,
"certifications": certs
}

return userProfile;
return userProfile;
}//Extract() functions ends here


Expand Down

0 comments on commit ebc15c5

Please sign in to comment.