Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export VIRTUAL_ENV=."venv"
if [ ! -d "$VIRTUAL_ENV" ]; then
echo -n "Creating virtual environment..."
python -m venv "$VIRTUAL_ENV"
echo "done."
echo -n "Activating virtual environment..."
layout python3
echo "done."
else
echo -n "Activating virtual environment..."
layout python3
echo "done."
fi
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ This site is built wtih [MkDocs](https://www.mkdocs.org). Pull requests are welc
## Install requirements

```sh
pip install -r requirements.txt
script/bootstrap
```

### If you have direnv installed:
```sh
direnv allow
```

## Edit interactively

```sh
mkdocs serve
mkdocs serve -w docs/
```

changes made in `docs/` will be reflected in the browser session.
Expand Down
2 changes: 2 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ These settings are intended to facilitate a stable and reliable mesh network. Th
### LoRa

**LongFast Config**

| Option | Recommended Config | Notes |
| -------------: | :----------------- | :----------------------------------------------------------------------------------------------- |
| Modem Preset | LONG_FAST | This is the default. |
Expand All @@ -34,6 +35,7 @@ These settings are intended to facilitate a stable and reliable mesh network. Th
| OK to MQTT | `True` | Added in `2.5.0`. Enable to show up on online tools like [info.MtnMe.sh](https://info.mtnme.sh). |

**MediumFast Config**

| Option | Recommended Config | Notes |
| -------------: | :----------------- | :----------------------------------------------------------------------------------------------- |
| Modem Preset | MEDIUM_FAST | This is the new fast network |
Expand Down
51 changes: 51 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash

# accept input string and print it in green
function GRN() {
if [[ $1 == "-n" ]]; then
echo -n -e "\033[0;32m$2\033[0m"
else
echo -e "\033[0;32m$1\033[0m"
fi
}

# accept input string and print it in red
function RED() {
if [[ $1 == "-n" ]]; then
echo -n -e "\033[0;31m$2\033[0m"
else
echo -e "\033[0;31m$1\033[0m"
fi
}

# accept input string and print it in yellow
function YLW() {
if [[ $1 == "-n" ]]; then
echo -n -e "\033[0;33m$2\033[0m"
else
echo -e "\033[0;33m$1\033[0m"
fi
}

YLW -n "Creating virtual environment... "
if [[ ! -d .venv ]]; then
python3 -m venv .venv || {
RED "failed"
exit 1
}
fi
GRN "done"

YLW -n "Activating virtual environment..."
source .venv/bin/activate || {
RED "failed"
exit 1
}
GRN "done"

YLW -n "Installing dependencies..."
pip install -r requirements.txt || {
RED "failed"
exit 1
}
GRN "done"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One note about this script is that it requires a custom installation of SVG graphics that are not included in requirements.txt. I actually got a docker container working that can serve up the content and watch for changes in another branch that makes life SUPER easy. It does require docker though. Maybe having both options could help?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script has no external dependencies, especially not from Python. Can you elaborate more by what you mean?