mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-28 17:29:31 +01:00
Export subfolder: {date} and {hour} in local time, not UTC (the day the person exported on)
This commit is contained in:
1 parent
a3281b74e8
commit
914fc9f006
23 files changed
+68
-47
No files matched your search
@@ -75,7 +75,7 @@ pub struct ExportOptions {
|
||||
/// A specific folder for the whole batch, or each photo's own folder.
|
||||
pub destination_mode: DestinationMode,
|
||||
/// Created inside the destination folder (empty = none). Supports `{album}`, `{date}`
|
||||
/// (YYYYMMDD, UTC) and `{hour}` (HHMM, UTC) variables, expanded during batch preparation
|
||||
/// (YYYYMMDD) and `{hour}` (HHMM, both in local time) variables, expanded during batch preparation
|
||||
/// once per batch using the active album view (or empty outside an album view). Presets store
|
||||
/// the raw template.
|
||||
pub subfolder: String,
|
||||
|
||||
@@ -132,7 +132,8 @@ pub fn clean_album_name(album: &str) -> String {
|
||||
/// text (such as `{date}` or `{hour}`) is never double-expanded.
|
||||
///
|
||||
/// - `album`: the active album name, cleaned with [`clean_album_name`]; `None` expands `{album}` to `""`.
|
||||
/// - `now`: the UTC timestamp for `{date}` (YYYYMMDD) and `{hour}` (HHMM); `None` uses current UTC time.
|
||||
/// - `now`: the local date and time for `{date}` (YYYYMMDD) and `{hour}` (HHMM), as the person's clock shows it
|
||||
/// ([`local_now`]); `None` uses the time now.
|
||||
/// - Unknown tokens are left unchanged. The result passes through [`clean_subfolder`].
|
||||
///
|
||||
/// E.g. `"{album}/{date}_{hour}"` with album `"Vacation"` produces `"Vacation/20261107_0230"`.
|
||||
@@ -142,11 +143,7 @@ pub fn expand_subfolder(template: &str, album: Option<&str>, now: Option<chrono:
|
||||
if template.is_empty() || !template.contains('{') {
|
||||
return clean_subfolder(template);
|
||||
}
|
||||
let now = now.unwrap_or_else(|| {
|
||||
let since = web_time::SystemTime::now().duration_since(web_time::UNIX_EPOCH).unwrap_or_default();
|
||||
let secs = i64::try_from(since.as_secs()).unwrap_or(i64::MAX);
|
||||
chrono::DateTime::from_timestamp(secs, 0).map(|dt| dt.naive_utc()).unwrap_or_default()
|
||||
});
|
||||
let now = now.or_else(local_now).unwrap_or_default();
|
||||
let date_str = now.format("%Y%m%d").to_string();
|
||||
let hour_str = now.format("%H%M").to_string();
|
||||
let album_str = album.map(clean_album_name).unwrap_or_default();
|
||||
@@ -156,6 +153,16 @@ pub fn expand_subfolder(template: &str, album: Option<&str>, now: Option<chrono:
|
||||
clean_subfolder(&res)
|
||||
}
|
||||
|
||||
/// The date and time now on the person's clock, for `{date}` and `{hour}`: the host's zone, with the offset in force
|
||||
/// now ([`crate::import::local_civil`]; the web build has no zone to read and uses UTC). A folder named by its
|
||||
/// export date is named by the day the person exported on, not by UTC's, which is the next or the previous day
|
||||
/// for part of every day away from UTC.
|
||||
pub(super) fn local_now() -> Option<chrono::NaiveDateTime> {
|
||||
let since = web_time::SystemTime::now().duration_since(web_time::UNIX_EPOCH).unwrap_or_default();
|
||||
let secs = i64::try_from(since.as_secs()).unwrap_or(i64::MAX);
|
||||
chrono::NaiveDateTime::parse_from_str(&crate::import::local_civil(secs), "%Y-%m-%dT%H:%M:%S").ok()
|
||||
}
|
||||
|
||||
impl<'a> Placer<'a> {
|
||||
pub(super) fn new(
|
||||
o: &'a ExportOptions,
|
||||
|
||||
@@ -101,9 +101,8 @@ pub fn prepare_export(
|
||||
/// [`prepare_export`] for each of `ids` in order (`{seq}` = position, from 1).
|
||||
pub fn prepare_batch(session: &mut crate::Session, ids: &[lightcraft_catalog::PhotoId], o: &ExportOptions) -> Result<Vec<PreparedExport>, String> {
|
||||
let guard = std::sync::Arc::new(session.original_guard());
|
||||
let since = web_time::SystemTime::now().duration_since(web_time::UNIX_EPOCH).unwrap_or_default();
|
||||
let secs = i64::try_from(since.as_secs()).unwrap_or(i64::MAX);
|
||||
let now = chrono::DateTime::from_timestamp(secs, 0).map(|dt| dt.naive_utc());
|
||||
// the whole batch goes to one dated folder: the time is read once
|
||||
let now = super::place::local_now();
|
||||
let album_name = match session.source {
|
||||
crate::LibrarySource::Album(aid) => session.catalog.album(aid).map(|a| a.name.clone()),
|
||||
_ => None,
|
||||
|
||||
@@ -307,6 +307,21 @@ fn clean_album_name_sanitizes_reserved_names_and_illegal_chars() {
|
||||
assert_eq!(clean_album_name("com¹.backup"), "com¹_.backup");
|
||||
}
|
||||
|
||||
/// `{date}` and `{hour}` are the person's local date and time (the host's zone), not UTC's: an evening export west
|
||||
/// of UTC, or a morning one east of it, goes to that day's folder.
|
||||
#[test]
|
||||
fn subfolder_date_and_hour_are_local_time() {
|
||||
use crate::export::expand_subfolder;
|
||||
let secs = i64::try_from(web_time::SystemTime::now().duration_since(web_time::UNIX_EPOCH).unwrap().as_secs()).unwrap();
|
||||
let local = crate::import::local_civil(secs);
|
||||
let expected = format!("{}/{}", local.get(..10).unwrap().replace('-', ""), local.get(11..16).unwrap().replace(':', ""));
|
||||
let got = expand_subfolder("{date}/{hour}", None, None);
|
||||
// (a minute may turn between the two readings)
|
||||
let next = crate::import::local_civil(secs + 60);
|
||||
let later = format!("{}/{}", next.get(..10).unwrap().replace('-', ""), next.get(11..16).unwrap().replace(':', ""));
|
||||
assert!(got == expected || got == later, "{got} is not the local {expected}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn expand_subfolder_variables_and_ordering() {
|
||||
use crate::export::expand_subfolder;
|
||||
|
||||
@@ -2540,8 +2540,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Klikněte pravým tlačítkem → Najít chybějící soubor… a najděte jej znovu.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Klikněte pravým tlačítkem → Znovu načíst z disku a zkuste to znovu.",
|
||||
"Album name (empty outside an album view)": "Název alba (prázdné mimo zobrazení alba)",
|
||||
"Export date, UTC (YYYYMMDD)": "Datum exportu, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Čas exportu, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Datum exportu (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Čas exportu (HHMM)",
|
||||
"Insert variable": "Vložit proměnnou",
|
||||
"Insert…": "Vložit…",
|
||||
"none ({album}, {date}, {hour})": "žádné ({album}, {date}, {hour})"
|
||||
|
||||
@@ -3598,8 +3598,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Rechtsklick → Fehlende Datei suchen…, um sie wiederzufinden.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Rechtsklick → Vom Datenträger neu laden, um es erneut zu versuchen.",
|
||||
"Album name (empty outside an album view)": "Albumname (leer außerhalb einer Albumansicht)",
|
||||
"Export date, UTC (YYYYMMDD)": "Exportdatum, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Exportzeit, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Exportdatum (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Exportzeit (HHMM)",
|
||||
"Insert variable": "Variable einfügen",
|
||||
"Insert…": "Einfügen…",
|
||||
"none ({album}, {date}, {hour})": "keine ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2494,8 +2494,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Clic derecho → Localizar archivo que falta… para encontrarlo de nuevo.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Clic derecho → Recargar desde el disco para intentarlo de nuevo.",
|
||||
"Album name (empty outside an album view)": "Nombre del álbum (vacío fuera de una vista de álbum)",
|
||||
"Export date, UTC (YYYYMMDD)": "Fecha de exportación, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Hora de exportación, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Fecha de exportación (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Hora de exportación (HHMM)",
|
||||
"Insert variable": "Insertar variable",
|
||||
"Insert…": "Insertar…",
|
||||
"none ({album}, {date}, {hour})": "ninguno ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2452,8 +2452,8 @@
|
||||
"Stars on hover: flags and colour labels always show; the stars and the edited mark appear while a photo is hovered or selected.": "Tähdet osoitettaessa: liput ja värimerkinnät näkyvät aina; tähdet ja muokattu-merkki näkyvät, kun kuvaa osoitetaan tai se on valittuna.",
|
||||
"Virtual copy": "Virtuaalikopio",
|
||||
"Album name (empty outside an album view)": "Albumin nimi (tyhjä albumnäkymän ulkopuolella)",
|
||||
"Export date, UTC (YYYYMMDD)": "Vientipäivämäärä, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Vientiaika, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Vientipäivämäärä (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Vientiaika (HHMM)",
|
||||
"Insert variable": "Lisää muuttuja",
|
||||
"Insert…": "Lisää…",
|
||||
"none ({album}, {date}, {hour})": "ei mitään ({album}, {date}, {hour})"
|
||||
|
||||
@@ -3677,8 +3677,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Clic droit → Localiser le fichier manquant… pour le retrouver.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Clic droit → Recharger depuis le disque pour réessayer.",
|
||||
"Album name (empty outside an album view)": "Nom de l'album (vide hors vue d'album)",
|
||||
"Export date, UTC (YYYYMMDD)": "Date d'export, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Heure d'export, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Date d'export (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Heure d'export (HHMM)",
|
||||
"Insert variable": "Insérer une variable",
|
||||
"Insert…": "Insérer…",
|
||||
"none ({album}, {date}, {hour})": "aucun ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2466,8 +2466,8 @@
|
||||
"Stars on hover: flags and colour labels always show; the stars and the edited mark appear while a photo is hovered or selected.": "Bintang saat kursor di atas: bendera dan label warna selalu tampil; bintang dan tanda telah diedit muncul saat kursor berada di atas foto atau foto dipilih.",
|
||||
"Virtual copy": "Salinan virtual",
|
||||
"Album name (empty outside an album view)": "Nama album (kosong di luar tampilan album)",
|
||||
"Export date, UTC (YYYYMMDD)": "Tanggal ekspor, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Waktu ekspor, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Tanggal ekspor (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Waktu ekspor (HHMM)",
|
||||
"Insert variable": "Sisipkan variabel",
|
||||
"Insert…": "Sisipkan…",
|
||||
"none ({album}, {date}, {hour})": "tidak ada ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2658,8 +2658,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Clic destro → Trova file mancante… per ritrovarlo.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Clic destro → Ricarica dal disco per riprovare.",
|
||||
"Album name (empty outside an album view)": "Nome dell'album (vuoto fuori dalla vista album)",
|
||||
"Export date, UTC (YYYYMMDD)": "Data di esportazione, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Ora di esportazione, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Data di esportazione (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Ora di esportazione (HHMM)",
|
||||
"Insert variable": "Inserisci variabile",
|
||||
"Insert…": "Inserisci…",
|
||||
"none ({album}, {date}, {hour})": "nessuno ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2492,8 +2492,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "右クリック → 見つからないファイルを指定… で、ファイルをもう一度指定できます。",
|
||||
"Right-click ▸ Reload from Disk to try again.": "右クリック → ディスクから再読み込み で、もう一度試せます。",
|
||||
"Album name (empty outside an album view)": "アルバム名(アルバム表示外では空)",
|
||||
"Export date, UTC (YYYYMMDD)": "書き出し日、UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "書き出し時刻、UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "書き出し日 (YYYYMMDD)",
|
||||
"Export time (HHMM)": "書き出し時刻 (HHMM)",
|
||||
"Insert variable": "変数を挿入",
|
||||
"Insert…": "挿入…",
|
||||
"none ({album}, {date}, {hour})": "なし ({album}, {date}, {hour})"
|
||||
|
||||
@@ -3761,8 +3761,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "მარჯვენა დაწკაპუნება → დაკარგული ფაილის მოძებნა… ფაილის ხელახლა საპოვნელად.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "მარჯვენა დაწკაპუნება → დისკიდან ხელახლა ჩატვირთვა, ხელახლა საცდელად.",
|
||||
"Album name (empty outside an album view)": "ალბომის სახელი (ცარიელია ალბომის ხედის გარეთ)",
|
||||
"Export date, UTC (YYYYMMDD)": "ექსპორტის თარიღი, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "ექსპორტის დრო, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "ექსპორტის თარიღი (YYYYMMDD)",
|
||||
"Export time (HHMM)": "ექსპორტის დრო (HHMM)",
|
||||
"Insert variable": "ცვლადის ჩასმა",
|
||||
"Insert…": "ჩასმა…",
|
||||
"none ({album}, {date}, {hour})": "არცერთი ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2419,8 +2419,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Kliknij prawym przyciskiem → Znajdź brakujący plik…, aby go odnaleźć ponownie.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Kliknij prawym przyciskiem → Wczytaj ponownie z dysku, aby spróbować jeszcze raz.",
|
||||
"Album name (empty outside an album view)": "Nazwa albumu (pusta poza widokiem albumu)",
|
||||
"Export date, UTC (YYYYMMDD)": "Data eksportu, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Czas eksportu, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Data eksportu (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Czas eksportu (HHMM)",
|
||||
"Insert variable": "Wstaw zmienną",
|
||||
"Insert…": "Wstaw…",
|
||||
"none ({album}, {date}, {hour})": "brak ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2338,8 +2338,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Clique com o botão direito → Localizar arquivo ausente… para encontrá-lo de novo.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Clique com o botão direito → Recarregar do disco para tentar de novo.",
|
||||
"Album name (empty outside an album view)": "Nome do álbum (vazio fora de uma visualização de álbum)",
|
||||
"Export date, UTC (YYYYMMDD)": "Data de exportação, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Hora de exportação, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Data de exportação (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Hora de exportação (HHMM)",
|
||||
"Insert variable": "Inserir variável",
|
||||
"Insert…": "Inserir…",
|
||||
"none ({album}, {date}, {hour})": "nenhum ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2700,8 +2700,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Щёлкните правой кнопкой → Указать отсутствующий файл…, чтобы найти его снова.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Щёлкните правой кнопкой → Перезагрузить с диска, чтобы повторить попытку.",
|
||||
"Album name (empty outside an album view)": "Название альбома (пусто вне просмотра альбома)",
|
||||
"Export date, UTC (YYYYMMDD)": "Дата экспорта, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Время экспорта, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Дата экспорта (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Время экспорта (HHMM)",
|
||||
"Insert variable": "Вставить переменную",
|
||||
"Insert…": "Вставить…",
|
||||
"none ({album}, {date}, {hour})": "нет ({album}, {date}, {hour})"
|
||||
|
||||
@@ -3884,8 +3884,8 @@
|
||||
"Stars on hover: flags and colour labels always show; the stars and the edited mark appear while a photo is hovered or selected.": "Stjärnor vid pekaren: flaggor och färgetiketter visas alltid; stjärnorna och märket för redigerad visas när pekaren är över ett foto eller när det är markerat.",
|
||||
"Virtual copy": "Virtuell kopia",
|
||||
"Album name (empty outside an album view)": "Albumnamn (tomt utanför en albumvy)",
|
||||
"Export date, UTC (YYYYMMDD)": "Exportdatum, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Exporttid, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Exportdatum (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Exporttid (HHMM)",
|
||||
"Insert variable": "Infoga variabel",
|
||||
"Insert…": "Infoga…",
|
||||
"none ({album}, {date}, {hour})": "ingen ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2490,8 +2490,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "Клацніть правою кнопкою → Знайти відсутній файл…, щоб знайти його знову.",
|
||||
"Right-click ▸ Reload from Disk to try again.": "Клацніть правою кнопкою → Перезавантажити з диска, щоб спробувати ще раз.",
|
||||
"Album name (empty outside an album view)": "Назва альбому (порожньо поза переглядом альбому)",
|
||||
"Export date, UTC (YYYYMMDD)": "Дата експорту, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Час експорту, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Дата експорту (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Час експорту (HHMM)",
|
||||
"Insert variable": "Вставити змінну",
|
||||
"Insert…": "Вставити…",
|
||||
"none ({album}, {date}, {hour})": "немає ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2780,8 +2780,8 @@
|
||||
"Stars on hover: flags and colour labels always show; the stars and the edited mark appear while a photo is hovered or selected.": "Sao khi rê chuột: cờ và nhãn màu luôn hiển thị; sao và dấu đã chỉnh sửa xuất hiện khi ảnh được rê chuột qua hoặc được chọn.",
|
||||
"Virtual copy": "Bản sao ảo",
|
||||
"Album name (empty outside an album view)": "Tên album (trống ngoài chế độ xem album)",
|
||||
"Export date, UTC (YYYYMMDD)": "Ngày xuất, UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "Giờ xuất, UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "Ngày xuất (YYYYMMDD)",
|
||||
"Export time (HHMM)": "Giờ xuất (HHMM)",
|
||||
"Insert variable": "Chèn biến",
|
||||
"Insert…": "Chèn…",
|
||||
"none ({album}, {date}, {hour})": "không có ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2493,8 +2493,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "右键单击 → 定位缺失的文件…,即可重新找到它。",
|
||||
"Right-click ▸ Reload from Disk to try again.": "右键单击 → 从磁盘重新读取,即可重试。",
|
||||
"Album name (empty outside an album view)": "相册名称(在相册视图外为空)",
|
||||
"Export date, UTC (YYYYMMDD)": "导出日期,UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "导出时间,UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "导出日期 (YYYYMMDD)",
|
||||
"Export time (HHMM)": "导出时间 (HHMM)",
|
||||
"Insert variable": "插入变量",
|
||||
"Insert…": "插入…",
|
||||
"none ({album}, {date}, {hour})": "无 ({album}, {date}, {hour})"
|
||||
|
||||
@@ -2494,8 +2494,8 @@
|
||||
"Right-click ▸ Locate Missing File… to find it again.": "按右鍵 → 尋找遺失的檔案…,即可重新找到它。",
|
||||
"Right-click ▸ Reload from Disk to try again.": "按右鍵 → 從磁碟重新載入,即可重試。",
|
||||
"Album name (empty outside an album view)": "相簿名稱(在相簿檢視外為空)",
|
||||
"Export date, UTC (YYYYMMDD)": "匯出日期,UTC (YYYYMMDD)",
|
||||
"Export time, UTC (HHMM)": "匯出時間,UTC (HHMM)",
|
||||
"Export date (YYYYMMDD)": "匯出日期 (YYYYMMDD)",
|
||||
"Export time (HHMM)": "匯出時間 (HHMM)",
|
||||
"Insert variable": "插入變數",
|
||||
"Insert…": "插入…",
|
||||
"none ({album}, {date}, {hour})": "無 ({album}, {date}, {hour})"
|
||||
|
||||
@@ -1795,10 +1795,10 @@ fn export_destination_rows(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Token
|
||||
if ui.selectable_label(false, "{album}").on_hover_text(crate::i18n::tr("Album name (empty outside an album view)")).clicked() {
|
||||
chosen = Some("{album}");
|
||||
}
|
||||
if ui.selectable_label(false, "{date}").on_hover_text(crate::i18n::tr("Export date, UTC (YYYYMMDD)")).clicked() {
|
||||
if ui.selectable_label(false, "{date}").on_hover_text(crate::i18n::tr("Export date (YYYYMMDD)")).clicked() {
|
||||
chosen = Some("{date}");
|
||||
}
|
||||
if ui.selectable_label(false, "{hour}").on_hover_text(crate::i18n::tr("Export time, UTC (HHMM)")).clicked() {
|
||||
if ui.selectable_label(false, "{hour}").on_hover_text(crate::i18n::tr("Export time (HHMM)")).clicked() {
|
||||
chosen = Some("{hour}");
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
## Unreleased
|
||||
|
||||
### Export subfolder variables
|
||||
- The Export dialog's Subfolder field now supports `{album}` (active album name sanitized for filesystem safety, empty outside an album view), `{date}` (batch export date in `YYYYMMDD`, UTC), and `{hour}` (batch export time in `HHMM`, UTC). An **Insert…** dropdown next to the field inserts tokens at the cursor. Tokens are stored in presets and expanded at export time, so the same preset produces dated subfolders on every use.
|
||||
- The Export dialog's Subfolder field now supports `{album}` (active album name sanitized for filesystem safety, empty outside an album view), `{date}` (batch export date in `YYYYMMDD`, local time), and `{hour}` (batch export time in `HHMM`, local time). An **Insert…** dropdown next to the field inserts tokens at the cursor. Tokens are stored in presets and expanded at export time, so the same preset produces dated subfolders on every use.
|
||||
### Heal meets its surroundings (process 14)
|
||||
- A healed spot is now pinned to the photo around its edge: on a gradient (a sky, a shaded wall, a cheek) it no
|
||||
longer leaves a faint disc or ring, and a dark line a few pixels or more beyond the spot's edge no longer smudges
|
||||
|
||||
Reference in new issue
Block a user