photo album with publisher

34 views
Skip to first unread message

Sebastien Binet

unread,
Jun 3, 2022, 10:33:32 AM6/3/22
to Perkeep
hi there,

I am trying to setup a (set of) photo album(s) for the whole family, using the publisher tool:

$> XXX=$(pk-put permanode)
$> pk describe $XXX
{
  "meta": {
    "sha224-43fb48f8dc6c7ea658f1e7bb1e689f1f478410aa430c9b194c18507f": {
      "blobRef": "sha224-43fb48f8dc6c7ea658f1e7bb1e689f1f478410aa430c9b194c18507f",
      "camliType": "permanode",
      "size": 629,
      "permanode": {
        "attr": {},
        "modtime": "0001-01-01T00:00:00Z"
      }
    }
  }
}

$> pk-put attr $XXX title album
$> pk-put attr $XXX camliRoot album-pics
## adding a photo to the album.
$> pk-put attr $XXX camliPath:pic1 sha224-c7ebcb56a71c194cbf36ac30e387865cb5a1eb0f775a3526dcb162f8

with the following publisher configuration in the server:

    "publish": {
        "/pics/": {
            "camliRoot": "album-pics",
            "cacheRoot": "/home/binet/var/perkeep/blobs/cache",
            "goTemplate": "gallery.html"
        }
    }

when I navigate to the permanode "album-pics" from within /ui, I do see the image I had previously added.
however, when I navigated to http://localhost:3179/pics, I got a 403, unauthorized.

it's only after "git grep 403 -- app/publisher" that I understood I needed to give the full path to the thing I wanted to display.

I then added yet another permanode (album 2022), added it to the "album-pics" permanode camliPath attribute, and added the image to that new permanode.
so I could navigate to "http://localhost:3179/pics/2022" to get what I expected.

am I holding "publisher" wrong?
put another way:
if I want to provide my mom with something like a perkeep-backed "google photo", is publisher a good workhorse or a good first-step?

side question: I'd like to be able to provide a way to also edit photos (hue/crop/gray/...) and automatically display the modified photo by default (while still being able to get back at the original).
is playing tricks with a blob's attribute (say: the presence of a "modified: sha256-xxx" / "original: sha256-yyy" pair) a good strategy?

apologies for the barrage of questions,
-s

Reply all
Reply to author
Forward
0 new messages