president/README.md

129 lines
3.5 KiB
Markdown
Executable File

"President is a local automation server that lets me control my environment through events." - ChatGPT
# Android Installation:
Download and install F-Droid
Install Termux
Install Termux:api
## In Termux:
termux-setup-storage
pkg install openssh termux-api espeak build-essential \
perl tesseract imagemagick zip sqlite sshpass openssh \
curl sox iproute2 libqrencode rsync zbar ffmpeg
ssh-keygen -t rsa -b 4096 -f id_rsa
cpan App::cpanminus
apt install openssl openssl-tool
cpanm Net::SSLeay
cpanm --notest --force Mojolicious::Lite \
WWW::Mechanize Time::Piece Time::Duration \
Date::Parse Hash::Merge Encode Data::Dumper \
File::Find File::Slurp Number::Format \
SQL::Abstract Mojo::SQLite Data::UUID \
Mojolicious::Plugin::RenderFile \
LWP::UserAgent Crypt::Simple File::Type \
HTML::Strip URI::Encode LWP::Protocol::https \
URI::Escape MIME::Base64 Math::Trig List::Util \
File::Monitor Device::SerialPort Barcode::ZBar
cd president
chmod +x President.pl
To run
./President.pl
# Debian Installation
sudo apt update; sudo apt upgrade;
sudo apt install net-tools lib32z1-dev cpanminus \
ssh espeak build-essential zip openssl libssl-dev \
perl tesseract-ocr imagemagick sqlite3 sshpass \
ssh curl sox iproute2 qrencode rsync ffmpeg libbarcode-zbar-perl
sudo cpanm --notest --force Mojolicious::Lite \
WWW::Mechanize Time::Piece Time::Duration \
Date::Parse Hash::Merge Encode Data::Dumper \
File::Find File::Slurp Number::Format \
SQL::Abstract Mojo::SQLite Data::UUID \
Mojolicious::Plugin::RenderFile \
LWP::UserAgent Crypt::Simple File::Type \
HTML::Strip URI::Encode LWP::Protocol::https \
URI::Escape MIME::Base64 Math::Trig \
List::Util Net::SSLeay File::Monitor \
Device::SerialPort Barcode::ZBar
cd president
./President.pl
# Manjaro Installation:
sudo pacman -Syu
sudo pacman -S base-devel cpanminus sqlite3 \
chromium xclip rsync sshpass certbot zip \
imagemagick espeak-ng tesseract xsane sox \
net-tools xdotool qrencode zbar fprintd
sudo cpanm --notest --force Mojolicious::Lite \
WWW::Mechanize Time::Piece Time::Duration \
Date::Parse Hash::Merge Encode Data::Dumper \
File::Find File::Slurp Number::Format \
SQL::Abstract Mojo::SQLite Data::UUID \
Mojolicious::Plugin::RenderFile \
LWP::UserAgent Crypt::Simple File::Type \
HTML::Strip URI::Encode LWP::Protocol::https \
URI::Escape MIME::Base64 Math::Trig \
List::Util Net::SSLeay \
File::Monitor Device::SerialPort Barcode::ZBar
# Alpine Linux
# Haven't really tested this one, except on an iPhone 6 in iSH
apk update
apk upgrade
apk add alpine-sdk perl-app-cpanminus sqlite \
openssh curl net-tools zip libqrencode rsync wget \
zbar
sudo cpanm --notest --force Mojolicious::Lite \
WWW::Mechanize Time::Piece Time::Duration \
Date::Parse Hash::Merge Encode Data::Dumper \
File::Find File::Slurp Number::Format \
SQL::Abstract Mojo::SQLite Data::UUID \
Mojolicious::Plugin::RenderFile \
LWP::UserAgent Crypt::Simple File::Type \
HTML::Strip URI::Encode LWP::Protocol::https \
URI::Escape MIME::Base64 Math::Trig List::Util \
Net::SSLeay File::Monitor Device::SerialPort \
Barcode::ZBar
# POST INSTALL
To access the database, move or copy database/initial.enc to your home directory.
Then copy the config.json.example file to config.json:
cp -v database/initial.enc ~/initial.enc
cp -v config.json.example config.json
cd president
./President.pl
Your default browser should automatically open with the database highlighted.
Password: password
This is alpha software, expect yourself to be frustrated most of the time... the handbook is in progress.