Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into HEAD
Browse files Browse the repository at this point in the history
Change-Id: Ice512da018f6975bbbdb2d02afadfaf6f53998df
  • Loading branch information
andi34 committed Jul 29, 2020
2 parents 7322378 + 69777da commit 575296a
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 75 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ If I find enough time I'll post some updates from time to time
to take pictures.
- Images are processed with GD.
- Photobooth caches all generated QR-Codes, Thumbnails and Prints.
- Standalone Gallery (`localhost/gallery.php`).
- Slideshow via Gallery oder standalone Gallery (under `localhost/slideshow`).
- Settings can be changed via Admin Panel (under `localhost/admin`):
- Standalone Gallery ([localhost/gallery.php](http://localhost/gallery.php)).
- Slideshow via Gallery or standalone Gallery (under [localhost/slideshow](http://localhost/slideshow)).
- Settings can be changed via Admin Panel (under [localhost/admin](http://localhost/admin)):
- Multi-language support:
- German
- English
Expand Down Expand Up @@ -59,10 +59,10 @@ If I find enough time I'll post some updates from time to time

- install-raspbian: use Apache2 webserver by default again
- added Slideshow option to Gallery
- standalone slideshow via `localhost/slideshow`
- access login via `localhost/login` instead `localhost/login.php`
- offline manual with settings explained under `localhost/manual` ([andi34/photobooth#59](https://github.com/andi34/photobooth/pull/59))
- offline FAQ under `localhost/manual/faq.html`
- standalone slideshow via [localhost/slideshow](http://localhost/slideshow)
- access login via [localhost/login](http://localhost/login) instead [localhost/login.php](http://localhost/login.php)
- offline manual with settings explained under [localhost/manual](http://localhost/manual) ([andi34/photobooth#59](https://github.com/andi34/photobooth/pull/59))
- offline FAQ under [localhost/manual/faq.html](http://localhost/manual/faq.html)
- fix windows compatibility
- fix check for image filter
- performance improvement ([andreknieriem/photobooth#226](https://github.com/andreknieriem/photobooth/pull/226))
Expand All @@ -89,7 +89,7 @@ If I find enough time I'll post some updates from time to time
- Optional EXIF data preservation (disabled by default)
- define collage frame seperately ([andi34/photobooth#63](https://github.com/andi34/photobooth/pull/63))
- event specific database: You can now rename the picture and email database via Admin panel. Only pictures inside the defined database are visible via gallery. ([andi34/photobooth#61](https://github.com/andi34/photobooth/pull/61))
- Preview/Stream from device cam as background on start page ([andi34/photobooth#](58https://github.com/andi34/photobooth/pull/58))
- Preview/Stream from device cam as background on start page ([andi34/photobooth#58](https://github.com/andi34/photobooth/pull/58))
- Allow using a stream from URL at countdown for preview
- Allow to rotate preview from URL
- Show button bar inside gallery on bottom or on top of the image
Expand Down
3 changes: 1 addition & 2 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@
echo '<div class="form-row">';
switch($field['type']) {
case 'input':
echo '<label data-i18n="'.$panel.'_'.$key.'">'.$panel.'_'.$key.'</label><input type="text" name="'.$field['name'].'" value="'.$field[
'value'].'" placeholder="'.$field['placeholder'].'"/>';
echo '<label data-i18n="'.$panel.'_'.$key.'">'.$panel.'_'.$key.'</label><input type="text" name="'.$field['name'].'" value="'.$field['value'].'" placeholder="'.$field['placeholder'].'"/>';
break;
case 'range':
echo '<label data-i18n="'.$panel.'_'.$key.'">'.$panel.'_'.$key.'</label></br>
Expand Down
2 changes: 1 addition & 1 deletion api/applyEffects.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
imagejpeg($thumbResource, $filename_thumb, $config['jpeg_quality_thumb']);
imagedestroy($thumbResource);

if ($imageModified || $config['jpeg_quality_image'] >= 0) {
if ($imageModified || $config['jpeg_quality_image'] >= 0 && $config['jpeg_quality_image'] < 100) {
imagejpeg($imageResource, $filename_photo, $config['jpeg_quality_image']);
// preserve jpeg meta data
if ($config['preserve_exif_data'] && $config['exiftool']['cmd']) {
Expand Down
14 changes: 7 additions & 7 deletions config/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$config['use_print'] = false;
$config['use_qr'] = true;
$config['use_download'] = true;
$config['print_qrcode'] = true;
$config['print_qrcode'] = false;
$config['print_frame'] = false;
$config['print_frame_path'] = '../resources/img/frames/frame.png';
$config['crop_onprint'] = false;
Expand Down Expand Up @@ -49,9 +49,9 @@
$config['take_frame_path'] = '../resources/img/frames/frame.png';
$config['take_collage_frame'] = false;
$config['take_collage_frame_path'] = '../resources/img/frames/frame.png';
$config['chroma_keying'] = true;
$config['use_collage'] = false;
$config['continuous_collage'] = false;
$config['chroma_keying'] = false;
$config['use_collage'] = true;
$config['continuous_collage'] = true;
$config['background_image'] = null;
$config['background_admin'] = null;
$config['background_chroma'] = null;
Expand Down Expand Up @@ -122,7 +122,7 @@
$config['show_gallery'] = true;
$config['newest_first'] = true;
$config['scrollbar'] = false;
$config['show_date'] = false; // only works if file_naming = 'dateformatted'
$config['show_date'] = true; // only works if file_naming = 'dateformatted'
$config['gallery']['date_format'] = 'd.m.Y - G:i';
$config['gallery_bottom_bar'] = true;

Expand Down Expand Up @@ -164,8 +164,8 @@
$config['print']['msg'] = null;

$config['jpeg_quality_thumb'] = 60;
$config['jpeg_quality_chroma'] = 70;
$config['jpeg_quality_image'] = 80;
$config['jpeg_quality_chroma'] = 100;
$config['jpeg_quality_image'] = 100;

// RESET
$config['reset_remove_images'] = true;
Expand Down
73 changes: 49 additions & 24 deletions install-raspbian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -e
# Show all commands
# set -x

webserver=$1

function info {
echo -e "\033[0;36m${1}\033[0m"
}
Expand All @@ -31,6 +33,23 @@ if [[ $PI_MODEL != Raspberry* ]]; then
exit 3
fi

if [[ ! -z $1 && ("$1" = "nginx" || "$1" = "lighttpd") ]]; then
info "### Used webserver: $webserver"
else
info "### Used webserver: Apache Webserver"
fi

exit

COMMON_PACKAGES=(
'git'
'gphoto2'
'jq'
'libimage-exiftool-perl'
'php-gd'
'yarn'
)

apache_webserver() {
info "### Installing Apache Webserver..."
apt install -y libapache2-mod-php
Expand Down Expand Up @@ -136,21 +155,32 @@ apt update
apt dist-upgrade -y

info "### Photobooth needs some software to run."
if [ "$1" == "nginx" ]; then
if [ $webserver == "nginx" ]; then
nginx_webserver
elif [ "$1" == "lighttpd" ]; then
elif [ $webserver == "lighttpd" ]; then
lighttpd_webserver
else
apache_webserver
fi

info "### Installing common software..."
apt install -y php-gd gphoto2 libimage-exiftool-perl
for package in "${COMMON_PACKAGES[@]}"; do
if [ $(dpkg-query -W -f='${Status}' ${package} 2>/dev/null | grep -c "ok installed") -eq 1 ]; then
info "[Package] ${package} installed already"
else
info "[Package] Installing missing common package: ${package}"
if [[ ${package} == "yarn" ]]; then
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt update
fi
apt install -y ${package}
fi
done

echo -e "\033[0;33m### Is Photobooth the only website on this system?"
read -p "### Warning: If typing y, the whole /var/www/html folder will be removed! [y/N] " -n 1 -r deleteHtmlFolder
echo -e "\033[0m"

if [ "$deleteHtmlFolder" != "${deleteHtmlFolder#[Yy]}" ] ;then
info "### Ok, we will replace the html folder with the Photobooth."
cd /var/www/
Expand All @@ -171,15 +201,6 @@ if [[ $REPLY =~ ^[Yy]$ ]]
then
info "### Your wish is my command!"

info "### We have to make sure that git is installed."
apt install -y git

info "### Also a packet manager is needed."
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt update
apt install -y yarn

info "### Now we are going to install Photobooth."
git clone https://github.com/andi34/photobooth $INSTALLFOLDER
cd $INSTALLFOLDERPATH
Expand All @@ -192,10 +213,7 @@ then
yarn install
yarn build
else
info "### Downloading the latest build."

info "### Installing a little helper tool to determine the correct url."
apt install -y jq
info "### Your wish is my command!"

info "### Downloading the latest release and extracting it."
curl -s https://api.github.com/repos/andi34/photobooth/releases/latest |
Expand All @@ -211,14 +229,21 @@ info "### Setting permissions."
chown -R www-data:www-data $INSTALLFOLDERPATH
gpasswd -a www-data plugdev

info "### Installing CUPS and setting printer permissions."
apt install -y cups
gpasswd -a www-data lp
gpasswd -a www-data lpadmin

info "### Disable camera automount"
info "### Disabling camera automount."
chmod -x /usr/lib/gvfs/gvfs-gphoto2-volume-monitor

echo -e "\033[0;33m### You probably like to use a printer."
read -p "### You like to install CUPS and set needing printer permissions? [y/N] " -n 1 -r
echo -e "\033[0m"
if [[ $REPLY =~ ^[Yy]$ ]]
then
info "### Installing CUPS and setting printer permissions."

apt install -y cups
gpasswd -a www-data lp
gpasswd -a www-data lpadmin
fi

echo -e "\033[0;33m### You probably like to start the browser on every start."
read -p "### Open Chromium in Kiosk Mode at every boot and hide the mouse cursor? [y/N] " -n 1 -r
echo -e "\033[0m"
Expand All @@ -240,7 +265,7 @@ EOF
fi

info "### Congratulations you finished the install process."
info "### Have fun with your booth, but first restart your Pi."
info "### Have fun with your Photobooth, but first restart your Pi."

echo -e "\033[0;33m"
read -p "### Do you like to reboot now? [y/N] " -n 1 -r
Expand Down
Loading

0 comments on commit 575296a

Please sign in to comment.