Skip to content

Commit

Permalink
Updating documents
Browse files Browse the repository at this point in the history
  • Loading branch information
luanguimaraesla committed Jun 3, 2018
1 parent 397e248 commit 7680dcd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pandocker 0.3.0
# pandocker 0.3.1


[![pipeline status](https://gitlab.com/luanguimaraesla/pandocker/badges/master/pipeline.svg)](https://gitlab.com/luanguimaraesla/pandocker/commits/master)
Expand Down Expand Up @@ -29,7 +29,7 @@ Now you can install pandocker like any other docker:

```bash
sudo systemctl start docker
sudo docker pull luanguimaraesla/pandocker:0.3.0
sudo docker pull luanguimaraesla/pandocker:0.3.1
```

`WARNING`: Because of full-latex, haskell, pandoc, pandoc-filters and erlang dependencies, download may take too long, so be patient.
Expand All @@ -39,15 +39,15 @@ sudo docker pull luanguimaraesla/pandocker:0.3.0
Like many system tools built in Docker architecture, Pandocker must be executed using docker command line.

```bash
sudo docker run --rm -v $(pwd):/code luanguimaraesla/pandocker:0.3.0 help
sudo docker run --rm -v $(pwd):/code luanguimaraesla/pandocker:0.3.1 help
```

However, to ease the usage, you can alias this _f*ck$@!_ command just typing it in the terminal:

```bash
cat - << EOT >> ~/.bashrc
function pandocker() {
sudo docker run --rm -v $(pwd):/code luanguimaraesla/pandocker:0.3.0 $@
sudo docker run --rm -v $(pwd):/code luanguimaraesla/pandocker:0.3.1 $@
}
EOT
source ~/.bashrc
Expand All @@ -63,25 +63,35 @@ pandocker help

### Quick start

Choose a template in [Pandocker Templates Site](https://github.com/luanguimaraesla/pandocker-templates)
Create an empty directory to your new Pandocker project and execute pandocker to setup the template structure. Then compile the source files:

Create an empty directory to your new Pandocker project and execute pandocker to setup the template structure:
```bash
mkdir myproject
cd myproject
pandocker new
pandocker compile
```

`WARNING`: because of docker architecture, to edit the files you'll need to run `chown` command inside your project directory:

```bash
mkdir myproject && cd myproject
pandocker new -t [template-name]
sudo chown -R $USER:$USER .
```

The `chown` command will enable you to edit the files created inside docker.
Pandocker uses some default settings, `default` and `pandocker.yml` to the `new` and `compile` commands respectively. If you want to use a preconfigured template, find its name in [Pandocker Templates Site](https://github.com/luanguimaraesla/pandocker-templates), then you can tell Pandocker to create a new project according to this template:

```bash
mkdir myproject && cd myproject
pandocker new -t [template-name]
```

Now, you can update the files according to the template specification and compile your markdown files to PDF executing:
In the same way, you can use some configurations files to organize better your projects. So, all you need is to tell Pandocker which YAML file you want in the compilation:

```bash
pandocker compile -f pandocker.yml
pandocker compile -f custom.pandocker.yml
```


### Custom templates

If you need to create your own project structure, Pandocker expects you setup some initial project structure. We suggest the following simple model:
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Pandocker.MixProject do
def project do
[
app: :pandocker,
version: "0.3.0",
version: "0.3.1",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down

0 comments on commit 7680dcd

Please sign in to comment.