Added README and fixed publish script.
The publish script used platform specific options, and this commit removes them. This commit introduces a README with installation instructions.
This commit is contained in:
parent
a0d8ca002d
commit
d7d6d1d572
|
@ -0,0 +1,35 @@
|
|||
# Dakota's tilde.club
|
||||
|
||||
This is the repository for building Dakota's tilde.club page. As of now, the
|
||||
only build artifact is `index.html`.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `python3`
|
||||
- Python packages listed in `requirements.txt`
|
||||
|
||||
### Optional Dependencies
|
||||
|
||||
- [tidy](https://github.com/htacg/tidy-html5/blob/next/README/BUILD.md)
|
||||
|
||||
## Installation
|
||||
|
||||
1. Clone the repository and `cd` into the cloned directory.
|
||||
2. Make a virtualenv (optional, but highly suggested) and activate it:
|
||||
|
||||
```bash
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
3. Install the `python` package dependencies using `pip`:
|
||||
|
||||
```bash
|
||||
python -m pip install -r requirements.txt
|
||||
```
|
||||
|
||||
4. Run the publish script:
|
||||
|
||||
```bash
|
||||
./publish.py
|
||||
```
|
|
@ -1,13 +1,17 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import io
|
||||
from subprocess import run
|
||||
from subprocess import run, DEVNULL
|
||||
|
||||
import markdown
|
||||
from jinja2 import Template
|
||||
|
||||
def main():
|
||||
tidy_exists = run(["which", "-s", "tidy"]).returncode == 0
|
||||
tidy_exists = run(
|
||||
["which", "tidy"],
|
||||
stdout=DEVNULL,
|
||||
stderr=DEVNULL
|
||||
).returncode == 0
|
||||
with open("readings.md") as readings, open("index.tmpl.html") as tmpl:
|
||||
readings_html = markdown.markdown(readings.read())
|
||||
template = Template(tmpl.read())
|
||||
|
|
Loading…
Reference in New Issue