Skip to content
GitLab
Explore
Sign in
Register
nimrod
Presentation
Compare revisions
af91a6a7506ee494861e8b484887c7da33e18b4e to d8d1c0f6f5188782aa3f8b255ea72330a6ec5889
Commits on Source (2)
pre-commit: Remove unused hooks.
· efdd85d4
nimrod
authored
Oct 07, 2023
efdd85d4
Add the presentation script and documentation.
· d8d1c0f6
nimrod
authored
Oct 07, 2023
d8d1c0f6
Hide whitespace changes
Inline
Side-by-side
.pre-commit-config.yaml
View file @
d8d1c0f6
...
...
@@ -5,12 +5,8 @@ repos:
hooks
:
-
id
:
check-added-large-files
-
id
:
check-executables-have-shebangs
-
id
:
check-json
-
id
:
check-merge-conflict
-
id
:
check-shebang-scripts-are-executable
-
id
:
check-symlinks
-
id
:
check-toml
-
id
:
check-xml
-
id
:
check-yaml
-
id
:
detect-private-key
-
id
:
end-of-file-fixer
...
...
@@ -59,7 +55,6 @@ repos:
rev
:
v0.2.0
hooks
:
-
id
:
shell-validate
-
id
:
docker-compose
-
repo
:
https://github.com/shellcheck-py/shellcheck-py.git
rev
:
v0.7.2.1
...
...
README.md
View file @
d8d1c0f6
...
...
@@ -2,16 +2,15 @@
[
![pipeline status
](
https://git.shore.co.il/nimrod/presentation/badges/master/pipeline.svg
)
](https://git.shore.co.il/nimrod/presentation/-/commits/master)
A
Dock
erized presentation toolkit for building presentation from markup
(like
Markdown or DOT).
A
contain
erized presentation toolkit for building presentation
s
from markup
(like
Markdown or DOT).
## Usage
`
docker
run --rm -itv “$PWD:/volume“ registry.shore.co.il/presentation`
`
podman
run --rm -itv “$PWD:/volume“ registry.shore.co.il/presentation`
Will watch the current directory and run
`make`
whenever a file changes. One can
add a shell alias
`alias presentation='docker run --rm -itv “$PWD:/volume“ registry.shore.co.il/presentation'`
for easier use.
Will watch the current directory and run
`make`
whenever a file changes
(replace
`podman`
with
`docker`
if that's what you're using).
See the example folder for more details and the
[
generated
PDF
](
https://git.shore.co.il/nimrod/presentation/-/jobs/artifacts/master/raw/example/presentation.pdf?job=presentation%20build
)
.
...
...
@@ -20,6 +19,20 @@ If you're using GitLab, check out the [CI
template
](
https://git.shore.co.il/nimrod/presentation/-/blob/master/gitlab-ci-template/presentation.yml
)
if you wish to build presentation as part of a pipeline.
Yet another option is using the contained tools instead of installing them in
your system. For that copy the
[
presentation
script
](
https://git.shore.co.il/nimrod/presentation/-/blob/master/presentation
)
to some in your
`PATH`
and create symlinks to the script with the name of the
binary you wish to use. For example:
```
curl https://git.shore.co.il/nimrod/presentation/-/blob/master/presentation > ~/.local/bin/presentation
chmod +x ~/.local/bin/presentation
ln -s ~/.local/bin/pandoc presentation
```
In this example when you run
`pandoc`
it would run it using podman.
## Contains
-
[
Pandoc
](
http://pandoc.org/
)
...
...
presentation
0 → 100755
View file @
d8d1c0f6
#!/bin/sh
set
-eu
basename
=
"
$(
basename
"
$0
"
)
"
if
[
"
${
1
:-}
"
=
'-u'
]
then
podman image pull registry.shore.co.il/presentation
elif
[
"
${
1
:-}
"
=
"-h"
]
then
echo
"USAGE:
${
basename
}
[-d] [-h] [BINARY_NAME] [...]"
# If invoked using presentation, pass the arguments to the podman run command.
elif
[
"
$basename
"
=
presentation
]
then
exec
podman run
--rm
--interactive
--tty
--volume
"
$PWD
:/volume"
registry.shore.co.il/presentation
"
$@
"
# Use the system one, if available.
elif
command
-pv
"
$basename
"
>
/dev/null
then
exec
"
$basename
"
"
$@
"
else
exec
podman run
--rm
--interactive
--tty
--volume
"
$PWD
:/volume"
registry.shore.co.il/presentation
"
$basename
"
"
$@
"
fi