Create Decker Command Line Options authored by Armin Bernstetter's avatar Armin Bernstetter
Right now, Decker is a command line tool. This page provides an overview over the commands you can use with Decker.
This page assumes that you have read the [instructions for first steps with decker](home#first-steps).
[[_TOC_]]
## Getting Information
### `decker version`
Prints information about the currently used version of decker.
<details><summary>Example Output</summary>
```
decker version 0.10.0 (branch: master, commit: 02b22a46c00dabd8aabb13246178f69ee58f8982, tag: undefined, build date: 2020-11-11)
pandoc version 2.9.1.1
pandoc-types version 1.20
```
</details>
### `decker info`
Prints a large amount of information about the current project's directories, the targets (files which will be generated) and the meta data options which are found in top level `decker.yaml` file.
## Setting up a project
### `decker example`
Creates a new example project at the current location. This means if you are in the directory `presentations`, this command will create the folder `presentations/example`.
To move into this folder you need to type `cd example` (`cd` stands for "change directory).
### `decker clean`
This command will "clean" the current project. It will delete the `public` folder including all automatically generated or copied files in it. Don't worry, Decker will create a new `public` folder and copy everything that is needed when you run one of the commands that create content. Especially if you update your decker version, it is recommended to run `decker clean` in older project folders.
## Creating Content
### `decker decks`
Creates all HTML slide decks from your `*-deck.md` source files. Does **not** create HTML handouts
### `decker html`
Builds HTML versions of all available documents including HTML handouts.
### `decker server`
Creates all HTML files and opens a local web server that can be accessed by typing `localhost:8888` in your browser. Opening this address will put you on the `index.html` page which provides an overview of the available slide decks and handouts.
### `decker pdf`
Creates PDF files from your **slide decks**. This requires that you have Google Chrome installed. `decker pdf` opens Google Chrome in the background and prints a PDF file. This can also be done manually (see here: [Presenting with Decker Export Presentation](Presenting-with-Decker#export-presentation)).
## Publishing to a remote location
### `decker publish`
Decker can use a locally installed [Rsync](https://rsync.samba.org) to
publish the entire project to a remote location with the command
``` {.sh}
> decker publish
```
<details>
The remote location is specified in the meta data variable
`publish.rsync.destination:` using the URL formats that Rsync
understands. For example, to publish the entire project directly into
the document directory of a remote webserver the `decker.yaml` file
would contain:
``` {.yaml}
publish:
rsync:
destination: author@public.server.com:/var/www/html/cg-lectures
```
To more precisely control the behaviour of Rsync, a list of options can
be specified in the variable `publish.rsync.options`. For example, to
*mirror* (as opposed to *copy* ) the public directory to the destination
the setting would be:
``` {.yaml}
publish:
rsync:
destination: author@public.server.com:/var/www/html/cg-lectures
options:
- --delete
```
</details>
## Miscellaneous
### `decker check`
Checks the availability of external programs (e.g. `ssh`, `rsync` etc) on your system.
<details>
```
# external programs:
ssh: found
rsync: found
dot: found
gnuplot: found
pdflatex: found
pdf2svg: found
```
</details>
### `decker watch`
Builds HTML versions of all documents and then watches for document changes. Each change to a watched document triggers a rebuild. Watching can be terminated with `^C`. Like `decker server` but doesn't start a web server.
### `decker open`
Opens a browser on the `index.html` page.
### `decker fast`
Watches the project, builds the `index.html` file and opens the web server at `localhost:8888` but doesn't create other HTML files.
### `decker presentation`
Opens a web server but does not watch or build files other than the `index.html` file
\ No newline at end of file