APP: nanogallery2 generator

Started by axel.hennig, April 06, 2022, 10:46:19 PM

Previous topic - Next topic

axel.hennig

Hi all,

please find attached a "nanogallery2 generator" app. Back in the (very) old IMatch times there was a script to produce a Juicebox-gallery. This app is designed to be a replacement.

The app is designed to produce a gallery to be used mostly offline, not online. For an app to create a webpage to be used online I suggest to use Jingos Online Gallery Creator... with FTP!.

The zip-file contains a readme.pdf with some instructions as well as a sample gallery to have a look how the final result could look like.

Final remark: Once the app is finished with the creation process there is one last step which needs to be done outside of IMatch (described in detail in the readme.pdf).

Enjoy.

PS: All images/videos are from https://www.pexels.com/ (free stock photos, royalty free images & videos).

ubacher

Tried it out, works like a charm.

( I used Irfanview Batch resizing for the thumbs, copied originals into the media_large)

Thank you

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

axel.hennig


sinus

Thanks, Axel,
your sample looks cool!
And thanks for sharing.  :D


I guess, I do something wrong, because ubacher could let it run.

I cannot enter a category-field.
Your app runs fine, the tree to choose a category opens and I can click on a category, but it does not appear (like the output-folder).
Then I thought, ok, the category is maybe choosen, but simply hidden in the field.

But after clicking on the green button to generate the gallery, I get some infos, but nothing happens further.
Also the output - folder is empty, hence I cancelled the app.

For testing I have only some files in the categories, about 10 or so (jpgs).

THANKS for the excellent manual, cool!
What I wonder is, what is this comment about "not for online"?
If the gallery once online, would I am able to copy the whole stuff on my handy and let it run there (not online)?

And the last question:
For creating the thumbs and jpgs ... could we do this not using, after closing your app, the batch-converter from IMatch?
I attaches some screenshots, but I am sure, I do something wrong.  8)


Best wishes from Switzerland! :-)
Markus

axel.hennig

Quote from: sinus on April 07, 2022, 09:14:12 AM
I cannot enter a category-field.
Your app runs fine, the tree to choose a category opens and I can click on a category, but it does not appear (like the output-folder).
Then I thought, ok, the category is maybe choosen, but simply hidden in the field.

Hmmm, don't know why this is not working. I had this once for one specific category. But I was able to choose another category. Could you please try the following two things:

  • Run the app and choose any other category compared to the one you've choosen before. Don't let the app run, just check if the field "Input Category" gets filled.
  • Rename your "nanogallery2" category to something different and try again if you're able to choose that category.

Quote from: sinus on April 07, 2022, 09:14:12 AM
What I wonder is, what is this comment about "not for online"?

The app pre-loads all albums when you open the "index.html". Normally you wouldn't do that on a webpage. There you would just load the album you want to look at. But offline this is not possible, because all modern browsers block loading local files for good reasons. Therefore I had to come up with another solution (loading everything in advance). This solution might be slow on webservers (and maybe also on slow PCs).

Quote from: sinus on April 07, 2022, 09:14:12 AM
For creating the thumbs and jpgs ... could we do this not using, after closing your app, the batch-converter from IMatch?

Yes, I think so. More or less only reason why I decided to do that "outside" of IMatch is because I also want to use nanogallery2 for videos and therefore thumbnail-conversion and video-conversion is a little bit more difficult.

sinus

Quote from: axel.hennig on April 07, 2022, 09:34:43 AM
Quote from: sinus on April 07, 2022, 09:14:12 AM
I cannot enter a category-field.
Your app runs fine, the tree to choose a category opens and I can click on a category, but it does not appear (like the output-folder).
Then I thought, ok, the category is maybe choosen, but simply hidden in the field.

Hmmm, don't know why this is not working. I had this once for one specific category. But I was able to choose another category. Could you please try the following two things:

  • Run the app and choose any other category compared to the one you've choosen before. Don't let the app run, just check if the field "Input Category" gets filled.
  • Rename your "nanogallery2" category to something different and try again if you're able to choose that category.


Thanks for your answers, I understand this now (why not online).

I tried this before, I can add new categories or choose others, plain categories, with formulas, old categories, does not matter, the field stays empty.

But I have just realize, I am still on 2021.14.4, which means one version behind the actual one from IMatch.  :-[
I do not think, that this is a reason, but I will update IMatch in one or two hours and try again your app.

Because, this seems really to be a cool app.  :)

But do not waste too much time for this, after all, on ubacher's machine your app runs smooth, and until now, only here not. Could be also something on my computer.
After I have updated IMatch and tried again, I will report here again.
Best wishes from Switzerland! :-)
Markus

Jingo

Thanks for the APP share... looks really cool.  I still use my Gallery App on an ongoing basis to share photos with family and friends using my online host - always nice to have an offline option though too.

For the last manual step - you should be able to easily create these thumbnails from within the app using command line calls along with ImageMagick... check out my latest APP where I do this to create a temp JPG to gather estimate out size... ImageMagick allows all sorts of resize parameters so creating two additional files during export should be quite easy and then users would not need to manually do any work.

Thx again...Andy.

sinus

Axel, I have updated to 2021.15.2  :D

But unfortunately the category-field stays empty, does not matter, what I select for categories.

But as Jingo has written something, it seems to work there too, hence it could be simply my machine.
Hence I would do nothing, maybe other users does also try your app.

Jingo made a suggestion for the jpgs, what must be created.
But the only thing, what I like generelly not, that we have then to install something (ImageMagick). Sometimes I think, we have to install this and that app, what drives me sometimes crazy.  8)

I used ImageMagick some years ago, a fine tool, with success. Nevertheless, if this nanogallery-app once runs on my computer, then I will use to create (at least try) the Batch-processor of IMatch.
Best wishes from Switzerland! :-)
Markus

axel.hennig

Quote from: sinus on April 07, 2022, 02:35:12 PM
But unfortunately the category-field stays empty, does not matter, what I select for categories.

Sorry sinus, I just don't know why it is not working. Will try to solve this, just because I would like to understand what's going on.

To be clear: Selecting a category means that you have to click into the square on the left. A "plus" will appear. See my screenshot.

I've also changed one line of code (starting from line 211) in the index.html. Instead of options: 'singlesel' it is now options: 'default,singlesel'. See also below.


IMatch.categoryBrowser({
    options: 'default,singlesel'
}).then(response => {
    inputCatId = response.id[0];
    $('#inputCategory').text(response.categories[0]);
});


Maybe this helps in solving your problem.

Quote from: sinus on April 07, 2022, 02:35:12 PM
But the only thing, what I like generelly not, that we have then to install something (ImageMagick).

I fully agree. Therefore I'm currently looking if this is somehow achievable within IMatch or by just adding a batch command-line exe to the app that runs fully automatic at the end...

sinus

#10
Quote from: axel.hennig on April 07, 2022, 04:00:07 PM
Quote from: sinus on April 07, 2022, 02:35:12 PM
But unfortunately the category-field stays empty, does not matter, what I select for categories.

Sorry sinus, I just don't know why it is not working. Will try to solve this, just because I would like to understand what's going on.

To be clear: Selecting a category means that you have to click into the square on the left. A "plus" will appear. See my screenshot.

Success!  :)

Cool, Axel, thanks a lot and I am very sorry, I am contrite about my stupidity.  :-[

You sentence above and you attachment made it clear.
I clicked NOT on the sqare, I clicked on the category itself (like I do in IMatch).

And I did your small change to the index-file, it works with the changed line and I checked also, it works also with the "old" line.

I did a short test and did the small jpgs with photoshop (in the two folders) and WOW, cool, very good!

Thanks a lot for your help and assistance and for sharing the app.
:D

update: and btw, you made a nice icon for the app
Maybe I can not show some images to my family better with this app ... Easter ist coming
Best wishes from Switzerland! :-)
Markus

axel.hennig

@sinus: happy to hear that it's working.

sinus

me too!

Thanks, now I can "explore" your app!  :)
Best wishes from Switzerland! :-)
Markus

ubacher

I tried the gallery some more - with more files.
On the thumbnail page I get a maximum of three lines even if enough space is available.
And there is no way to scroll the thumbs page.
Are these known limitations?

axel.hennig

Hi ubacher,

I wouldn't call this a limitation. This is just the "initial setting". You can easily change this:


  • If you have already created a gallery: Go to the output-folder. There must be a sub-folder called "media_js". Open all files within this folder with a texteditor (e.g. Notepad++) and change line 6 from "galleryDisplayMode: 'rows'," to "galleryDisplayMode: 'fullContent',"
  • If you want to change this prior to gallery-creation: Go into the app-folder. Within the sub-folder "templates" open the file "dynamic_album.js" and change line 5 accordingly.

All possible settings for "galleryDisplayMode" (and all the other settings) can be found here: https://nanogallery2.nanostudio.org/documentation.html

Hope this helps.