mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-03 21:07:07 +01:00
Capture.
This commit is contained in:
@ -27,7 +27,7 @@ Definition of the FRESHResume class.
|
||||
/**
|
||||
A FRESH resume or CV. FRESH resumes are backed by JSON, and each FreshResume
|
||||
object is an instantiation of that JSON decorated with utility methods.
|
||||
@class FreshResume
|
||||
@constructor
|
||||
*/
|
||||
function FreshResume() {
|
||||
|
||||
@ -61,8 +61,8 @@ Definition of the FRESHResume class.
|
||||
Open and parse the specified FRESH resume. Merge the JSON object model onto
|
||||
this Sheet instance with extend() and convert sheet dates to a safe &
|
||||
consistent format. Then sort each section by startDate descending.
|
||||
@param rep The raw JSON representation.
|
||||
@param opts Resume loading and parsing options.
|
||||
@param rep {Object} The raw JSON representation.
|
||||
@param opts {Object} Resume loading and parsing options.
|
||||
{
|
||||
date: Perform safe date conversion.
|
||||
sort: Sort resume items by date.
|
||||
|
@ -32,8 +32,8 @@ Definition of the ResumeFactory class.
|
||||
/**
|
||||
Load one or more resumes from disk.
|
||||
|
||||
@param opts An options object with settings for the factory as well as
|
||||
passthrough settings for FRESHResume or JRSResume. Structure:
|
||||
@param {Object} opts An options object with settings for the factory as well
|
||||
as passthrough settings for FRESHResume or JRSResume. Structure:
|
||||
|
||||
{
|
||||
format: 'FRESH', // Format to open as. ('FRESH', 'JRS', null)
|
||||
@ -107,12 +107,15 @@ Definition of the ResumeFactory class.
|
||||
// Read the file
|
||||
eve && eve.stat( HME.beforeRead, { file: fileName });
|
||||
rawData = FS.readFileSync( fileName, 'utf8' );
|
||||
eve && eve.stat( HME.afterRead, { data: rawData });
|
||||
eve && eve.stat( HME.afterRead, { file: fileName, data: rawData });
|
||||
|
||||
// Parse the file
|
||||
eve && eve.stat( HME.beforeParse, { data: rawData });
|
||||
var ret = { json: JSON.parse( rawData ) };
|
||||
eve && eve.stat( HME.afterParse, { data: ret.json } );
|
||||
var orgFormat = ( ret.json.meta && ret.json.meta.format &&
|
||||
ret.json.meta.format.startsWith('FRESH@') ) ?
|
||||
'fresh' : 'jrs';
|
||||
eve && eve.stat( HME.afterParse, { file: fileName, data: ret.json, fmt: orgFormat } );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user