Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Enhancement: Add {original_filename}, {added_time} to title placeholders (#4972)

TTT72751197a048bcf3
diff --git a/docs/usage.md b/docs/usage.md
index fed7412b3..2412e3cbe 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -311,6 +311,8 @@ applied. You can use the following placeholders:
- `{added_month_name}`: added month name
- `{added_month_name_short}`: added month short name
- `{added_day}`: added day
+- `{added_time}`: added time in HH:MM format
+- `{original_filename}`: original file name without extension
## Custom Fields {#custom-fields}
diff --git a/src/documents/consumer.py b/src/documents/consumer.py
index 4f97881ef..6a0d1ec02 100644
--- a/src/documents/consumer.py
+++ b/src/documents/consumer.py
@@ -691,6 +691,8 @@ class Consumer(LoggingMixin):
added_month_name_short=local_added.strftime("%b"),
added_day=local_added.strftime("%d"),
owner_username=owner_username,
+ original_filename=Path(self.filename).stem,
+ added_time=local_added.strftime("%H:%M"),
).strip()
def _store(