No description
Find a file
2020-05-26 07:52:09 -07:00
doc Add man page 2020-01-10 19:50:23 -07:00
scripts fixup! Add convenience script for building statically-linked pihelper & dependencies for Android 2020-05-26 07:52:09 -07:00
src Add convenience script for building statically-linked pihelper & dependencies for Android 2020-05-22 18:59:04 -07:00
.gitignore Add convenience script for building statically-linked pihelper & dependencies for Android 2020-05-22 18:59:04 -07:00
.gitmodules Initial commit 2019-12-30 14:18:57 -06:00
.vimrc Initial commit 2019-12-30 14:18:57 -06:00
CMakeLists.txt Add man page 2020-01-10 19:50:23 -07:00
COPYING Add GPL-3 license 2019-12-31 14:14:22 -06:00
LICENSE Add LICENSE file 2019-12-31 18:12:19 -06:00
README.md Fix dependency installation instructions for Fedora 2020-01-07 19:11:55 -07:00

PiHelper

PiHelper is designed to be a simple, lightweight, portable client library for the Pi-hole. There is also a CLI tool available.

CLI Usage

-c, --configure              Configure Pi-Helper
-d, --disable <duration>     Disable the Pi-hole for a given duration, or permanently if empty
-e, --enable                 Enable the Pi-hole
-f, --file <config-file>     Use the given config file instead of the default
-h, --help                   Display this message
-q, --quiet                  Don't print anything
-v, --verbose                Print debug logs

Library Usage

Include the pihelper.h file.

Building

PiHelper depends on cmake, curl, openssl, and json-c. On Fedora you can install the dependencies with the following command:

sudo dnf install cmake \
    make \
    gcc \
    gcc-c++ \
    libcurl-devel \
    openssl-devel \
    json-c-devel

Once you have the dependencies installed, you can build the project with cmake:

mkdir build
cd build
cmake ..
make

By default, this will build a static library you can link to. If you'd like to build a shared library, use this cmake command instead:

cmake -DPIHELPER_SHARED=BOOL:ON ..

If you'd like to have the command line tool as well, you can use this:

cmake -DPIHELPER_EXECUTABLE=BOOL:ON ..

If you need the development headers on your system, you can run this:

cmake -DPIHELPER_DEV=BOOL:ON ..

Once you've run cmake with the desired options, you can install pihelper to your system by runnning the following after building:

sudo make install

License

Copyright © 2019, 2020 William Brawner.

This file is part of PiHelper.

PiHelper is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PiHelper is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PiHelper.  If not, see <https://www.gnu.org/licenses/>.