Code Monkey home page Code Monkey logo

lightroom-album-import's Introduction

This is Max, he would like to welcome you to my profile:

image

I'm Michael, a software engineer in New York City working at Anthropic. Previously, I worked on the Projects and Pull Requests teams at GitHub, and worked as an engineer at The New York Times for 10 years.

Outside of programming, I spend a lot of time photographing concerts. You can see some of my photos here: http://strickles.photos/

lightroom-album-import's People

Contributors

abstrctn avatar

Watchers

 avatar  avatar

lightroom-album-import's Issues

Handle removal of images from an album

If an image is removed from an album, it won't be included in the sorted_image_ids or sorted_image_paths outputs. But it would be nice to provide an option to remove the image / sidecar / json files from source control as well.

This would necessitate some way of differentiating any files associated with a given album from the other assets in a repo.

  • One option would be to remove any items in a download_directory that aren't active in the current album, but ideally I think we'd allow for a download location that isn't unique to an album.
  • Another option might be storing an album identifier in an Exif tag; any non-current images in the download_directory that match the album's tag could be targeted for deletion.
  • We could also call this out of scope.

For the second option, we'd have to choose a tag to store the album ID.

  • xmpDM:Album - This seems highly correlated to music albums however, so may be inappropriate
  • IPTC:JobID or IPTC:OwnerID - Don't seem to be widely standardized
  • imageUniqueID - Currently used to store the Lightroom asset ID, but could be turned into a compound field of both the album and image ids

Stacked assets duplicated and not in order

The intention of the hide_stacked_assets parameter was to exclude all images within a stack except for the image at the front of each stack, so that the list of images that a user sees in Lightroom (and their order) match what is downloaded in the action.

It looks like I was mistaken about how that parameter works in the underlying API, however:

  • Setting it to true hides every item in the stack, including the front asset
  • That parameter doesn't seem to even work in the unauthenticated version of the API

But it looks like stacks and their contents are still available in that API, by adding stack to the subtype querystring parameter.

Within the stack assets, the cover.id seems to refer to the asset ID of the first image in the stack. And the stack assets themselves have a sort field that seems to be reflected in the returned asset order.

    {
      "id": "2adc3595bc694263b5acc89ad...",
      "type": "album_asset",
      "asset": {
        "id": "3eb54d9f08524b95af610c4233...",
        "type": "asset",
        "subtype": "stack",
        "payload": {
          "userUpdated": "2023-04-28T20:59:17.965Z",
          "cover": {
            "id": "c00bbaa6f9c34824b359d2c2b..."
          },
        }
      },
    },

Unfortunately, the underlying assets are also present, and other than the cover asset, there isn't anything that distinguishes "hidden" assets from non-stacked assets. This could be handled with hide_stacked_assets, but without returning that data, we don't have access to the metadata we need for the cover image.

For now, this could be handled by making two requests, one with subtype=image,stack and hide_stacked_assets=true, and the second with subtype=image and hide_stacked_assets=false.

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.