From 63cd620b79c98ee95c9f6f829f3a7af55953df4b Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 14 Jun 2026 15:49:11 +0000 Subject: [PATCH] Add accent color, email subjects, MD+DOCX outputs, update README --- README.md | 43 +++++++++++++- misc/error_notification_template.html | 4 +- misc/footer.html | 8 +-- misc/header.html | 6 +- misc/mail_style.css | 8 ++- misc/success_template.html | 4 +- misc/upload_notification_template.html | 4 +- requirements.txt | 1 + scraibe/email_sender.py | 82 +++++++++++++++++++++----- scraibe/tasks.py | 56 ++++++++++++------ scraibe/webui.py | 43 ++++++++++++-- 11 files changed, 205 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 42fc9d8..e6ae5b3 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,16 @@ For more information: https://apstrom.ca - Jobs are queued and processed in the background (Celery + Redis). - Emails: - Immediate confirmation with queue position. - - Final transcript (TXT + JSON) when ready. + - Final transcript (MD + JSON) when ready. - Summary as MD file (if requested). - Error notification if processing fails. +- File formats: + - Transcript: .md and .docx + - Summary (if requested): .md and .docx + - Full structured output: .json - Customizable branding: - - Web GUI title, logo, and email logo via environment variables. + - Web GUI title, logo, and accent color via environment variables. + - Email logo, accent color, and subject lines via environment variables. - CLI and Python API: - Simple command-line interface. - Drop-in Scraibe class for integration into other tools. @@ -74,6 +79,7 @@ Run the container with your LocalAI and summarizer endpoints: -e WEBUI_TITLE="Your Transcription Service" \ -e WEBUI_LOGO_URL="https://your-domain.com/logo.png" \ -e EMAIL_LOGO_URL="https://your-domain.com/logo.png" \ + -e EMAIL_ACCENT_COLOR="#7C6DA0" \ scraibe:latest Then open: http://:7860 @@ -195,6 +201,14 @@ Web GUI and branding: - URL of the logo displayed in the web GUI header. - Example: https://your-domain.com/logo.png +Accent color (UI and emails): + +- EMAIL_ACCENT_COLOR: + - Accent color used in: + - Web GUI buttons and accents + - Email headings, links, and email addresses + - Default: #7C6DA0 + Async processing (Celery + Redis): - CELERY_BROKER_URL: @@ -227,6 +241,30 @@ Email configuration: - EMAIL_CSS_PATH: - Path to the CSS used in emails (default: /app/src/misc/mail_style.css). +Email subject lines (customizable): + +- EMAIL_SUBJECT_UPLOAD: + - Subject for upload confirmation email. + - Default: "ScrAIbe: Your transcription request has been received" +- EMAIL_SUBJECT_SUCCESS: + - Subject for transcript-ready email. + - Default: "ScrAIbe: Your transcript is ready" +- EMAIL_SUBJECT_ERROR: + - Subject for error notification email. + - Default: "ScrAIbe: Error with your transcription request" + +Output files (async web GUI): + +When a job completes, the user receives: +- Transcript: + - .md file + - .docx file +- Summary (if requested): + - .md file + - .docx file +- JSON: + - Structured transcript with diarization and metadata + All of these can also be overridden from the CLI when needed (e.g., --localai-api-url, --summarizer-api-url). ## Dependencies @@ -240,6 +278,7 @@ Core runtime dependencies: - gradio - celery[redis] - redis +- python-docx - ffmpeg (for audio preprocessing) No local Whisper, PyTorch, or Pyannote models are required. diff --git a/misc/error_notification_template.html b/misc/error_notification_template.html index 3363d79..5be9a5c 100644 --- a/misc/error_notification_template.html +++ b/misc/error_notification_template.html @@ -11,13 +11,13 @@
{email_logo} -

Error Notification

+

Error Notification

Dear user,

An error occurred while processing your audio file. This means that something went wrong during the processing of your file, and it could not be completed successfully.

Error details: {exception}

Please check the file and try again. If the problem persists, our support team is here to help.

-

You can contact our support team at {contact_email}. They are available to assist with any questions or issues you may have.

+

You can contact our support team at {contact_email}. They are available to assist with any questions or issues you may have.

Please note that our support team does not have the ability to fix processing errors directly or access the files you have uploaded. They can provide guidance and help troubleshoot any issues you may encounter.

diff --git a/misc/footer.html b/misc/footer.html index c21c7cb..677380f 100644 --- a/misc/footer.html +++ b/misc/footer.html @@ -43,7 +43,7 @@ text-align: left; }} .footer a {{ - color: #333; + color: {accent_color}; transition: color 0.3s ease; }} .footer a:hover {{ @@ -79,7 +79,7 @@ font-size: 24px; }} .brand-icon a:hover, .brand-icon a:focus {{ - background-color: #50AF31; + background-color: {accent_color}; transform: scale(1.1); text-decoration: none; }} @@ -98,11 +98,11 @@