mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-07-09 11:41:07 +01:00
Implemented private fields that can be included or excluded with cli switch
This commit is contained in:
@ -33,7 +33,7 @@ _analyze = ( sources, dst, opts ) ->
|
||||
|
||||
nlzrs = _loadInspectors()
|
||||
results = _.map sources, (src) ->
|
||||
r = ResumeFactory.loadOne src, format: 'FRESH', objectify: true, @
|
||||
r = ResumeFactory.loadOne src, format: 'FRESH', objectify: true, inner: { private: opts.private }, @
|
||||
return { } if opts.assert and @hasError()
|
||||
|
||||
if r.fluenterror
|
||||
|
@ -63,7 +63,10 @@ _build = ( src, dst, opts ) ->
|
||||
|
||||
# Load input resumes as JSON...
|
||||
sheetObjects = ResumeFactory.load src,
|
||||
format: null, objectify: false, quit: true, inner: { sort: _opts.sort }
|
||||
format: null, objectify: false, quit: true, inner: {
|
||||
sort: _opts.sort
|
||||
private: _opts.private
|
||||
}
|
||||
, @
|
||||
|
||||
# Explicit check for any resume loading errors...
|
||||
@ -130,7 +133,7 @@ _build = ( src, dst, opts ) ->
|
||||
@stat HMEVENT.applyTheme, r: rez, theme: theme
|
||||
|
||||
# Load the resume into a FRESHResume or JRSResume object
|
||||
_rezObj = new (RTYPES[ toFormat ])().parseJSON( rez );
|
||||
_rezObj = new (RTYPES[ toFormat ])().parseJSON( rez, private: _opts.private );
|
||||
|
||||
# Expand output resumes...
|
||||
targets = _expand dst, theme
|
||||
@ -167,6 +170,7 @@ _prep = ( src, dst, opts ) ->
|
||||
# Cherry-pick options //_opts = extend( true, _opts, opts );
|
||||
_opts.theme = (opts.theme && opts.theme.toLowerCase().trim()) || 'modern';
|
||||
_opts.prettify = opts.prettify is true
|
||||
_opts.private = opts.private is true
|
||||
_opts.css = opts.css
|
||||
_opts.pdf = opts.pdf
|
||||
_opts.wrap = opts.wrap || 60
|
||||
|
@ -61,7 +61,7 @@ _convert = ( srcs, dst, opts ) ->
|
||||
###* Private workhorse method. Convert a single resume. ###
|
||||
_convertOne = (src, dst, idx) ->
|
||||
# Load the resume
|
||||
rinfo = ResumeFactory.loadOne src, format: null, objectify: true
|
||||
rinfo = ResumeFactory.loadOne src, format: null, objectify: true, inner: { private: true }
|
||||
|
||||
# If a load error occurs, report it and move on to the next file (if any)
|
||||
if rinfo.fluenterror
|
||||
|
Reference in New Issue
Block a user