Skip to content

zonuexe/deck-slides.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

deck-slides.el

Emacs integration of k1LoW/deck command.

Usage

Edit Credentials File

To use the deck command, you need to set up your own developer project from the Google Cloud console and save it as credentials.json. You can visit this file from Emacs using M-x deck-slides-find-credentials-json.

Apply Markdown to Google Slides

Open the Markdown file you want to apply as slides and run M-x deck-slides-apply or M-x deck-slides-apply-watch. When running for the first time, it's recommended to verify that deck apply works correctly in the terminal first.

Tip

Slide pages must be separated by --- on independent lines. Other symbols or characters of different lengths are not recognized as page separators.

The watch command process runs in the *compilation* buffer. To stop watching, kill the *compilation* buffer.

Check Slide Layout Names

Run M-x deck-slides-ls-layouts to list the layout names of slides corresponding to the file you're editing.

Tip

The results of this command are cached as buffer-local variables. The cache is discarded when you run C-u M-x deck-slides-ls-layouts or kill the buffer.

Configuration

Cache File

The deck-slides-cache-file variable controls where Google Slides IDs associated with Markdown files are cached. By default, it stores the cache in deck-slides.eld in your Emacs user directory.

You can customize the cache file location:

(setopt deck-slides-cache-file "~/.config/emacs/deck-slides-cache.eld")

To disable caching entirely, set it to nil:

(setopt deck-slides-cache-file nil)

Code Blocks to Images

You can configure deck-slides-code-block-to-image-command to automatically convert code blocks into images when applying slides to Google Slides.

This feature uses the same functionality as the deck CLI's code blocks to images feature.

Example configuration:

(setopt deck-slides-code-block-to-image-command "...")

This setting can also be saved in a .dir-locals.el file for directory-specific configuration.

((gfm-mode . ((deck-slides-code-block-to-image-command . "if [ {{lang}} = \"mermaid\" ]; then mmdc -i - -o output.png --quet; else silicon {{lang == \"\" ? \"-l md\" : \"-l \" + lang}} --background '#fff0' --output output.png; fi; cat output.png"))))

Warning

This string is expanded as a shell string by expr-lang. Please set it at your own risk.

Copyright

This package is licensed under the GPL.

    deck-slides.el - Creating deck using Markdown and Google Slides
    Copyright (C) 2025  USAMI Kenta

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

About

Emacs integration of k1LoW/deck command.

Resources

License

Stars

Watchers

Forks

Packages

No packages published