Feature: Private fields
It would be nice to be able to mark fields (such as address) as private and then use a --private flag to omit those fields when generating a CV. This seems particularly relevant when using hackmycv to generate an online resume where I might not really want to publish my address and/or phone number but still be able to generate a PDF to print off and hand out...
Check out merging resumes. That's what I'd planned to do.
Oh I see...that's interesting - so I could have a base one without my address and then just provide the private details as and when in a separate one?
Several options here:
- Today: Use resume merging.
- Soon: A privatize filter (similar to what @robertmain is suggesting)
- Soon: An
anonymizecommand or option to replace personally identifiable information with safe equivalents / resume ipsem.
Resume merging currently works similar to the deep jQuery.extend but would be pretty easy to tweak.
It's worth clarifying that I was suggesting that it would be nice to be able to add private = true to any field to remove it from the resume if run with --private.
@robertmain One assumes that if a field is marked as private it should be private by default, i.e. use a --include-private flag to show them?
@robertmain I think that makes sense. In addition to that, a filter with object paths to exclude/privatize:
// .hackmyrc
{
exclude: [
'info.address', 'info.phone', 'info.email',
'employment[3].employer'. 'education[*].grade', 'etc'
]
}
Or
hackmyresume build resume.json out/rez.all --exclude 'info.address' 'info.phone' 'info.email'
It's hard to attach .private property to a naked string field in JSON anyway, so we offer the declarative approach too.
+1 on this, that would be cool
@hacksalot I tried to use resume merging and this is what happened:
$ hackmyresume BUILD resume.json private.json TO out.all
*** HackMyResume v1.3.1 ***
Applying MODERN theme (5 formats)
Reading resume: resume.json
Reading resume: private.json
ERROR: Cannot read property 'imp' of undefined
TypeError: Cannot read property 'imp' of undefined
at /home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/verbs/generate.js:67:30
at iterator (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/node_modules/underscore/underscore.js:184:16)
at Function.<anonymous> (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/node_modules/underscore/underscore.js:199:14)
at build (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/verbs/generate.js:65:20)
at main (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/index.js:79:42)
at Object.<anonymous> (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/index.js:27:3)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
This is my private.json
{
"basics": {
"picture": "",
"email": "[email protected]",
"phone": "01189998819991197253",
"location": {
"address": "14 Example Way",
"city": "Cityville",
"region": "GitHub ",
"postalCode": "ABSC",
"countryCode": "United Kingdom"
},
}
}
@robertmain If you install latest with
npm install hacksalot/hackmyresume#dev -g (you may need to npm uninstall hackmyresume -g first)
does this still occur?
Unfortunately it does(although slightly differently).
$ hackmyresume BUILD resume.json private.json TO out.all
Reading resume: resume.json
Reading resume: private.json
ERROR: Cannot read property 'map' of undefined
TypeError: Cannot read property 'map' of undefined
at skillsToFRESH (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/core/convert.js:361:19)
at Object.module.exports.toFRESH (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/core/convert.js:60:17)
at Object.module.exports.loadOne (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/core/resume-factory.js:69:64)
at /home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/core/resume-factory.js:38:21
at Array.map (native)
at Object.module.exports.load (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/core/resume-factory.js:37:22)
at build (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/verbs/generate.js:73:32)
at Command.execVerb (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/index.js:168:28)
at Command.<anonymous> (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/src/index.js:105:16)
at Command.listener (/home/robert/.nvm/versions/node/v5.0.0/lib/node_modules/hackmyresume/node_modules/commander/index.js:301:8)
Ah, okay. Thanks for the report -- related issue to [ ]. should be fixed shortly. Will update.
No probs :) Also you forgot to include the issue number :)
If anybody is still experiencing this issue in the latest versions (v1.4.x) please update here. Thanks.
I'm having a slightly different issue now where the data from the specific resume is just missing from the files output
$ hackmyresume BUILD resume.json private.json TO resume/out.all
*** HackMyResume v1.5.0 ***
Reading resume: resume.json
Reading resume: private.json
Merging private.json onto resume.json
Applying MODERN theme (5 formats)
Generating TXT resume: resume/out.txt
Generating MD resume: resume/out.md
Generating DOC resume: resume/out.doc
Generating HTML resume: resume/out.html
Generating PDF resume: resume/out.pdf
Generating JSON resume: resume/out.json
Generating YML resume: resume/out.yml
Generating PNG resume: resume/out.png
The MODERN theme says: "To get colored skill
progress bars, make sure your resume includes a `level`
element for each skill!"
Sidenote: Is there any way to do something about that warning about skill levels?
I'll add more tests around merging and hopefully resolve this finally for 1.6.0.
For now you can use --no-tips to disable theme warnings/messages. In future versions theme messages will display only the first couple times, or when the --tips or --debug flag is set.
Re: the original feature request, HMR 1.6.0 supports an .ignore flag (on any section or property) that effectively removes the property from the resume prior to processing. Eg:
"education": {
"history": [
{
"institution": "foo",
"ignore": true
/* etc */
}
]
}
Next up: .private and --private.
What is the name field for?
Er, employer.
Better make that institution.
It's worth clarifying that I was suggesting that it would be nice to be able to add private = true to any field to remove it from the resume if run with --private.
It seems like this use case (and many others) could be served by a more powerful tagging/labelling/flavouring system in which fields, or even entire sections, could be selected or deselected for a given build based on an arbitrary identifier. For example, you could label a field "not private" and build with "--flavor private" and I might label some of my sections "orange" and build with "--flavor orange" to exclude non-orange sections.