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.
There are multiple ways of getting europass-parser.js
npm install --save europass-parser
ES5
var EuropassParser = require('europass-parser');
EuropassParser(file);
ES6
import * as EuropassParser from 'europass-parser';
EuropassParser(file);
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>
npm install && npm run build
...
{ 'original': 'SkillsPassport.LearnerInfo.Identification.PersonName.FirstName', 'replace': 'name', 'enabled': true},
...
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.
Usage with React.js
Import the library and the config into the component
//Other React Imports
import EuropassParser from 'europass-parser';
import EuropassParserConfig from './config';
Add in the React constructor
window.EuropassParserConfig = EuropassParserConfig;
"../node_modules/europass-parser/build/config.js"
declare module 'europass-parser'
import * as EuropassParser from 'europass-parser';