• Resolved erikture

    (@erikture)


    I am looking for a way to display images from my webcam inside my site.
    My webcam is taking one picture every day and stores it into a directory of my NAS. I host my WordPress site my self, access to the NAS directory from that computer is no problem.

    Is there a way to use Nextgen to display my images without having to import the new image manualy every day? Can the import be done automaticaly? Can Nextgen display a gallery located outside the WordPress directory?

    If not is there any other way to display my pictures that grows with one every day? Or maybee just show the taken picture? It has to be done automaticaly because I can not import it manually every day.

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @erikture – There is no automatic process but you may be able to programmatically create one, unfortunately this sort of custom code creation is outside the scope of support we currently offer.

    Thanks … and best of luck, this sounds like an interesting application.

    – Cais.

    Thread Starter erikture

    (@erikture)

    Thank you for your answer.

    I have one question about the “Scan folder for new images” button in Nextgen.
    Can the function that that button triggers be triggered programatically?
    Getting my new pictures into the correct gallery directory is no problem.

    /Erik

    Thread Starter erikture

    (@erikture)

    I have now solwed the automatic update of images in a gallery.
    I have written a script that I use as a cron job that runs every day five minutes after the camera takes the pictures.

    The script looks like this:
    #!/bin/sh

    for i in find /pathtoimages/*.jpg -type f |tail -1; do
    cp $i /pathtoimagestorage/$(date +%Y-%m-%d).jpg
    done

    sudo -u www-data wp –path=’/var/www/sitename’ ngg import_image –filename=/pathtoimagestorage/$(date +%Y-%m-%d).jpg –gallery=10
    rm /pathtoimages/*.jpg

    My camera stores two pictures in the directory /pathtoimages/ every day.
    The script copies the first image to the directory /pathtoimagestorage/ in the format yyyy-MM-dd.jpg. I will save each picture in that directory to be able to later do an animated picture containing one year of pictures.
    I then use WP-CLI to insert the picture into the correct gallery.
    Last I remove all pictures saved by the camera to make sure the directory is empty the next time the camera stores new pictures.

    Plugin Contributor photocrati

    (@photocrati)

    @erikture – Very well done! Thanks for sharing this!!

    – Cais.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Scheduled upload of images’ is closed to new replies.