ShareShortcuts
Создать форк «Photos Save Time Stamp»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы donvy получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
31K
Сохранено
1
Действия
12
Категория
Photos and videos
Версия
1.0
Язык
EN

Photos Save Time Stamp by donvy Jul/19/2023 23:17H The shortcut prompts you to select photos. Takes the Date Taken information from the photo's Metadata, generates a timestamp, and renames the file by prepending this time stamp to the original filename. Example: from IMG_0234.jpeg to 20230718_171313-IMG_0234.jpeg Photos are saved to Files/4Archive which can be modified to your preferred directory. Setting a variable output folder will require interaction for each file which is irritating.

Что нового

Версия 1.0

First release

История версий
1.0 19 июл 2023 г.

First release

Что делает

Действий: 12
  1. Comment
    Photos Save Time Stamp by donvy Jul/19/2023 23:17H The shortcut prompts you to select photos. Takes the Date Taken information from the photo's Metadata, generates a timestamp, and renames the file by prepending this time stamp to the original filen…
  2. Select Photos
  3. Repeat with Each
  4. Set Variable
    Image1
  5. Get Details of Images
  6. Set Variable
    Filename
  7. Get Details of Images
  8. Format Date
  9. Set Variable
    Date4filename
  10. Combine Text
  11. Set Name
  12. Save File

Посмотреть как код
Бета

Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.

#include 'actions/photos'
#define color darkblue
#define glyph photoStackAlt

/*
Photos Save Time Stamp by donvy 
Jul/19/2023 23:17H

The shortcut prompts you to select photos.  Takes the Date Taken information from the photo's Metadata, generates a timestamp, and renames the file by prepending this time stamp to the original filename.

Example: from IMG_0234.jpeg to
20230718_171313-IMG_0234.jpeg

Photos are saved to Files/4Archive which can be modified to your preferred directory. Setting a variable output folder will require interaction for each file which is irritating. 
*/
const Photos = selectPhotos(true)

for _ in Photos {
	@Image1 = @RepeatItem
	getImageDetail(@Image1, "Name")
	@Filename
	getImageDetail(@Image1, "Date Taken")
	formatDate(, "Custom", "yyyyMMdd_HHmmss")
	@Date4filename
	joinText([map[Value:map[attachmentsByRange:map[{0, 1}:map[Type:Variable VariableName:Date4filename]] string:] WFSerializationType:WFTextTokenString] map[Value:map[attachmentsByRange:map[{0, 1}:map[Type:Variable VariableName:Filename]] string:] WFSerializationType:WFTextTokenString]], "-")
	const RenamedItem = setName(@Image1)
	saveFilePrompt(RenamedItem)
}
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

Оценки и отзывы

Написать отзыв
–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Пока нет отзывов. Поделись мнением первым!

Реклама

Вам также может понравиться

См. все
Реклама