Code Monkey home page Code Monkey logo

simple-photo-gallery-bulkcreation's Introduction

build pypi

simple-photo-gallery-bulkcreation

Plugin for the Simple Photo Gallery which provides a config based bulk creation of multiple galleries from multiple folders of photos.

gallery overview

Description

This plugin comes with a further command for the Simple Photo Gallery: gallery-bulkcreation

Installation

pip install simple-photo-gallery-bulkcreation

Configuration file

The configuration file is in a simple ini format. At first there has to be a general DEFAULT section with some general settings. Then there is one section per gallery.

[DEFAULT]
gallery_root = example/gallery
title = My vacations
description = The best days of the year
title_photo = example/pictures/mexico2017/2017-11-01_15-20-23.jpg
title_photo_offset = 20

[Oman 2020]
description = Some days in the orient
image_source = example/pictures/oman2020
background_photo = 2020-02-02_18-40-33.jpg

[Greece 2019]
description = Island hoping in Greece
image_source = example/pictures/greece2019
background_photo = 2019-08-29_10-19-43.jpg
background_photo_offset = 40

Usage

After the creation of a config.ini, the creation is pretty easy via running following command:

gallery-bulkcreation config-example.ini

If everything works correctly you can preview the result, e.g. via running a simple Python server:

python3 -m http.server --directory GALLERY_ROOT/public

and then checking it in your browser under http://localhost:8000.

If you add photos to already existing galleries or add new galleries in the config.ini you can simple update the gallery by running the command again.

Example

Check out the example.

simple-photo-gallery-bulkcreation's People

Contributors

hille721 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

simple-photo-gallery-bulkcreation's Issues

Commands to Execute

Great addition to this gallery. I'm trying it now but getting errors about public folder.

    shutil.copytree(data_dir / 'public', public_dir, dirs_exist_ok=True)
TypeError: copytree() got an unexpected keyword argument 'dirs_exist_ok'

Do I have to run the original command of "gallery-init" to initialize your version here, and then run "gallery-bulkcreation config.ini"?

Package requires Python >= 3.8

As highlighted in #2 the option dirs_exist_ok in the shutil.copytree function is used, which was introduced in Python 3.8, this means this package is currently only supporting Python 3.8 and higher.

Make Templates Editable

With simplegallery you can customize the templates files after the first init run. Afterwards the build step can been run again and again without overwrite those changes again.
This does currently not work with simple-gallery_bulkcreation.

We have to check for the existence before copy them. But there should ne also a possibility to update them (maybee a commandline flag --update-index).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.