불러오는 중…

rostiger@rostiger@merveilles.town

@exquisitecorp Sure! ocular has no comment system per se, uploading to Mastodon (which is completely optional) serves that function.

You can have multiple galleries by creating multiple project directories where the script lives in each of them. You can't build different galleries with one command though, you would need to build each gallery separately and manually.

The setup and usage instructions currently live in the readme in the repo. Is there anything you are missing? Or do you think better communication on where to find the instructions would be enough?

lee@exquisitecorp@merveilles.town
@rostiger@merveilles.town 님에게 답글

@rostiger thanks, that's helpful info re multiple galleries.

In terms of install and running okular, WHERE do i put my photos? does okular resize them? do i need to name them anything in particular? how do i add captions?

i'd add the output of okular -h to your README. on looking at the script it seems like maybe you use okular -a and then add a single image at a time? i'm not certain.

i guess i was expecting i'd drop images in a folder, have a text file with captions or titles, and then run your script. i'm thinking that assumption is incorrect.

rostiger@rostiger@merveilles.town

@exquisitecorp Ah, that's valuable feedback, thank you! I need to clarify the intention of ocular: it's more of a smallweb replacement for platforms like instagram or pixelfed. Unlike many gallery systems out there where you take a bunch of pictures and it creates a gallery, ocular is for sharing pictures one by one, creating a feed of images. Instead of uploading an image to a platform, you add the image locally, build the gallery and upload the whole thing. With each upload, the feeds from the webring are pulled and integrated in the gallery.

This is also why you don't put any images anywhere than were they already are on your computer. ocular will create a database with the absolute paths to the image, which can be anywhere on your computer. It creates differently sized previews and stores them inside its project directory, but the originals will stay untouched.

Tova Bele@tovabele@mastodon.gamedev.place
@rostiger@merveilles.town 님에게 답글

@rostiger this is really great. i have been looking for a way out of corporate image hosting and sharing. i read through the repo docu, it all seems doable. i have a webserver, just need to check how to access it without “their” online toolset.

one big question though: depending on where i am, i use different machines (linux laptop, osx macbook and win desktop)
Do you think this works with posting to the gallery, or are there local dependencies that need to be synced?

rostiger@rostiger@merveilles.town

@tovabele Nice! Happy to hear you'd like to give it a shot.

I have only tested it on Ubuntu, where all of the dependencies are already pre-installed. Theoretically it should be possible to use on a Mac, since afaik MacOS also comes with commands such as mkdir, cp, rm, rsync and curl preinstalled. I have never tried it, but I'd be curious if it works for sure!

As for windows, I have no idea what would be needed to get it up an running, but I'm pretty confident that it won't run out of the box.

Anyway, if you do try it, let me know how it goes or if you run into any issues. :3

Cory@drisc@merveilles.town
@rostiger@merveilles.town 님에게 답글

@rostiger Right now I'm getting this when I try to add an image so I'll be digging into it to see what is going on.

I can potentially solve the realpath issue with grealpath which is installed via 'brew install coreutils', you can add the gnubin folder to the PATH to force your computer to use grealpath for realpath but that might break something if the user is relying on the macOS bundled version somewhere else.

rostiger@rostiger@merveilles.town
@drisc@merveilles.town 님에게 답글

@drisc I'm considering to do away with realpath altogether. I changed the code recently so original images are copied to src/img/ instead of storing the path in the database because it would cause issues if the original file was moved or renamed.

The Lua code currently takes care of copying images, right after adding everything to the database. I could copy the image earlier, in the bash script. The only downside is if the script were canceled prematurely, the image would still be copied to the src dir.

rostiger@rostiger@merveilles.town
@rostiger@merveilles.town 님에게 답글

@drisc Ok, I found another solution that should be compatible with macOS. Instead of realpath, you can use

absPath=$(cd "$WD_PATH/$(dirname "$1")" && pwd)/$(basename "$1")

This changes the working directory to the directory of the image, prints the working directory path and concatenates the filename resulting in the absolute path of the file.

Can you test if this works on your machine?