Skip to main content

Slideshow builder

Project description

Build a slidershow media presentation from a sheet.

Just put file names into the sheet and we generate the HTML file.

graph LR;
sheet --> slidershow-builder --> presentation.html

Features

  • Find files on disk, evade hassling with the relative paths.

Ex. You just use the file name from Google Photos, slidershow-builder will find an original file within the given directories scope.

  • auto-conversion

Some formats cannot be played in the browser; slidershow-builder will automatically creates a cache folder with the mp4 files, playable everywhere.

Installation

pip install slidershow-builder

Usage

$ slidershow-builder --help
usage: slidershow-builder [-h] [OPTIONS]

╭─ options ──────────────────────────────────────────────────────────────────╮
│ -h, --help                                                                 │
│     show this help message and exit                                        │
│ --verbose, -v                                                              │
│     verbosity level, can be used multiple times to increase                │
│ --file PATH                                                                │
│     (required)                                                             │
│ --sheet STR                                                                │
│     Sheet name to process. If None, all will be processed and multiple     │
│     files will be generated (if `--output` set).                           │
│                                                                            │
│                                                                            │
│        Format of the sheet                                                 │
│                                                                            │
│                                                                            │
│        Columns:                                                            │
│            comment   filename       start   commands                       │
│                                                                            │
│                                                                            │
│            Comment is an inserted HTML comment, displayed at the           │
│     presenter's notes.                                                     │
│                                                                            │
│                                                                            │
│        Text frame                                                          │
│          filename: <empty>                                                 │
│          start: header                                                     │
│          commands: subtitle                                                │
│                                                                            │
│                                                                            │
│        Image frame                                                         │
│          start: point                                                      │
│            [left = 0, top = 0, scale = 1, transition_duration = 0,         │
│     duration = 0, data-rotate = 0]                                         │
│            Ex: `[[], [100,100,5]]` will begin unzoomed, on the next frame  │
│     we zoom to 5.                                                          │
│                                                                            │
│                                                                            │
│            See:                                                            │
│     https://github.com/CZ-NIC/slidershow/?tab=readme-ov-file#data-step-poi │
│     nts                                                                    │
│                                                                            │
│                                                                            │
│            How to get the point? Go to the slidershow in the browser, open │
│     properties Alt+p and click on the new point.                           │
│                                                                            │
│                                                                            │
│        Video frame                                                         │
│            start                                                           │
│              * video start time, empty = 0:00                              │
│            commands                                                        │
│              * number is a timestamp, jehož akce určují následující buňky  │
│              * posouvací šipka, ex: `→60.5` skočí z momentu na 60.5        │
│              * rate a číslo změní rate momentu `rate 2`                    │
│              * mute, unmute                                                │
│              * R+number(M|U): rate. Ex: `R2` = rate 2, `R4M` = rate 4 +    │
│     mute                                                                   │
│              * P = rate 1, unmute                                          │
│              * F+number: faster rate. Ex `F2` = rate 1.2                   │
│              * comma character behaves like a cell-separator, these are    │
│     independent commands `rate 2, unmute`  `rate 2` a `unmute`            │
│              * poslední osamělé číslo je end                               │
│              * point command zooms, ex: `point:[0,0,2,null,null,270]` zoom │
│     and rotate. (Point musí být v buňce zvlášť.)                           │
│                                                                            │
│                                                                            │
│              Ex: `15,  4, 1:10`: At 0:15, jump to 0:04, then end at 1:10. │
│                                                                            │
│                                                                            │
│        Section break                                                       │
│          comment: SECTION                                                  │
│                                                                            │
│                                                                            │
│          If the row starts with the word "SECTION", a new `<section>` is   │
│     inserted. (And the row is skipped.)                                    │
│                                                                            │
│                                                                            │
│        Rows:                                                               │
│          Parsing ends on the first empty row. (default: None)              │
│ --output PATH                                                              │
│     By default, the output is printed to the screen. (default: None)       │
│ --replace-in-filename {[STR STR [STR STR ...]]}                            │
│     If set, filename from the sheet will be replaced according to this.    │
│        Ex: --replace-filename /mnt/user /mnt/foo jpg JPG -> filename       │
│     /mnt/user/dir/img.jpg  /mnt/foo/dir/img.JPG (default: None)           │
│ --filename-autosearch {[PATH [PATH ...]]}                                  │
│     If the filename is without path and the file does not exist, try       │
│     finding the file within these dirs. (default: None)                    │
│ --no-filename-autosearch-cache                                             │
│     Use a cache file for filename_autosearch, persistent accress program   │
│     launches. (default: True)                                              │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ convert options ──────────────────────────────────────────────────────────╮
│ Auto-convert for browser-compatible formats.                               │
│ Creates a cached copies with compatible JPG and MP4.                       │
│ ────────────────────────────────────────────────────────────────────────── │
│ --convert.enable                                                           │
│     The cache will be used for needy media. (default: False)               │
│ --convert.no-autogenerate                                                  │
│     If .enable, generate all the needy media to the cache. (default: True) │
│ --convert.cache-dir PATH                                                   │
│     (default: /tmp)                                                        │
│ --convert.no-heic                                                          │
│     Generate JPG from HEIC. (default: True)                                │
│ --convert.no-hevc                                                          │
│     Generate MP4 from HEVC. (default: True)                                │
│ --convert.no-hevc-in-mp4                                                   │
│     Check for HEVC codec in MP4 video files. (default: True)               │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ slidershow options ───────────────────────────────────────────────────────╮
│ --slidershow.template PATH                                                 │
│     HTML template the presentation is made of. (default: ...)              │
│ --slidershow.url STR                                                       │
│     The URL to be used for generating. Ex. you might want to use an        │
│     offline local copy of the project. (default:                           │
│     https://cdn.jsdelivr.net/gh/CZ-NIC/slidershow@main/slidershow/slidersh │
│     ow.js)                                                                 │
╰────────────────────────────────────────────────────────────────────────────╯

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slidershow_builder-0.5.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slidershow_builder-0.5.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file slidershow_builder-0.5.0.tar.gz.

File metadata

  • Download URL: slidershow_builder-0.5.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for slidershow_builder-0.5.0.tar.gz
Algorithm Hash digest
SHA256 8af46a9b45c202c6d39bac8bc89ef53b4e2a7a457aac13697a20d044c0646933
MD5 f750241ee9ff76df6f42c68abbe91661
BLAKE2b-256 4fccae490333616664f3e4a9f83e7c84656806eb393012ca99f49bf036add168

See more details on using hashes here.

File details

Details for the file slidershow_builder-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for slidershow_builder-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c093473591e359e11557961aed083cf5416d5f1db68fc4b1ecc4fc2fd94ac1ff
MD5 d88ba5fdfcf16447afcba1c50af3dca6
BLAKE2b-256 947ff4be8a113a19d0ac490a9ba8f997571a01fc88d62e24470e9d0075ecdf95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page