Skip to content

Commit

Permalink
Merge pull request #13 from bpennypacker/python3
Browse files Browse the repository at this point in the history
Updated to use python 3. Tested with pi-hole v5.0
  • Loading branch information
bpennypacker authored May 19, 2020
2 parents d718567 + 35a5d1d commit df0803d
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 104 deletions.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributing

Contributions are welcome, not just to the python code itself but also templates for different types of displays, better documentation, etc. If you plan to contribute, please:

- Fork the repo and make a branch
- Make any changes/additions on your local branch
- Test! Test! Test!
- Open a PR, preferably with an associated github issue with a detailed description of the contents of the PR
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ phad's default screens are based on a 3x5" LCD screen and using the Terminus 8x1


### Quick Installation

The current version of phad requires Python 3. Prior to v0.4 phad required Python 2. If you currently only have Python 2 available to you then you can download v0.3 manually from https://github.com/bpennypacker/phad/releases/tag/v0.3 and follow its installation instructions.

These following instructions assume you already have a Raspberry Pi configured with Pi-hole and a touchscreen display. As there are many options for hardware and software, any initial setup and configuration is beyond the scope of these instructions.

If you have installed Pi-hole using their One-Step Automated Install, or if you installed it via their basic-install.sh shell script then you can use phad-simple-install.sh to install phad. This can be as smple as using this command in a shell on your Raspberry Pi:
Expand All @@ -40,7 +43,7 @@ bash phad-simple-install.sh
Or, to manually install phad:

1. Clone this repo using `git` or download and uncompress a release from the [releases page on GitHub](https://github.com/bpennypacker/phad/releases).
2. Install any missing python dependencies by invoking `pip install -r requirements.txt`
2. Install any missing Python 3 dependencies by invoking `/usr/bin/env python3 -m pip install -r requirements.txt`
3. Add the phad command to `~/.bashrc`:
```
if [ "$TERM" == "linux" ] ; then
Expand Down Expand Up @@ -107,6 +110,19 @@ Invoking `phad --help` will display a summary of command line options. Options a
* -d [--debug]

Generate debugging output to stdout

### Upgrading to v0.4

The following entries have been removed from phad.conf:

* enable_main_timeout
* main_timeout

They have been replaced by a single new entry, `display_timeout`, that defaults to 30 seconds.

If a touchscreen has a backlight then display_timeout is the number of seconds after the screen is last touched before the display is turned off. If a touchscreen does not have a backlight then the display will instead revert to the first template listed in the `templates` section of `phad.conf`.

If the `-s` command line option is used then `display_timeout` is ignored.

### Tips and Tricks

Expand Down
Loading

0 comments on commit df0803d

Please sign in to comment.