Compare commits
No commits in common. "f6959e532ad422107105f4510adba4bca3e88fb0" and "1d47d221f6b4dc7fa78cd1adc47f6046f6b7f759" have entirely different histories.
f6959e532a
...
1d47d221f6
@ -23,7 +23,6 @@ We recommend you to structure your project directory like this:
|
|||||||
│ └── titlepage.html
|
│ └── titlepage.html
|
||||||
├── meta.yml
|
├── meta.yml
|
||||||
├── onpoint
|
├── onpoint
|
||||||
│ ├── autocompile.sh
|
|
||||||
│ ├── main.py
|
│ ├── main.py
|
||||||
│ ├── README.md
|
│ ├── README.md
|
||||||
│ └── requirements.txt
|
│ └── requirements.txt
|
||||||
@ -47,9 +46,3 @@ We recommend you to structure your project directory like this:
|
|||||||
## Updating onPoint
|
## Updating onPoint
|
||||||
|
|
||||||
In order to update the version of onPoint in an existing project, simply enter the `onpoint` directory and run `git pull`.
|
In order to update the version of onPoint in an existing project, simply enter the `onpoint` directory and run `git pull`.
|
||||||
|
|
||||||
## Auto-compile during Development
|
|
||||||
|
|
||||||
You might want to have all slides auto-compiled for you on safe. For this case, we wrote a small bash script that spawns a file watcher to compile your presentation once any markdown file in the slides folder is saved. Simply run `./onpoint/autocompile.sh` from your project root folder.
|
|
||||||
|
|
||||||
You will need Python and `inotify-tools` to execute the script.
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
# Requirements: inotify-tools, python3
|
|
||||||
|
|
||||||
while inotifywait -e close_write ./slides/*.md; do
|
|
||||||
python3 ./onpoint/main.py .
|
|
||||||
done
|
|
||||||
13
main.py
13
main.py
@ -124,20 +124,11 @@ def read_yaml(path):
|
|||||||
except yaml.YAMLError as exc:
|
except yaml.YAMLError as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
|
|
||||||
#
|
|
||||||
def get_available_languages():
|
|
||||||
return read_yaml('./meta.yml')['language']
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("rootdirectory", help="your project's root directory")
|
parser.add_argument("rootdirectory", help="your project's root directory")
|
||||||
parser.add_argument("-l", "--language", default="all", help="the presentation language (default: all)")
|
parser.add_argument("-l", "--language", default="de", help="the presentation language (default: de)")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
compile(args.rootdirectory, language=args.language)
|
||||||
if args.language == "all":
|
|
||||||
for language in get_available_languages():
|
|
||||||
compile(args.rootdirectory, language=language)
|
|
||||||
else:
|
|
||||||
compile(args.rootdirectory, language=args.language)
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user