Skip to content
/ chptr Public

Command Line tool to handle separate Markdown files with metadata notations as a single writing project

Notifications You must be signed in to change notification settings

spikying/chptr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oclif-hello-world

oclif example Hello World CLI

oclif CircleCI GitHub license

Usage

$ npm install -g chptr
$ chptr COMMAND
running command...
$ chptr (--version)
chptr/1.0.0 darwin-arm64 node-v20.10.0
$ chptr --help [COMMAND]
USAGE
  $ chptr COMMAND
...

Commands

chptr add [NAME] [NUMBER]

Adds a file or set of files as a new chapter, locally and in repository

USAGE
  $ chptr add [NAME] [NUMBER] [-c]

ARGUMENTS
  NAME    name of chapter to add
  NUMBER  [default: end] force this number to be used, if available.  AtNumbering will be determined by the presence or
          absence of @ sign.  Defaults to `end`.

FLAGS
  -c, --compact  Compact chapter numbers at the same time

DESCRIPTION
  Adds a file or set of files as a new chapter, locally and in repository

See code: src/commands/add.ts

chptr build

Takes all original Markdown files and outputs a single file without metadata and comments. Handles these output formats: md, pdf, docx, html, epub, tex. Gives some insight into writing rate.

USAGE
  $ chptr build [-c] [-d] [-s] [-w yes|no|overwrite] [-P | [-D | ]] [-t md|pdf|docx|html|epub|tex|all] [-i]

FLAGS
  -D, --outputToPreProd             Keep paragraph numbers, but clean markup as if doing an output to Prod.
  -P, --outputToProd                Remove paragraph numbers, clean markup in output and remove chapter titles.  When
                                    false, adds summaries in output.
  -c, --compact                     Compact chapter numbers at the same time
  -d, --datetimestamp               adds datetime stamp before output filename
  -i, --withFullIntermediaryOutput  With full intermediary output as .md file
  -s, --save                        Commit to git at the same time.
  -t, --type=<option>...            filetype to export to.  Can be set multiple times.
                                    <options: md|pdf|docx|html|epub|tex|all>
  -w, --showWritingRate=<option>    [default: yes] Show word count per day.  Overwrite option recalculates it all from
                                    scratch.
                                    <options: yes|no|overwrite>

DESCRIPTION
  Takes all original Markdown files and outputs a single file without metadata and comments.  Handles these output
  formats: md, pdf, docx, html, epub, tex.  Gives some insight into writing rate.

ALIASES
  $ chptr compile

See code: src/commands/build/index.ts

chptr build compact

Only compacts numbers of files

USAGE
  $ chptr build compact [-s]

FLAGS
  -s, --save  Commit to git at the same time.

DESCRIPTION
  Only compacts numbers of files

See code: src/commands/build/compact.ts

chptr build metadata

Updates only metadata files

USAGE
  $ chptr build metadata [-c] [-d] [-s] [-w yes|no|overwrite]

FLAGS
  -c, --compact                   Compact chapter numbers at the same time
  -d, --datetimestamp             adds datetime stamp before output filename
  -s, --save                      Commit to git at the same time.
  -w, --showWritingRate=<option>  [default: yes] Show word count per day.  Overwrite option recalculates it all from
                                  scratch.
                                  <options: yes|no|overwrite>

DESCRIPTION
  Updates only metadata files

See code: src/commands/build/metadata.ts

chptr commit [NUMBERORFILENAME]

Parse modified text files, adjust sentence and paragraph endings, and commit files to repository.

USAGE
  $ chptr commit [NUMBERORFILENAME] [-c] [-e | -m <value>] [-n <value> | -f <value>] [-t ]

ARGUMENTS
  NUMBERORFILENAME  Chamber number to save, or tracked filename or filename pattern to save to repository

FLAGS
  -c, --compact           Compact chapter numbers at the same time
  -e, --empty             No manual message in commit
  -f, --filename=<value>  Tracked filename or filename pattern to filter which files to stage before saving to
                          repository
  -m, --message=<value>   Message to use in commit to repository
  -n, --number=<value>    Chapter number to filter which files to stage before saving to repository
  -t, --track             Force tracking of file if not already in repository

DESCRIPTION
  Parse modified text files, adjust sentence and paragraph endings, and commit files to repository.

ALIASES
  $ chptr commit

chptr compile

Takes all original Markdown files and outputs a single file without metadata and comments. Handles these output formats: md, pdf, docx, html, epub, tex. Gives some insight into writing rate.

USAGE
  $ chptr compile [-c] [-d] [-s] [-w yes|no|overwrite] [-P | [-D | ]] [-t md|pdf|docx|html|epub|tex|all] [-i]

FLAGS
  -D, --outputToPreProd             Keep paragraph numbers, but clean markup as if doing an output to Prod.
  -P, --outputToProd                Remove paragraph numbers, clean markup in output and remove chapter titles.  When
                                    false, adds summaries in output.
  -c, --compact                     Compact chapter numbers at the same time
  -d, --datetimestamp               adds datetime stamp before output filename
  -i, --withFullIntermediaryOutput  With full intermediary output as .md file
  -s, --save                        Commit to git at the same time.
  -t, --type=<option>...            filetype to export to.  Can be set multiple times.
                                    <options: md|pdf|docx|html|epub|tex|all>
  -w, --showWritingRate=<option>    [default: yes] Show word count per day.  Overwrite option recalculates it all from
                                    scratch.
                                    <options: yes|no|overwrite>

DESCRIPTION
  Takes all original Markdown files and outputs a single file without metadata and comments.  Handles these output
  formats: md, pdf, docx, html, epub, tex.  Gives some insight into writing rate.

ALIASES
  $ chptr compile

chptr del [NAME]

Delete a chapter or tracked file locally and in the repository

USAGE
  $ chptr del [NAME] [-c] [-s]

ARGUMENTS
  NAME  chapter number or filename to delete

FLAGS
  -c, --compact  Compact chapter numbers at the same time
  -s, --save     Commit to git at the same time.

DESCRIPTION
  Delete a chapter or tracked file locally and in the repository

ALIASES
  $ chptr del

chptr delete [NAME]

Delete a chapter or tracked file locally and in the repository

USAGE
  $ chptr delete [NAME] [-c] [-s]

ARGUMENTS
  NAME  chapter number or filename to delete

FLAGS
  -c, --compact  Compact chapter numbers at the same time
  -s, --save     Commit to git at the same time.

DESCRIPTION
  Delete a chapter or tracked file locally and in the repository

ALIASES
  $ chptr del

See code: src/commands/delete.ts

chptr edit [CHAPTERIDS]

Adjust sentence and paragraph endings to allow for easier editing. Commit changes with SAVE command.

USAGE
  $ chptr edit [CHAPTERIDS] [-t all|summary|chapter]

ARGUMENTS
  CHAPTERIDS  Chapter number(s) to modify, comma-separated or dash-separated for a range.

FLAGS
  -t, --type=<option>  [default: all] Edit either chapter file, summary file or all.
                       <options: all|summary|chapter>

DESCRIPTION
  Adjust sentence and paragraph endings to allow for easier editing.  Commit changes with SAVE command.

ALIASES
  $ chptr modify
  $ chptr mod

See code: src/commands/edit.ts

chptr hello PERSON

Say hello

USAGE
  $ chptr hello PERSON -f <value>

ARGUMENTS
  PERSON  Person to say hello to

FLAGS
  -f, --from=<value>  (required) Who is saying hello

DESCRIPTION
  Say hello

EXAMPLES
  $ oex hello friend --from oclif
  hello friend from oclif! (./src/commands/hello/index.ts)

See code: src/commands/hello/index.ts

chptr hello world

Say hello world

USAGE
  $ chptr hello world

DESCRIPTION
  Say hello world

EXAMPLES
  $ chptr hello world
  hello world! (./src/commands/hello/world.ts)

See code: src/commands/hello/world.ts

chptr help [COMMANDS]

Display help for chptr.

USAGE
  $ chptr help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for chptr.

See code: @oclif/plugin-help

chptr init [NAME]

Generates basic config files for a new novel project

USAGE
  $ chptr init [NAME] [-a <value>] [-d /|chapters/|chapters/number/|] [-e <value>] [-f <value>] [-r
    <value>] [-l <value>] [-s <value>]

ARGUMENTS
  NAME  Name of project

FLAGS
  -a, --author=<value>               Name of author of project
  -d, --directorystructure=<option>  Directory structure initially written in config file
                                     <options: /|chapters/|chapters/number/|>
  -e, --email=<value>                Email of author of project
  -f, --force=<value>                [default: false] Overwrite config files if they exist.  Specify a filename to
                                     overwrite only one; write `true` to overwrite all.
  -l, --language=<value>             Language of project
  -r, --gitRemote=<value>            Git address of remote repository.
  -s, --style=<value>                Config files in JSON5 or YAML?

DESCRIPTION
  Generates basic config files for a new novel project

ALIASES
  $ chptr setup

See code: src/commands/init.ts

chptr mod [CHAPTERIDS]

Adjust sentence and paragraph endings to allow for easier editing. Commit changes with SAVE command.

USAGE
  $ chptr mod [CHAPTERIDS] [-t all|summary|chapter]

ARGUMENTS
  CHAPTERIDS  Chapter number(s) to modify, comma-separated or dash-separated for a range.

FLAGS
  -t, --type=<option>  [default: all] Edit either chapter file, summary file or all.
                       <options: all|summary|chapter>

DESCRIPTION
  Adjust sentence and paragraph endings to allow for easier editing.  Commit changes with SAVE command.

ALIASES
  $ chptr modify
  $ chptr mod

chptr modify [CHAPTERIDS]

Adjust sentence and paragraph endings to allow for easier editing. Commit changes with SAVE command.

USAGE
  $ chptr modify [CHAPTERIDS] [-t all|summary|chapter]

ARGUMENTS
  CHAPTERIDS  Chapter number(s) to modify, comma-separated or dash-separated for a range.

FLAGS
  -t, --type=<option>  [default: all] Edit either chapter file, summary file or all.
                       <options: all|summary|chapter>

DESCRIPTION
  Adjust sentence and paragraph endings to allow for easier editing.  Commit changes with SAVE command.

ALIASES
  $ chptr modify
  $ chptr mod

chptr move [DESTINATIONID] [ORIGINID]

Takes a chapter and modifies its index number to fit another ordering place

USAGE
  $ chptr move [DESTINATIONID] [ORIGINID] [-c] [-s]

ARGUMENTS
  DESTINATIONID  Number it will become (write `end` or `@end`to put at the end of each stack).
  ORIGINID       Chapter number to move

FLAGS
  -c, --compact  Compact chapter numbers at the same time
  -s, --save     Commit to git at the same time.

DESCRIPTION
  Takes a chapter and modifies its index number to fit another ordering place

ALIASES
  $ chptr move

chptr plugins

List installed plugins.

USAGE
  $ chptr plugins [--json] [--core]

FLAGS
  --core  Show core plugins.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List installed plugins.

EXAMPLES
  $ chptr plugins

See code: @oclif/plugin-plugins

chptr plugins:install PLUGIN...

Installs a plugin into the CLI.

USAGE
  $ chptr plugins:install PLUGIN...

ARGUMENTS
  PLUGIN  Plugin to install.

FLAGS
  -f, --force    Run yarn install with force flag.
  -h, --help     Show CLI help.
  -s, --silent   Silences yarn output.
  -v, --verbose  Show verbose yarn output.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Installs a plugin into the CLI.
  Can be installed from npm or a git url.

  Installation of a user-installed plugin will override a core plugin.

  e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
  will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
  the CLI without the need to patch and update the whole CLI.


ALIASES
  $ chptr plugins add

EXAMPLES
  $ chptr plugins add myplugin 

  $ chptr plugins add https://github.com/someuser/someplugin

  $ chptr plugins add someuser/someplugin

chptr plugins:inspect PLUGIN...

Displays installation properties of a plugin.

USAGE
  $ chptr plugins:inspect PLUGIN...

ARGUMENTS
  PLUGIN  [default: .] Plugin to inspect.

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Displays installation properties of a plugin.

EXAMPLES
  $ chptr plugins inspect myplugin

See code: @oclif/plugin-plugins

chptr plugins:install PLUGIN...

Installs a plugin into the CLI.

USAGE
  $ chptr plugins:install PLUGIN...

ARGUMENTS
  PLUGIN  Plugin to install.

FLAGS
  -f, --force    Run yarn install with force flag.
  -h, --help     Show CLI help.
  -s, --silent   Silences yarn output.
  -v, --verbose  Show verbose yarn output.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Installs a plugin into the CLI.
  Can be installed from npm or a git url.

  Installation of a user-installed plugin will override a core plugin.

  e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
  will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
  the CLI without the need to patch and update the whole CLI.


ALIASES
  $ chptr plugins add

EXAMPLES
  $ chptr plugins install myplugin 

  $ chptr plugins install https://github.com/someuser/someplugin

  $ chptr plugins install someuser/someplugin

See code: @oclif/plugin-plugins

chptr plugins:link PLUGIN

Links a plugin into the CLI for development.

USAGE
  $ chptr plugins:link PLUGIN

ARGUMENTS
  PATH  [default: .] path to plugin

FLAGS
  -h, --help      Show CLI help.
  -v, --verbose
  --[no-]install  Install dependencies after linking the plugin.

DESCRIPTION
  Links a plugin into the CLI for development.
  Installation of a linked plugin will override a user-installed or core plugin.

  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
  command will override the user-installed or core plugin implementation. This is useful for development work.


EXAMPLES
  $ chptr plugins link myplugin

See code: @oclif/plugin-plugins

chptr plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ chptr plugins:uninstall PLUGIN...

ARGUMENTS
  PLUGIN  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ chptr plugins unlink
  $ chptr plugins remove

EXAMPLES
  $ chptr plugins remove myplugin

chptr plugins reset

Remove all user-installed and linked plugins.

USAGE
  $ chptr plugins reset

See code: @oclif/plugin-plugins

chptr plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ chptr plugins:uninstall PLUGIN...

ARGUMENTS
  PLUGIN  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ chptr plugins unlink
  $ chptr plugins remove

EXAMPLES
  $ chptr plugins uninstall myplugin

See code: @oclif/plugin-plugins

chptr plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ chptr plugins:uninstall PLUGIN...

ARGUMENTS
  PLUGIN  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ chptr plugins unlink
  $ chptr plugins remove

EXAMPLES
  $ chptr plugins unlink myplugin

chptr plugins update

Update installed plugins.

USAGE
  $ chptr plugins update [-h] [-v]

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Update installed plugins.

See code: @oclif/plugin-plugins

chptr rename [CHAPTERIDORFILENAME] [NEWNAME]

Modify chapter title in text, metadata and filename or tracked filename

USAGE
  $ chptr rename [CHAPTERIDORFILENAME] [NEWNAME] [-a -t] [-s]

ARGUMENTS
  CHAPTERIDORFILENAME  Chapter number or tracked filename to modify
  NEWNAME              New chapter name

FLAGS
  -a, --all    Will run on every chapter file.  Will ignore a `chapterIdOrFilename argument.`
  -s, --save   Commit to git at the same time.
  -t, --title  Use chapter's title as new name.  Will supercede a `newName` argument.

DESCRIPTION
  Modify chapter title in text, metadata and filename or tracked filename

See code: src/commands/rename.ts

chptr reorder [DESTINATIONID] [ORIGINID]

Takes a chapter and modifies its index number to fit another ordering place

USAGE
  $ chptr reorder [DESTINATIONID] [ORIGINID] [-c] [-s]

ARGUMENTS
  DESTINATIONID  Number it will become (write `end` or `@end`to put at the end of each stack).
  ORIGINID       Chapter number to move

FLAGS
  -c, --compact  Compact chapter numbers at the same time
  -s, --save     Commit to git at the same time.

DESCRIPTION
  Takes a chapter and modifies its index number to fit another ordering place

ALIASES
  $ chptr move

See code: src/commands/reorder.ts

chptr save [NUMBERORFILENAME]

Parse modified text files, adjust sentence and paragraph endings, and commit files to repository.

USAGE
  $ chptr save [NUMBERORFILENAME] [-c] [-e | -m <value>] [-n <value> | -f <value>] [-t ]

ARGUMENTS
  NUMBERORFILENAME  Chamber number to save, or tracked filename or filename pattern to save to repository

FLAGS
  -c, --compact           Compact chapter numbers at the same time
  -e, --empty             No manual message in commit
  -f, --filename=<value>  Tracked filename or filename pattern to filter which files to stage before saving to
                          repository
  -m, --message=<value>   Message to use in commit to repository
  -n, --number=<value>    Chapter number to filter which files to stage before saving to repository
  -t, --track             Force tracking of file if not already in repository

DESCRIPTION
  Parse modified text files, adjust sentence and paragraph endings, and commit files to repository.

ALIASES
  $ chptr commit

See code: src/commands/save.ts

chptr setup [NAME]

Generates basic config files for a new novel project

USAGE
  $ chptr setup [NAME] [-a <value>] [-d /|chapters/|chapters/number/|] [-e <value>] [-f <value>] [-r
    <value>] [-l <value>] [-s <value>]

ARGUMENTS
  NAME  Name of project

FLAGS
  -a, --author=<value>               Name of author of project
  -d, --directorystructure=<option>  Directory structure initially written in config file
                                     <options: /|chapters/|chapters/number/|>
  -e, --email=<value>                Email of author of project
  -f, --force=<value>                [default: false] Overwrite config files if they exist.  Specify a filename to
                                     overwrite only one; write `true` to overwrite all.
  -l, --language=<value>             Language of project
  -r, --gitRemote=<value>            Git address of remote repository.
  -s, --style=<value>                Config files in JSON5 or YAML?

DESCRIPTION
  Generates basic config files for a new novel project

ALIASES
  $ chptr setup

chptr track [FILENAME]

Add a file to be tracked in repository that is not a chapter, summary or metadata file.

USAGE
  $ chptr track [FILENAME]

ARGUMENTS
  FILENAME  Filename to track

DESCRIPTION
  Add a file to be tracked in repository that is not a chapter, summary or metadata file.

See code: src/commands/track.ts

About

Command Line tool to handle separate Markdown files with metadata notations as a single writing project

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages