Comments (3)
Definitively! It would be way more resilient if instead of accessing per position it did it through the header column name. LinkedIn changes their format from time to time and they don't seem to document this publicly, which makes it hard to keep the project up to date.
I'm re-requesting my data to make the fix. If you feel like making it yourself, feel free to send a PR.
from linkedin-to-json-resume.
Fixed on c800085
from linkedin-to-json-resume.
Hm. I don't actually know javascript, but I was messing around and it looks like this works. I've only tested it with the basic Profile info though
function camelize(str) {
return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function(match, index) {
if (+match === 0) return ""; // or if (/\s+/.test(match)) for white spaces
return index == 0 ? match.toLowerCase() : match.toUpperCase();
});
};
function arrToKVP(arr) {
var rows = [];
for (rownum = 1; rownum < arr.length - 1; ++rownum){
var thisrow = {};
for (colnum = 0; colnum < arr[0].length; ++colnum){
thisrow[camelize(arr[0][colnum])] = arr[rownum][colnum];
}
rows.push(thisrow);
}
if (rows.length > 1){
return rows;
} else {
return rows[0];
}
};
it takes one of the arrays from csvtoarray
and returns either an object or array of objects based on a camel-cased version of the column headers. The relevant in the getEntries function then becomes
case (entry.filename.indexOf('Profile.csv') !== -1):
return readEntryContents(entry).then(contents => {
const profile = arrToKVP(csvToArray(contents));
linkedinToJsonResume.processProfile(profile);
return;
});
from linkedin-to-json-resume.
Related Issues (16)
- Update to 0.0.0
- CV generation breaks because of latest LinkedIn API update HOT 2
- Can't import resume (cannot read property toUpperCase of undefined) HOT 2
- [object ErrorEvent] when importing .zip file HOT 1
- npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue HOT 1
- Improperly parsed data fields HOT 1
- "startDate": "Invalid date", when importing LinkedIn Basic_LinkedInDataExport zip HOT 1
- "location" data not parsed. HOT 5
- `Location` data from Positions.csv not parsed HOT 1
- Adding a LinkedIn export button to homepage HOT 1
- Is it possible to request the conversion via an API? HOT 2
- An in-range update of isomorphic-unzip is breaking the build 🚨 HOT 1
- Doesn't work if my profile doesn't have languages HOT 1
- Doesn't read a few files HOT 6
- empty Json HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linkedin-to-json-resume.