1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-15 10:07:07 +01:00

Revamp command-line functionality.

Get resume generation CLI up and running again after recent API updates.
Tool name has changed to "fluentcmd" from "scrappy" and now depends on
external "fluentlib" instead of embedding those sources.
This commit is contained in:
devlinjd
2015-09-24 16:09:48 -04:00
parent 1715a66514
commit 76f718dc3e
14 changed files with 195 additions and 1167 deletions

View File

@ -1,31 +0,0 @@
/**
HTML-based PDF resume generator for FluentCV.
@license Copyright (c) 2015 by James M. Devlin. All rights reserved.
*/
var TemplateGenerator = require('./template-generator');
var FS = require('fs-extra');
var HTML = require( 'html' );
var HtmlPdfGenerator = TemplateGenerator.extend({
init: function() {
this._super( 'pdf', 'html' );
},
/**
Generate an HTML resume with optional pretty printing.
*/
onBeforeSave: function( mk, themeFile, outputFile ) {
var cssSrc = themeFile.replace( /.html$/g, '.css' );
var cssDst = outputFile.replace( /.html$/g, '.css' );
FS.copy( cssSrc, cssDst, function( e ) {
if( e ) err( "Couldn't copy CSS file to destination: " + err);
});
return true ?
HTML.prettyPrint( mk, { indent_size: 2 } ) : mk;
}
});
module.exports = HtmlPdfGenerator;