How to Create a Note with Shortcuts — with photo metadata?

There is perfect Shortcut Images to Markdown by Jim Neumann.

I changed UTI field to public.jpeg, and make import in .jpeg format. BUT it does not import metadata like GPS, creation date, etc.

How make the shortcut and DTTG import photos with metadata?

1 Like

When I run the shortcut, I get a PNG image in DTTG. This, of course, does never have any metadata, so it is no wonder that you do not see any (in my case, even the size in Bytes is given as “0” although the image is several MB in size). But, as you described, changing the entry for UTI to “public.jpeg” gives me a JPEG – again with size 0 and no metadata.

However, if I share an image from photos lib to DTTG, I get the metadata and size just fine. So I suppose that something™ goes awry in the “create object in DDTG” action when the object is an image. @BLUEFROG: Do you have any insight into this?

I use this shortcut for journalling and including metadata would be a bonus if it could be captured.

Actually, @eboehnisch would have to respond on this one as it’s directly related to the Shortcut action.

Thanks for the nice comments! :slight_smile:

At the moment adding files to DEVONthink To Go via Shortcuts does no special post-processing like extracting EXIF data or dates. It takes the file, whatever it is, and adds it to the database. When you share an image through the Clip to DEVONthink extension, the file is post-processed.

But it would be fairly simple to create a shortcut that:

  • takes a photo or retrieves a photo from the iOS photo album
  • retrieves the associated meta-data (appears to be a JSON library)
  • add the file to DTTG (Create Item action)
  • optionally update the meta-data (Update Item Metadata action)

@Igor_B or @tenbobnote just need to take some time to process the metadata in Shortcuts and add that as metadata to the created file.

I do not quite understand that. The EXIF data is in the image, why would ones extract it? And why is the size of an image imported via the shortcut 0 in DTTG? This is surely not an EXIF value.

The EXIF data would need to be read (extracted in the meaning of found-and-read, not removed) from the image to get, e.g., the GPS information. The file size stored in the database, though, should be updated, that’s correct.

Thanks for clearing that up. Basically, the “import via shortcut” action should behave similarly to the “share” action, I think. In other words: If the data is there, DT should display it. But that’s your call, of course.

We’ll surely have a look.

Fixed for the next maintenance release.

2 Likes

I use DEVONthink to store all photos.

One database with all photos, in conjunction with other databases, is used for

  • Family photo-album
  • Business journaling
  • Personal journaling

Photo.app is just inbox for fresh photos.

Mac + iCloud + Photo.app + Keyboard Maestro are used to transfer new photos to DEVONthink. This system is cumbersome in compare with the Shortcut.

If the Shortcut can get metadata, this would allow instant transfer every new set of photos (and notes with comments to every set) with essential data to DEVONthink.

2 Likes

I found shortcut, which imports metadata with jpeg.

It is DEVONimage at page Shortcuts Archive - MacStories.

It imports metadata with GPS (I checked on mac), BUT DTTG does not show geolocation in info.

Dear developers, please, update shortcut Images to Markdown / DTTG, for import jpeg metadata and showing geolocation.

BTW, there are more interesting shortcuts for DTTG at Shortcuts Archive - MacStories.