Has anyone seen a neat content adapter for s3 bucket galleries?

Has anyone seen a good content adapter for s3 bucket XML?

I figure a set of buckets in s3 with images is a ripe candidate for a content adapter and that someone far better at it than me has prolly already gotten something they think is pretty cool… but a few searches, and some searching around on here hasn’t proved terribly fruitful… So… I figured I’d ask an see…

What does the XML file look like? Please provide an example.

How do you access the XML?

Why use a content adapter? Do you want to create a page for each bucket image?

Hi Joe!!
Hope your world is awesome.

an example xml output for a bucket which may contain images:

https://pubimgs.dog.wolfspyre.io
( I made a bunch of images, and this bucket for the purpose of sharing here)
There’s a less ugly listing available here

within this bucket (pubimgs)

there’s a subdir:
“Hugo”

within Hugo, there are three subdirs:
“Yes”
“Maybe”
“No”
Within each of those, there are webp images.

There’s another subdir of the bucket:
“WolfspyreCom”

inside it, there’s 2409/ (( Keep | Maybe | Fail ))
for each of those cohorts, there’s a few different compression-level directories.

inside each of those, webp images.

this is a contrived example… and it could be laid out differently… I was just sorta throwing together the images from a step in my workflow where it felt like it might be reasonable to batch-push a bunch of images to an s3 bucket

I was figuring that a content adapter would be useful to generate galleries from the contents of a public-read bucket.

figured that having multiple compression levels, and multiple project constructs in the same bucket could make sense if one specified to the content adapter which content you wanted displayed in a given scenario…

thoughts?

???

???

the entire buckets’ contents are returned as an xml blob
as the result of a get request made to the top-level bucket

I imagine one might want to do a few different things depending on implementation and use…
I could see one wanting to be able to

  • create a gallery-style thumbnail array of all content which matches $string
  • create a gallery-style thumbnail array of all content which matches $string, per directory
  • create a gallery-style thumbnail array of all content which matches $string, per directory, excluding $directory
  • create a gallery-style thumbnail array of all content which matches $string, per directory, for all directories which match $directorymatcher

what are your thoughts?

I don’t see how a content adapter would apply here, but maybe I’m missing something.

maybe i’m confused

i thought a content adapter could be used to have hugo render a bundle of pages and subpages…

so i thought ‘here is a big long list of images’

make a gallery automagically for any file in a ‘Keep’ sub-bucket, keyed off the parent.

so in this case:

/Hugo/
/WolfspyreCom/

the size/quality sub-dirs were just there as a possible ‘how might one list multiple versions of same asset’
quandary but it’s certainly not necessary

I’ll ask once again…

Yes or no.