1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-12-22 05:27:22 +00:00

feat: improve help behavior

This commit is contained in:
hacksalot 2018-02-11 08:13:13 -05:00
parent a5739f337f
commit 7144126175
No known key found for this signature in database
GPG Key ID: 2F343EC247CA4B06
22 changed files with 349 additions and 296 deletions

8
dist/cli/error.js vendored
View File

@ -113,14 +113,10 @@ Error-handling routines for HackMyResume.
quit = false;
break;
case HMSTATUS.resumeNotFound:
msg = M2C(this.msgs.resumeNotFound.msg, 'yellow');
msg += M2C(FS.readFileSync(PATH.resolve(__dirname, 'help/' + ex.verb + '.txt'), 'utf8'), 'white', 'yellow');
break;
case HMSTATUS.missingCommand:
msg = M2C(this.msgs.missingCommand.msg + " (", 'yellow');
msg += Object.keys(FCMD.verbs).map(function(v, idx, ar) {
return (idx === ar.length - 1 ? chalk.yellow('or ') : '') + chalk.yellow.bold(v.toUpperCase());
}).join(chalk.yellow(', ')) + chalk.yellow(").\n\n");
msg += chalk.gray(FS.readFileSync(PATH.resolve(__dirname, '../cli/use.txt'), 'utf8'));
msg += M2C(FS.readFileSync(PATH.resolve(__dirname, 'help/use.txt'), 'utf8'), 'white', 'yellow');
break;
case HMSTATUS.invalidCommand:
msg = printf(M2C(this.msgs.invalidCommand.msg, 'yellow'), ex.attempted);

View File

@ -1,23 +1,25 @@
**analyze** | Analyze a FRESH resume document for statistics
**analyze** | Analyze a resume for statistical insight
Usage:
hackmyresume ANALYZE <resume> [<options>]
hackmyresume ANALYZE <resumes...> [<options>]
**hackmyresume ANALYZE <resume>**
The ANALYZE command evaluates the specified resume(s) for
coverage, duration, gaps, keywords, and other metrics.
This command can be run against multiple resumes. Each
will be analyzed in turn.
Parameters:
**<resume/resumes>**
**<resume>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents to be analyzed. Multiple resumes
can be specified, separated by spaces:
Path to a FRESH or JRS resume. Multiple resumes can be
specified, separated by spaces.
hackmyresume ANALYZE r1.json r2.json r3.json
hackmyresume ANALYZE resume.json
hackmyresume ANALYZE r1.json r2.json r3.json
Options:
**None.**
The ANALYZE command performs simple analysis on a FRESH or
JSON Resume document.

View File

@ -1,28 +1,29 @@
**build** | Generate resumes in supported output formats
**build** | Generate themed resumes in multiple formats
Usage:
hackmyresume BUILD <sources...> TO <targets...> [<options>]
**hackmyresume BUILD <resume> TO <target> [--theme]**
**[--pdf] [--no-escape] [--private]**
The BUILD command generates themed resumes and CVs in
multiple formats. Use it to create outbound resumes in
specific formats such HTML, MS Word, and PDF.
Parameters:
**<sources...>**
**<resume>**
Absolute or relative path(s) to one or more resumes in
FRESH or JSON format, separated by spaces. If multiple
resumes are specified, they will be merged into a
single resume prior to transformation.
Path to a FRESH or JRS resume (*.json) containing your
resume data. Multiple resumes may be specified.
hackmyresume BUILD resume.json output.all
hackmyresume BUILD base.json developer.json gamedev.json TO out/resume.all
If multiple resumes are specified, they will be merged
into a single resume prior to transformation.
**<targets...>**
**<target>**
Absolute or relative path(s) to one or more outbound
resume(s), separated by spaces. If multiple output
resumes are specified, all of them will be generated.
The desired format of each resume will be determined
from the file extension:
Path to the desired output resume. Multiple resumes
may be specified. The file extension will determine
the format.
.all Generate all supported formats
.html HTML 5
@ -33,27 +34,22 @@ Parameters:
.png PNG Image
.latex LaTeX
Note: not all formats are supported by all themes.
Check the theme's documentation for details.
Note: not all formats are supported by all themes!
Check the theme's documentation for details or use
the .all extension to build all available formats.
Options:
**--theme -t <theme-name-or-path>**
Relative or absolute path to a FRESH or JSON Resume
theme, or the name of a built-in theme.
As of 1.9.0, the following built-in themes are
provided: basis, modern, positive, compact, awesome.
Path to a FRESH or JSON Resume theme OR the name of a
built-in theme. Valid theme names are 'modern',
'positive', 'compact', 'awesome', and 'basis'.
**--pdf -p <engine>**
Specify the PDF engine to use. Legal values are:
- none: Don't generate a PDF.
- wkhtmltopdf: Use the wkhtmltopdf PDF engine.
- phantom: use the PhantomJS PDF engine.
- weazyprint: use the WeazyPrint PDF engine.
Specify the PDF engine to use. Legal values are
'none', 'wkhtmltopdf', 'phantom', or 'weasyprint'.
**--no-escape**
@ -64,6 +60,10 @@ Options:
Include resume fields marked as private.
The BUILD command generates themed resumes and CVs in
multiple formats from a single source of truth in the form
of a FRESH or JSON Resume document.
Notes:
The BUILD command can be run against multiple source as well
as multiple target resumes. If multiple source resumes are
provided, they will be merged into a single source resume
before generation. If multiple output resumes are provided,
each will be generated in turn.

View File

@ -2,20 +2,22 @@
Usage:
hackmyresume CONVERT <sources...> TO <targets...> [<options>]
**hackmyresume CONVERT <resume> TO <target> [--format]**
The CONVERT command converts one or more resume documents
between the FRESH Resume Schema and JSON Resume formats.
Parameters:
**<sources...>**
**<resume>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents (*.json), separated by spaces.
Path to a FRESH or JRS resume. Multiple resumes can be
specified.
**<targets...>**
**<targets>**
The desired absolute or relative path(s) of the newly
converted resume(s). HackMyResume will create the
converted resume(s) here.
The path of the converted resume. Multiple resumes can
be specified, one per provided input resume.
Options:
@ -29,6 +31,3 @@ Options:
will be inferred from the source resume's format. If
the source format is FRESH, the destination format
will be JSON Resume, and vice-versa.
The CONVERT command converts one or more resume documents
between FRESH and JSON Resume formats.

View File

@ -2,7 +2,10 @@
Usage:
hackmyresume HELP <command>
**hackmyresume HELP [<command>]**
The HELP command displays help information for a specific
HackMyResume command, including the HELP command itself.
Parameters:
@ -18,6 +21,3 @@ Parameters:
Options:
**None.**
The HELP command displays help information for a specific
HackMyResume command, including the HELP command itself.

22
dist/cli/help/new.txt vendored
View File

@ -2,16 +2,23 @@
Usage:
hackmyresume NEW <resumes...> [<options>]
**hackmyresume NEW <fileName> [--format]**
The NEW command generates a new resume document in FRESH
or JSON Resume format. This document can serve as an
official source of truth for your resume and career data
as well an input to tools like HackMyResume.
Parameters:
**<resumes...>**
**<fileName>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents (*.json), separated by spaces:
The filename (relative or absolute path) of the resume
to be created. Multiple resume paths can be specified,
and each will be created in turn.
hackmyresume NEW r1.json r2.json r3.json
hackmyresume NEW resume.json
hackmyresume NEW r1.json foo/r2.json ../r3.json
Options:
@ -20,8 +27,3 @@ Options:
The desired format for the new resume(s). Valid values
are 'FRESH', 'JRS', or, to target the latest edge
version of the JSON Resume Schema, 'JRS@1'.
The NEW command generates one or more new resumes in FRESH
or JSON Resume format. This document can serve as a source
of truth for resume and career data and an input to tools
like HackMyResume or resume-cli.

View File

@ -2,29 +2,30 @@
Usage:
hackmyresume PEEK <resumes> <path> [<options>]
**hackmyresume PEEK <resume> <at>**
The PEEK command displays a specific piece or part of the
resume without requiring the resume to be opened in an
editor.
Parameters:
**<resumes>**
**<resume>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents to be validated. Multiple resumes
can be specified, separated by spaces:
Path to a FRESH or JRS resume. Multiple resumes can be
specified, separated by spaces.
hackmyresume PEEK r1.json r2.json r3.json
hackmyresume PEEK r1.json r2.json r3.json "employment.history[2]"
**<path>**
**<at>**
The part of the resume to peek at.
The resume property or field to be displayed. Can be
any valid resume path, for example:
education[0]
info.name
employment.history[3].start
Options:
**--assert -a**
Tell HackMyResume to return a non-zero process exit
code if a resume fails to validate.
The PEEK command displays a specific piece or part of the
resume without requiring the resume to be opened in an
editor.
**None.**

96
dist/cli/help/use.txt vendored
View File

@ -1,48 +1,70 @@
**HackMyResume** | A Swiss Army knife for resumes and CVs.
**HackMyResume** | A Swiss Army knife for resumes and CVs
Usage:
hackmyresume <command> <params> [<options>]
**hackmyresume [--version] [--help] [--silent] [--debug]**
**[--options] [--no-colors] <command> [<args>]**
Available commands (type "hackmyresume help COMMAND" for details):
Commands: (type "hackmyresume help COMMAND" for details)
**BUILD** Build your resume to the destination format(s).
**ANALYZE** Analyze your resume for keywords, gaps, and metrics.
**VALIDATE** Validate your resume for errors and typos.
**NEW** Create a new resume in FRESH or JSON Resume format.
**CONVERT** Convert your resume between FRESH and JSON Resume.
**PEEK** View a specific field or element on your resume.
**HELP** View help on a specific HackMyResume command.
**BUILD** Build your resume to the destination format(s).
**ANALYZE** Analyze your resume for keywords, gaps, and metrics.
**VALIDATE** Validate your resume for errors and typos.
**NEW** Create a new resume in FRESH or JSON Resume format.
**CONVERT** Convert your resume between FRESH and JSON Resume.
**PEEK** View a specific field or element on your resume.
**HELP** View help on a specific HackMyResume command.
Available options:
Common Tasks:
**--options -o** Load options from an external JSON file.
**--debug -d** Emit extended debugging info.
**--assert -a** Treat resume validation warnings as errors.
**--no-colors** Disable terminal colors.
**--tips** Display theme messages and tips.
**--help -h** Display help documentation.
**--version -v** Display the current version.
Generate a resume in a specific format (HTML, Word, PDF, etc.)
Examples:
**hackmyresume build rez.json to out/rez.html**
**hackmyresume build rez.json to out/rez.doc**
**hackmyresume build rez.json to out/rez.pdf**
**hackmyresume build rez.json to out/rez.txt**
**hackmyresume build rez.json to out/rez.md**
**hackmyresume build rez.json to out/rez.png**
**hackmyresume build rez.json to out/rez.tex**
hackmyresume BUILD resume.json TO out/resume.all --theme modern
hackmyresume ANALYZE resume.json
hackmyresume NEW my-new-resume.json --format JRS
hackmyresume CONVERT resume-fresh.json TO resume-jrs.json
hackmyresume VALIDATE resume.json
hackmyresume PEEK resume.json employment[2].summary
Build a resume to ALL available formats:
Tips:
**hackmyresume build rez.json to out/rez.all**
- You can specify multiple sources and/or targets for all commands.
- You can use any FRESH or JSON Resume theme with HackMyResume.
- Specify a file extension of .all to generate your resume to all
available formats supported by the theme. (BUILD command.)
- The --theme parameter can specify either the name of a preinstalled
theme, or the path to a local FRESH or JSON Resume theme.
- Visit https://www.npmjs.com/search?q=jsonresume-theme for a full
listing of all available JSON Resume themes.
- Visit https://github.com/fresh-standard/fresh-themes for a complete
listing of all available FRESH themes.
- Report bugs to https://githut.com/hacksalot/HackMyResume/issues.
Build a resume with a specific theme:
**hackmyresume build rez.json to out/rez.all -t themeName**
Create a new empty resume:
**hackmyresume new rez.json**
Convert a resume between FRESH and JRS formats:
**hackmyresume convert rez.json converted.json**
Analyze a resume for important metrics
**hackmyresume analyze rez.json**
Find more resume themes:
**https://www.npmjs.com/search?q=jsonresume-theme**
**https://www.npmjs.com/search?q=fresh-theme**
**https://github.com/fresh-standard/fresh-themes**
Validate a resume's structure and syntax:
**hackmyresume validate resume.json**
View help on a specific command:
**hackmyresume help [build|convert|new|analyze|validate|peek|help]**
Submit a bug or request:
**https://githut.com/hacksalot/HackMyResume/issues**
HackMyResume is free and open source software published
under the MIT license. For more information, visit the
HackMyResume website or GitHub project page.

View File

@ -1,18 +1,21 @@
**validate** - Validate a resume for correctness
**validate** | Validate a resume for correctness
Usage:
hackmyresume VALIDATE <resume> [<options>]
hackmyresume VALIDATE <resumes...> [<options>]
**hackmyresume VALIDATE <resume> [--assert]**
The VALIDATE command validates a FRESH or JRS document
against its governing schema, verifying that the resume
is correctly structured and formatted.
Parameters:
**<resume(s)>**
**<resume>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents to be validated. Multiple resumes
can be specified, separated by spaces:
Path to a FRESH or JRS resume. Multiple resumes can be
specified.
hackmyresume ANALYZE resume.json
hackmyresume ANALYZE r1.json r2.json r3.json
Options:
@ -21,7 +24,3 @@ Options:
Tell HackMyResume to return a non-zero process exit
code if a resume fails to validate.
The VALIDATE command validates a FRESH or JSON Resume
document against its governing schema, verifying that the
resume is correctly structured.

4
dist/cli/main.js vendored
View File

@ -151,7 +151,8 @@ Definition of the `main` function.
Command.prototype.missingArgument = function(name) {
if (this.name() !== 'help') {
_err.err({
fluenterror: this.name() !== 'new' ? HMSTATUS.resumeNotFound : HMSTATUS.createNameMissing
verb: this.name(),
fluenterror: HMSTATUS.resumeNotFound
}, true);
}
};
@ -328,6 +329,7 @@ Definition of the `main` function.
if (params.length === 0) {
throw {
fluenterror: HMSTATUS.resumeNotFound,
verb: this.name(),
quit: true
};
}

View File

@ -110,17 +110,19 @@ assembleError = ( ex ) ->
quit = false
when HMSTATUS.resumeNotFound
msg = M2C( this.msgs.resumeNotFound.msg, 'yellow' );
#msg = M2C( this.msgs.resumeNotFound.msg, 'yellow' );
msg += M2C(FS.readFileSync(
PATH.resolve(__dirname, 'help/' + ex.verb + '.txt'), 'utf8' ), 'white', 'yellow')
when HMSTATUS.missingCommand
msg = M2C( this.msgs.missingCommand.msg + " (", 'yellow');
msg += Object.keys( FCMD.verbs ).map( (v, idx, ar) ->
return ( if idx == ar.length - 1 then chalk.yellow('or ') else '') +
chalk.yellow.bold(v.toUpperCase());
).join( chalk.yellow(', ')) + chalk.yellow(").\n\n");
# msg = M2C( this.msgs.missingCommand.msg + " (", 'yellow');
# msg += Object.keys( FCMD.verbs ).map( (v, idx, ar) ->
# return ( if idx == ar.length - 1 then chalk.yellow('or ') else '') +
# chalk.yellow.bold(v.toUpperCase());
# ).join( chalk.yellow(', ')) + chalk.yellow(").\n\n");
msg += chalk.gray(FS.readFileSync(
PATH.resolve(__dirname, '../cli/use.txt'), 'utf8' ))
msg += M2C(FS.readFileSync(
PATH.resolve(__dirname, 'help/use.txt'), 'utf8' ), 'white', 'yellow')
when HMSTATUS.invalidCommand
msg = printf( M2C( this.msgs.invalidCommand.msg, 'yellow'), ex.attempted )

View File

@ -1,23 +1,25 @@
**analyze** | Analyze a FRESH resume document for statistics
**analyze** | Analyze a resume for statistical insight
Usage:
hackmyresume ANALYZE <resume> [<options>]
hackmyresume ANALYZE <resumes...> [<options>]
**hackmyresume ANALYZE <resume>**
The ANALYZE command evaluates the specified resume(s) for
coverage, duration, gaps, keywords, and other metrics.
This command can be run against multiple resumes. Each
will be analyzed in turn.
Parameters:
**<resume/resumes>**
**<resume>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents to be analyzed. Multiple resumes
can be specified, separated by spaces:
Path to a FRESH or JRS resume. Multiple resumes can be
specified, separated by spaces.
hackmyresume ANALYZE r1.json r2.json r3.json
hackmyresume ANALYZE resume.json
hackmyresume ANALYZE r1.json r2.json r3.json
Options:
**None.**
The ANALYZE command performs simple analysis on a FRESH or
JSON Resume document.

View File

@ -1,28 +1,29 @@
**build** | Generate resumes in supported output formats
**build** | Generate themed resumes in multiple formats
Usage:
hackmyresume BUILD <sources...> TO <targets...> [<options>]
**hackmyresume BUILD <resume> TO <target> [--theme]**
**[--pdf] [--no-escape] [--private]**
The BUILD command generates themed resumes and CVs in
multiple formats. Use it to create outbound resumes in
specific formats such HTML, MS Word, and PDF.
Parameters:
**<sources...>**
**<resume>**
Absolute or relative path(s) to one or more resumes in
FRESH or JSON format, separated by spaces. If multiple
resumes are specified, they will be merged into a
single resume prior to transformation.
Path to a FRESH or JRS resume (*.json) containing your
resume data. Multiple resumes may be specified.
hackmyresume BUILD resume.json output.all
hackmyresume BUILD base.json developer.json gamedev.json TO out/resume.all
If multiple resumes are specified, they will be merged
into a single resume prior to transformation.
**<targets...>**
**<target>**
Absolute or relative path(s) to one or more outbound
resume(s), separated by spaces. If multiple output
resumes are specified, all of them will be generated.
The desired format of each resume will be determined
from the file extension:
Path to the desired output resume. Multiple resumes
may be specified. The file extension will determine
the format.
.all Generate all supported formats
.html HTML 5
@ -33,27 +34,22 @@ Parameters:
.png PNG Image
.latex LaTeX
Note: not all formats are supported by all themes.
Check the theme's documentation for details.
Note: not all formats are supported by all themes!
Check the theme's documentation for details or use
the .all extension to build all available formats.
Options:
**--theme -t <theme-name-or-path>**
Relative or absolute path to a FRESH or JSON Resume
theme, or the name of a built-in theme.
As of 1.9.0, the following built-in themes are
provided: basis, modern, positive, compact, awesome.
Path to a FRESH or JSON Resume theme OR the name of a
built-in theme. Valid theme names are 'modern',
'positive', 'compact', 'awesome', and 'basis'.
**--pdf -p <engine>**
Specify the PDF engine to use. Legal values are:
- none: Don't generate a PDF.
- wkhtmltopdf: Use the wkhtmltopdf PDF engine.
- phantom: use the PhantomJS PDF engine.
- weazyprint: use the WeazyPrint PDF engine.
Specify the PDF engine to use. Legal values are
'none', 'wkhtmltopdf', 'phantom', or 'weasyprint'.
**--no-escape**
@ -64,6 +60,10 @@ Options:
Include resume fields marked as private.
The BUILD command generates themed resumes and CVs in
multiple formats from a single source of truth in the form
of a FRESH or JSON Resume document.
Notes:
The BUILD command can be run against multiple source as well
as multiple target resumes. If multiple source resumes are
provided, they will be merged into a single source resume
before generation. If multiple output resumes are provided,
each will be generated in turn.

View File

@ -2,20 +2,22 @@
Usage:
hackmyresume CONVERT <sources...> TO <targets...> [<options>]
**hackmyresume CONVERT <resume> TO <target> [--format]**
The CONVERT command converts one or more resume documents
between the FRESH Resume Schema and JSON Resume formats.
Parameters:
**<sources...>**
**<resume>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents (*.json), separated by spaces.
Path to a FRESH or JRS resume. Multiple resumes can be
specified.
**<targets...>**
**<targets>**
The desired absolute or relative path(s) of the newly
converted resume(s). HackMyResume will create the
converted resume(s) here.
The path of the converted resume. Multiple resumes can
be specified, one per provided input resume.
Options:
@ -29,6 +31,3 @@ Options:
will be inferred from the source resume's format. If
the source format is FRESH, the destination format
will be JSON Resume, and vice-versa.
The CONVERT command converts one or more resume documents
between FRESH and JSON Resume formats.

View File

@ -2,7 +2,10 @@
Usage:
hackmyresume HELP <command>
**hackmyresume HELP [<command>]**
The HELP command displays help information for a specific
HackMyResume command, including the HELP command itself.
Parameters:
@ -18,6 +21,3 @@ Parameters:
Options:
**None.**
The HELP command displays help information for a specific
HackMyResume command, including the HELP command itself.

View File

@ -2,16 +2,23 @@
Usage:
hackmyresume NEW <resumes...> [<options>]
**hackmyresume NEW <fileName> [--format]**
The NEW command generates a new resume document in FRESH
or JSON Resume format. This document can serve as an
official source of truth for your resume and career data
as well an input to tools like HackMyResume.
Parameters:
**<resumes...>**
**<fileName>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents (*.json), separated by spaces:
The filename (relative or absolute path) of the resume
to be created. Multiple resume paths can be specified,
and each will be created in turn.
hackmyresume NEW r1.json r2.json r3.json
hackmyresume NEW resume.json
hackmyresume NEW r1.json foo/r2.json ../r3.json
Options:
@ -20,8 +27,3 @@ Options:
The desired format for the new resume(s). Valid values
are 'FRESH', 'JRS', or, to target the latest edge
version of the JSON Resume Schema, 'JRS@1'.
The NEW command generates one or more new resumes in FRESH
or JSON Resume format. This document can serve as a source
of truth for resume and career data and an input to tools
like HackMyResume or resume-cli.

View File

@ -2,29 +2,30 @@
Usage:
hackmyresume PEEK <resumes> <path> [<options>]
**hackmyresume PEEK <resume> <at>**
The PEEK command displays a specific piece or part of the
resume without requiring the resume to be opened in an
editor.
Parameters:
**<resumes>**
**<resume>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents to be validated. Multiple resumes
can be specified, separated by spaces:
Path to a FRESH or JRS resume. Multiple resumes can be
specified, separated by spaces.
hackmyresume PEEK r1.json r2.json r3.json
hackmyresume PEEK r1.json r2.json r3.json "employment.history[2]"
**<path>**
**<at>**
The part of the resume to peek at.
The resume property or field to be displayed. Can be
any valid resume path, for example:
education[0]
info.name
employment.history[3].start
Options:
**--assert -a**
Tell HackMyResume to return a non-zero process exit
code if a resume fails to validate.
The PEEK command displays a specific piece or part of the
resume without requiring the resume to be opened in an
editor.
**None.**

View File

@ -1,48 +1,70 @@
**HackMyResume** | A Swiss Army knife for resumes and CVs.
**HackMyResume** | A Swiss Army knife for resumes and CVs
Usage:
hackmyresume <command> <params> [<options>]
**hackmyresume [--version] [--help] [--silent] [--debug]**
**[--options] [--no-colors] <command> [<args>]**
Available commands (type "hackmyresume help COMMAND" for details):
Commands: (type "hackmyresume help COMMAND" for details)
**BUILD** Build your resume to the destination format(s).
**ANALYZE** Analyze your resume for keywords, gaps, and metrics.
**VALIDATE** Validate your resume for errors and typos.
**NEW** Create a new resume in FRESH or JSON Resume format.
**CONVERT** Convert your resume between FRESH and JSON Resume.
**PEEK** View a specific field or element on your resume.
**HELP** View help on a specific HackMyResume command.
**BUILD** Build your resume to the destination format(s).
**ANALYZE** Analyze your resume for keywords, gaps, and metrics.
**VALIDATE** Validate your resume for errors and typos.
**NEW** Create a new resume in FRESH or JSON Resume format.
**CONVERT** Convert your resume between FRESH and JSON Resume.
**PEEK** View a specific field or element on your resume.
**HELP** View help on a specific HackMyResume command.
Available options:
Common Tasks:
**--options -o** Load options from an external JSON file.
**--debug -d** Emit extended debugging info.
**--assert -a** Treat resume validation warnings as errors.
**--no-colors** Disable terminal colors.
**--tips** Display theme messages and tips.
**--help -h** Display help documentation.
**--version -v** Display the current version.
Generate a resume in a specific format (HTML, Word, PDF, etc.)
Examples:
**hackmyresume build rez.json to out/rez.html**
**hackmyresume build rez.json to out/rez.doc**
**hackmyresume build rez.json to out/rez.pdf**
**hackmyresume build rez.json to out/rez.txt**
**hackmyresume build rez.json to out/rez.md**
**hackmyresume build rez.json to out/rez.png**
**hackmyresume build rez.json to out/rez.tex**
hackmyresume BUILD resume.json TO out/resume.all --theme modern
hackmyresume ANALYZE resume.json
hackmyresume NEW my-new-resume.json --format JRS
hackmyresume CONVERT resume-fresh.json TO resume-jrs.json
hackmyresume VALIDATE resume.json
hackmyresume PEEK resume.json employment[2].summary
Build a resume to ALL available formats:
Tips:
**hackmyresume build rez.json to out/rez.all**
- You can specify multiple sources and/or targets for all commands.
- You can use any FRESH or JSON Resume theme with HackMyResume.
- Specify a file extension of .all to generate your resume to all
available formats supported by the theme. (BUILD command.)
- The --theme parameter can specify either the name of a preinstalled
theme, or the path to a local FRESH or JSON Resume theme.
- Visit https://www.npmjs.com/search?q=jsonresume-theme for a full
listing of all available JSON Resume themes.
- Visit https://github.com/fresh-standard/fresh-themes for a complete
listing of all available FRESH themes.
- Report bugs to https://githut.com/hacksalot/HackMyResume/issues.
Build a resume with a specific theme:
**hackmyresume build rez.json to out/rez.all -t themeName**
Create a new empty resume:
**hackmyresume new rez.json**
Convert a resume between FRESH and JRS formats:
**hackmyresume convert rez.json converted.json**
Analyze a resume for important metrics
**hackmyresume analyze rez.json**
Find more resume themes:
**https://www.npmjs.com/search?q=jsonresume-theme**
**https://www.npmjs.com/search?q=fresh-theme**
**https://github.com/fresh-standard/fresh-themes**
Validate a resume's structure and syntax:
**hackmyresume validate resume.json**
View help on a specific command:
**hackmyresume help [build|convert|new|analyze|validate|peek|help]**
Submit a bug or request:
**https://githut.com/hacksalot/HackMyResume/issues**
HackMyResume is free and open source software published
under the MIT license. For more information, visit the
HackMyResume website or GitHub project page.

View File

@ -1,18 +1,21 @@
**validate** - Validate a resume for correctness
**validate** | Validate a resume for correctness
Usage:
hackmyresume VALIDATE <resume> [<options>]
hackmyresume VALIDATE <resumes...> [<options>]
**hackmyresume VALIDATE <resume> [--assert]**
The VALIDATE command validates a FRESH or JRS document
against its governing schema, verifying that the resume
is correctly structured and formatted.
Parameters:
**<resume(s)>**
**<resume>**
Absolute or relative path(s) to one or more FRESH or
JSON Resume documents to be validated. Multiple resumes
can be specified, separated by spaces:
Path to a FRESH or JRS resume. Multiple resumes can be
specified.
hackmyresume ANALYZE resume.json
hackmyresume ANALYZE r1.json r2.json r3.json
Options:
@ -21,7 +24,3 @@ Options:
Tell HackMyResume to return a non-zero process exit
code if a resume fails to validate.
The VALIDATE command validates a FRESH or JSON Resume
document against its governing schema, verifying that the
resume is correctly structured.

View File

@ -191,10 +191,8 @@ initialize = ( ar, exitCallback ) ->
Command.prototype.missingArgument = (name) ->
if this.name() != 'help'
_err.err
fluenterror:
if this.name() != 'new'
then HMSTATUS.resumeNotFound
else HMSTATUS.createNameMissing
verb: @name()
fluenterror: HMSTATUS.resumeNotFound
, true
return
@ -363,7 +361,8 @@ splitSrcDest = () ->
params = this.parent.args.filter((j) -> return String.is(j) )
if params.length == 0
throw { fluenterror: HMSTATUS.resumeNotFound, quit: true }
#tmpName = @name()
throw { fluenterror: HMSTATUS.resumeNotFound, verb: @name(), quit: true }
# Find the TO keyword, if any
splitAt = _.findIndex( params, (p) -> return p.toLowerCase() == 'to'; )

View File

@ -4,7 +4,7 @@
4|--debug
4|-d
5|notacommand
8|new
3|new
0|new test/sandbox/cli-test/new-empty-resume.auto.json
0|new test/sandbox/cli-test/new-empty-resume.jrs.json -f jrs
0|new test/sandbox/cli-test/new-empty-resume.fresh.json -f fresh

View File

@ -84,19 +84,23 @@ describe('Testing Ouput interface', function () {
var title = '*** HackMyResume v' + PKG.version + ' ***';
var feedMe = 'Please feed me a resume in FRESH or JSON Resume format.';
var manPage = FS.readFileSync( PATH.resolve( __dirname, '../../src/cli/use.txt' ), 'utf8');
var manPage = FS.readFileSync( PATH.resolve( __dirname, '../../src/cli/help/use.txt' ), 'utf8').replace(/\*\*/g, '');
var manPages = { };
['build','new','convert','analyze','validate','peek'].forEach( function(verb) {
manPages[verb] = FS.readFileSync( PATH.resolve( __dirname, '../../src/cli/help/' + verb + '.txt' ), 'utf8').replace(/\*\*/g, '');
});
run('HMR should output a help string when no command is specified',
[], [ title, 'Please give me a command (BUILD, ANALYZE, VALIDATE, CONVERT, NEW, or PEEK).' ]);
// run('HMR should output a help string when no command is specified',
// [], [ title, 'Please give me a command (BUILD, ANALYZE, VALIDATE, CONVERT, NEW, or PEEK).' ]);
run('BUILD should output a tip when no source is specified',
['build'], [ title, feedMe ]);
run('BUILD should output a help message when no source is specified',
['build'], [ title, manPages.build ]);
run('VALIDATE should output a tip when no source is specified',
['validate'], [ title, feedMe ]);
run('VALIDATE should output a help message when no source is specified',
['validate'], [ title, manPages.validate ]);
run('ANALYZE should output a tip when no source is specified',
['analyze'], [ title, feedMe ]);
run('ANALYZE should output a help message when no source is specified',
['analyze'], [ title, manPages.analyze ]);
run('BUILD should display an error on a broken resume',
['build',
@ -104,11 +108,11 @@ describe('Testing Ouput interface', function () {
'-t', 'modern'
], [ title, 'Error: Invalid or corrupt JSON on line' ]);
run('CONVERT should output a tip when no source is specified',
['convert'], [ title, feedMe ]);
run('CONVERT should output a help message when no source is specified',
['convert'], [ title, manPages.convert ]);
run('NEW should output a tip when no source is specified',
['new'], [ title, 'Please specify the filename of the resume to create.' ]);
run('NEW should output a help message when no source is specified',
['new'], [ title, manPages.new ]);
// This will cause the HELP doc to be emitted, followed by an "unknown option --help"
// error in the log, based on the way we're calling into HMR. As long as the test