Announcement

#1 2020-07-04 01:52:50

BallPython
Member
2020-06-13
15

Created a shell script for pwg_representative

Hello,

Check out this new script. It creates the pwg_representative folder, converts .mp4 to .jpg and moves it to pwg_representative.



https://github.com/rogue07/piwigo_pwg_representative


Enjoy,

Ram


Piwigo 2.10.2
Operating system: Linux
PHP: 7.4.3 (Show info) [2020-07-03 19:50:46]
MySQL: 5.5.5-10.3.22-MariaDB-1ubuntu1 [2020-07-03 19:50:46]
Graphics Library: External ImageMagick 6.9.10-23

Last edited by BallPython (2020-07-05 04:43:56)

Offline

 

#2 2020-07-05 18:55:13

erAck
Only trying to help
2015-09-06
2023

Re: Created a shell script for pwg_representative

Copying the convert2jpg.sh script to each subdirectory to run it there is an odd approach. Rather invoke it with appropriate arguments so copying is not needed.

Also, both scripts could benefit from error handling so they don't continue to run if something goes wrong.

Important, at the end of convert2jpg.sh the

chmod 700 -Rf $DIR
chown -Rf www-data:www-data $DIR

may be correct for your hosting setup, but not for others and even may do harm in that it leaves files inaccessible to the web server if it doesn't run as the owner user, or even inaccessible to the owner if that is allowed to change ownership but is not www-data (though most systems don't allow that nowadays).


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2020-07-05 18:58:29

BallPython
Member
2020-06-13
15

Re: Created a shell script for pwg_representative

Thanks for the comments. This is only a start.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact