mirror of
				https://github.com/JuanCanham/HackMyResume.git
				synced 2025-10-31 13:17:26 +00:00 
			
		
		
		
	feat: improve help behavior
This commit is contained in:
		| @@ -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 ) | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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.** | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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'; ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user