europass / europasscv-parser-js

Parse EuropassCV PDF/XML using JavaScript
MIT License
16 stars 7 forks source link

EuropassParser

Description

The Europass CV helps users to present their skills and qualifications effectively and clearly. Any user can create a CV online here.

The Europass Parser Javascript Library gives the possibility to developers to parse quickly into their HTML forms a Europass PDF+XML CV created from users through the Europass site.

More information about the Europass CV Schema and resources about Europass REST services can be found at the Europass Interoperability site.

Getting Europass Parser Javascript Library

There are multiple ways of getting europass-parser.js

click here to download Europass Parser Javascript Library Unzip the folder and include scripts inside into your project

<script src="https://github.com/europass/europasscv-parser-js/raw/master/path/to/europass-config.js"> </script>  
<script src="https://github.com/europass/europasscv-parser-js/raw/master/path/to/europass-parser.js"> </script>  
<script>  
  // When you get the Europass CV (PDF+XML) file from a user pass it to the library  
  EuropassParser(file);  
</script>

Getting Started

Events

Some sections, such as Work Experience, Education, Achievemts, Languages, Skills, have more than one Object inside. For these sections, the corresponing HTML elements need to be populated by the developer for the Europass Parser to be able to fill them.

The events below inform the developer of the number of Objects for each Section that exists inside Europass CV data.

For these sections europass-config.js contains an extra key the suffix

...  
{ 'original': 'SkillsPassport.LearnerInfo.WorkExperience.Position.Label', 'replace': 'work_experience_title', 'suffix': '_', 'enabled': true}  
...

example

document.addEventListener('work_length', function (event) {  
 var number_of_work_experiences = event.detail;  
 /*  
  Create here the corresponding html fields  
 */  
});

The suffix should be used as follows

<input name="work_experience_title" />
...  
<!-- The html below should be generated from the developer if does not already exists. -->  
<input name="work_experience_title_1" />

This way the Europass Parser Javascript Library finds the available fields to fill in.

all the html elements that are to be fulfilled from the library must at least be created at the time when the event is fired.

Finished parsing event.

Extras

Available demo can be found here