Terminal based presentation tool

Related tags

Command Line slides
Overview

Slides

Slides in your terminal.

Credits

This project is heavily inspired by lookatme. slides is a more minimal version of lookatme and written in Go.

Demo

slides

Installation

go get github.com/maaslalani/slides

Usage

Create a simple markdown file that contains your slides:

# Welcome to Slides
A terminal based presentation tool

---

## Everything is markdown
In fact, this entire presentation is a markdown file.

---

## Everything happens in your terminal
Create slides and present them without ever leaving your terminal.

Checkout the example slides.

Then, to present, run:

slides presentation.md

Go to the next slide with any of the following keys:

  • space
  • right
  • down
  • enter
  • n
  • k
  • l

Go to the previous slide with any of the following keys:

  • left
  • up
  • p
  • h
  • j

Development

make
Comments
  • Issue #1 - Allow custom themes

    Issue #1 - Allow custom themes

    Changes Introduced

    • Adds support for defining theme in the header of a slideshow
    • Support for default,dark, and light themes
    • Adds theme header type and helper functions to read theme name but allow for more metadata if you'd like to add it later

    The themes can be specified like this:

    ---
    theme: "default"
    ---
    
    ---
    theme: "dark"
    ---
    
    ---
    theme: "light"
    ---
    

    Adds support for issue https://github.com/maaslalani/slides/issues/1 with custom user themes

    opened by brittonhayes 26
  • graph-easy doesn't work

    graph-easy doesn't work

    https://user-images.githubusercontent.com/61225/175433829-90b402ce-7673-4fe4-8e8a-4d0dee827ba8.mp4

    System:
        OS: Linux 5.18 Fedora Linux 35 (Workstation Edition)
        CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
        Memory: 24.64 GB / 31.10 GB
        Container: Yes
        Shell: 5.8.1 - /bin/zsh
      Binaries:
        Node: 17.7.1 - ~/.asdf/installs/nodejs/17.7.1/bin/node
        Yarn: 1.22.15 - ~/.asdf/installs/nodejs/17.7.1/bin/yarn
        npm: 8.5.2 - ~/.asdf/installs/nodejs/17.7.1/bin/npm
      Managers:
        pip3: 22.1.2 - ~/.asdf/shims/pip3
        Yum: 4.13.0 - /usr/bin/yum
      Utilities:
        Make: 4.3 - /usr/bin/make
        GCC: 11.3.1 - /usr/lib64/ccache/gcc
        Git: 2.35.3 - /usr/bin/git
        FFmpeg: 4.4.2 - /usr/bin/ffmpeg
      Servers:
        Apache: 2.4.53 - /usr/sbin/apachectl
      Virtualization:
        Docker: 20.10.14 - /usr/bin/docker
      SDKs:
        Android SDK:
          API Levels: 28, 29, 30
          Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3
          System Images: android-22 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      IDEs:
        Nano: 5.8 - /usr/bin/nano
        Sublime Text: 4134 - /usr/bin/subl
        VSCode: 1.67.2 - /usr/bin/code
      Languages:
        Bash: 5.1.8 - /usr/bin/bash
        Go: 1.18 - /home/zenobius/.asdf/shims/go
        Java: 1.8.0_322 - /home/zenobius/.asdf/shims/javac
        Perl: 5.34.1 - /usr/bin/perl
        Python: 3.9.5 - /home/zenobius/.asdf/shims/python
        Python3: 3.9.5 - /home/zenobius/.asdf/shims/python3
      Databases:
        PostgreSQL: 13.4 - /usr/bin/postgres
        SQLite: 3.36.0 - /usr/bin/sqlite3
      Browsers:
        Brave Browser: 100.1.37.116
        Chrome: 101.0.4951.41
        Firefox: 101.0.1
    
    
    opened by airtonix 18
  • Vim-like search functionality

    Vim-like search functionality

    (heavily inspired by https://github.com/maaslalani/slides/pull/108)

    Changes Introduced

    I found @stoovon's idea very cool as a vim user. Now I took his idea one step further, and added a vim-like search. You can start the search with '/' and then search for a heading (for example 'Java' for 'Javascript'), if you press enter you will get to a slide with a matching heading.

    SEARCH-DEMO:

    https://user-images.githubusercontent.com/71837281/138121171-a92ad630-6c1f-4b81-84e8-318b5916c1a9.mov


    What do you think of this, @maaslalani? I thought I'd just try it out and then create a PR here, but of course I understand if this functionality doesn't fit into your "concept" :)

    EDIT: removed command part

    opened by darmiel 12
  • feat: rust code execution

    feat: rust code execution

    Implements #104

    Changes Introduced

    The problem with Rust: unfortunately you can't (anymore) compile and run a program with just one command (something like rustc --run file.rs), and apparently without additional dependencies, like cargo scripts there is no easy way to start a file without a cargo structure.

    So I rewrote the code execution system a bit, which now allows to execute multiple steps. The implentation for Go looks like this:

    Go: {
    	Extension: "go",
    	Cmds:      base{"go", "run"}, // base means: append the filename
    },
    

    For Rust however:

    Rust: {
    	Extension: "rs",
    	Cmds: multi{ // multi means: execute multiple commands
    		// compile code
    		// placeholders <file>, <name> and <path> supported
    		{ just "rustc", "<file>", "-o", "<path>/<name>.run"}, 
    		// grant execute permissions
    		{ "chmod", "+x", "<path>/<name>.run"},
    		// run compiled file
    		{"<path>/<name>.run"},
    	},
    },
    

    Currently it seems to be the only practical solution, but it feels very "hacky". Maybe someone has an idea how to improve the whole thing?

    I also don't think this works on Windows (unfortunately I can't test it right now), since I use chmod +x <file> to give the output file execute permissions

    opened by darmiel 12
  • Pre-process any commands

    Pre-process any commands

    Fixes #51

    Changes Introduced

    • Allow arbitrary commands to be executed for pre-processing slides

    • This allows for embedding graphs, diagrams, any output of any command, really

    • This is a bit different than code execution because it entirely replaces the block of code with the output of the command with the input in the block.

    opened by maaslalani 11
  • Code execution on slide

    Code execution on slide

    Fixes #9

    Changes Introduced

    • Allows any (ruby) code blocks to be executed if one is found by pressing the e key.

    (Just a prototype, this solution probably won't work for most lanugages. Going to try a different approach with writing files and creating a code package to make it easier to add support for more languages)

    opened by maaslalani 11
  • Pre-Process Doesn't Handle Newlines

    Pre-Process Doesn't Handle Newlines

    Description The current method for parsing pre-processed data doesn't handle newlines in process stdout, resulting in everything being on the same line.

    Reproducing Taking the example in the pre-processing example slide:

    ~~~graph-easy --as=boxart
    [ A ] - to -> [ B ]
    ~~~
    

    Produces:

    ┌───┐  to   ┌───┐ │ A │ ────> │ B │ └───┘       └───┘
    

    Explanation The output of the command being run is just added to the Block representing the whole slide (internal/process/process.go:68), which then all gets parsed by the markdown renderer (the newlines remain intact until internal/model/model.go:183). As a markdown newline is two newlines, and processes just output single newlines, the renderer interprets the process output with no newlines.

    Temporary Solution I didn't open a PR because my solution is quite hacky and probably breaks some cases, but you can wrap the process output in a markdown code block so the renderer interprets it as plain text. There's almost certainly a more elegant way to do it :'D

    See here: https://github.com/Thomas-Malcolm/slides/commit/15990c5772ede761bc397120ae1dd03d819533a7

    opened by Thomas-Malcolm 9
  • Custom static date is interpreted wrong

    Custom static date is interpreted wrong

    Describe the bug Date is interpreted strangely.

    To Reproduce Steps to reproduce the behavior:

    1. Use date: 2022-05-22
    2. See 282828-49-2828

    Expected behavior Slides displays 2022-05-22.

    Desktop (please complete the following information):

    • OS: macOS
    • Version 0.8.0
    opened by h0adp0re 8
  • Slides doesn't support scrolling large markdown files

    Slides doesn't support scrolling large markdown files

    Describe the bug When a large markdown file is opened in slides, it just jumps to the last line.

    To Reproduce Steps to reproduce the behavior:

    1. Install latest slides
    2. Open a markdown file larger than ROWS

    Expected behavior slides should support scroll

    Screenshots No need easily reproducible

    opened by thunder-coding 8
  • Pre release 0.4.0 fails tests

    Pre release 0.4.0 fails tests

    Describe the bug Tests on the pre-release 0.4.0 tag fail.

    ~/Projects/aur/slides-git/src/slides main
    ❯ go test ./...
    ?   	github.com/maaslalani/slides	[no test files]
    ?   	github.com/maaslalani/slides/cmd	[no test files]
    ok  	github.com/maaslalani/slides/internal/code	(cached)
    ok  	github.com/maaslalani/slides/internal/file	(cached)
    ok  	github.com/maaslalani/slides/internal/meta	(cached)
    ?   	github.com/maaslalani/slides/internal/model	[no test files]
    --- FAIL: TestExecute (0.00s)
        --- FAIL: TestExecute/Replace (0.00s)
            execute_test.go:34: Invalid execution, want Replace, got 
    FAIL
    FAIL	github.com/maaslalani/slides/internal/process	0.001s
    ok  	github.com/maaslalani/slides/styles	(cached)
    FAIL
    

    To Reproduce Steps to reproduce the behavior:

    git clone https://github.com/maaslalani/slides.git
    cd slides
    git checkout main
    git pull
    go test ./...
    

    Alternatively, on Arch Linux:

    git clone https://aur.archlinux.org/slides-git.git
    cd slides-git
    makepkg
    

    Yields:

    ~/Projects/aur/slides-git master*
    ❯ makepkg
    ==> Making package: slides-git 0.4.0.r0.g742251d-1 (Sun 27 Jun 2021 09:40:40 PM EDT)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving sources...
      -> Updating slides git repo...
    Fetching origin
    From https://github.com/maaslalani/slides
     - [deleted]         (none)     -> node
     - [deleted]         (none)     -> preprocess
     - [deleted]         (none)     -> preprocessing
    ==> Validating source files with sha256sums...
        slides ... Skipped
    ==> Extracting sources...
      -> Creating working copy of slides git repo...
    Switched to and reset branch 'makepkg'
    ==> Starting pkgver()...
    ==> Removing existing $pkgdir/ directory...
    ==> Starting build()...
    ==> Starting check()...
    ?   	github.com/maaslalani/slides	[no test files]
    ?   	github.com/maaslalani/slides/cmd	[no test files]
    ok  	github.com/maaslalani/slides/internal/code	(cached)
    ok  	github.com/maaslalani/slides/internal/file	0.002s
    ok  	github.com/maaslalani/slides/internal/meta	(cached)
    ?   	github.com/maaslalani/slides/internal/model	[no test files]
    --- FAIL: TestExecute (0.00s)
        --- FAIL: TestExecute/Replace (0.00s)
            execute_test.go:34: Invalid execution, want Replace, got 
    FAIL
    FAIL	github.com/maaslalani/slides/internal/process	0.001s
    ok  	github.com/maaslalani/slides/styles	(cached)
    FAIL
    ==> ERROR: A failure occurred in check().
        Aborting...
    

    Expected behavior Tests pass.

    Desktop (please complete the following information):

    • OS: Arch Linux 5.12.12-arch1-1
    • Golang: go version go1.16.5 linux/amd64
    opened by ocelotsloth 7
  • feat: copy code blocks

    feat: copy code blocks

    Changes Introduced

    • c will copy code blocks to clipboard.

    Currently, all blocks are copied individually in order. So the last code block will be on top of the "clipboard stack" if you use a clipboard manager. You could concatenate all blocks and copy them to the clipboard as a single entry.

    Or, you could have slightly nicer behavior by having c copy a single block and then maintain a counter that tracks which block should be copied next and then have C concatenate all blocks into a single clipboard entry.

    opened by mellonnen 6
  • build(deps): bump github.com/charmbracelet/wish from 0.7.0 to 1.0.0

    build(deps): bump github.com/charmbracelet/wish from 0.7.0 to 1.0.0

    Bumps github.com/charmbracelet/wish from 0.7.0 to 1.0.0.

    Release notes

    Sourced from github.com/charmbracelet/wish's releases.

    v1.0.0

    Changelog

    💫 Wish v1.0.0 replaces the amazing gliderlabs/ssh with charmbracelet/ssh, which is a fork of the former under our control. This should help us ship new features and improvements faster, and all changes are submitted back to GliderLabs.

    This change, however, requires you to change import paths. But don't fire your seds and search/replaces yet, you can do it with gofmt:

    go get github.com/charmbracelet/[email protected]
    gofmt -l -w -r '"github.com/gliderlabs/ssh" -> "github.com/charmbracelet/ssh"' .
    go mod tidy
    

    New Features

    • d65a162838189010bd8ad5c539fe876c03b0ec3c: feat: using our fork (#101) (@​caarlos0)

    Bug fixes

    • 2eed2c119561980b6401979b806c78815946bb2c: fix(git): tests: quote ssh key path (@​aymanbagabas)
    • 9e9765dfded5d6400a12af8bb1b94d9d66352c1e: fix: fd leaks, tests on windows (#103) (@​caarlos0)
    • 0e4e2e5642c2af0cbefc6412042a9632d83115e8: fix: scp bug when copying / (#104) (@​caarlos0)
    • a14cf6d38a86e356e527692eff989b1dc45ce86d: fix: using our ssh fork (#95) (@​caarlos0)

    Dependency updates

    • 0185fd6c61ef967b91b83faba0012ad8b76aef69: feat(deps): bump github.com/go-git/go-git/v5 from 5.4.2 to 5.5.1 (#108) (@​dependabot[bot])
    • 7fe3248bf50f5bb2122bae57a0e9f07f1821462d: feat(deps): bump github.com/google/go-cmp from 0.5.5 to 0.5.9 (#106) (@​dependabot[bot])

    Documentation updates

    • 0857eb6b716a5c745baf699a06da76f76bb73b84: docs: document a little bit how wish works (#99) (@​caarlos0)

    Other work

    • c4e54902ed25009a9fdfc6d9dfd49f2ef14b8006: feat(ci): use meta workflows (@​aymanbagabas)
    • f7f0c95e872b6c308ed46d2a14be8b17ec4c889e: refactor: type aliasing ssh types (#94) (@​caarlos0)

    Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Implement nested list items

    Implement nested list items

    Is your feature request related to a problem? Please describe. On a presentation I would like to add a contents slide. In markdown, I usually use nested lists on a markdown file with tabs, for example:

    1. Item 1
    2. Item 2
    3. Sub Item 1
    4. Sub Item 2
    5. Item 3

    But if I do that on slides the result is:

    1. Item1
    2. Item 2
    3. Sub Item 1
    4. Sub Item 2
    5. Item 3

    Describe the solution you'd like I would like to have nested lists like:

    1. Item 1
    2. Item 2
    3. Sub Item 1
    4. Sub Item 2
    5. Item 3

    Describe alternatives you've considered Use lookatme instead (works there)

    opened by purrutia 0
  • Command preprocessing with quote not working (e.g. with the `jq` library)

    Command preprocessing with quote not working (e.g. with the `jq` library)

    Describe the bug I'm using the jq library to format some JSON.

    Here's what my markdown file looks like:

    # Testing JSON formatting
    
    ```
    ~~~jq '.'
    [{"q": "test"}]
    ~~~
    ```
    

    Here's the command being run on the command line, to ensure it works as expected:

    $ echo '[{"q": "test"}]' | jq '.'
    [
      {
        "q": "test"
      }
    ]
    

    Expected behavior I'm expecting the code block to show the output of what I see when I run the command above in the command line.

    I've verified that the file has chmod +x permissions and other commands work.

    Screenshots Just getting an empty code block. I've verified that the file has chmod +x permissions and other commands work.

    CleanShot 2022-11-19 at 15 02 13

    Desktop (please complete the following information):

    • OS: Apple MBP, M1 Max
    opened by pringshia 6
  • Allow running specific code blocks

    Allow running specific code blocks

    Fixes #181

    Changes Introduced

    Allows users to run specific code blocks within a slide.

    • ctrl+e puts the user in code block execution mode. It can be followed up with:
      • esc or ctrl+c: to exit code block execution mode
      • enter or n: to run the next code block on the slide (initially starting at the first one)
      • a: to run all code blocks on the slide, from first to last
      • [n], where [n] is some integer >= 0: to run code block with index [n] (0-based indexing)

    After the last code block on the slide has been run, regardless of how it was run, the user automatically exits from code block execution mode.

    opened by ycombinator 0
  • Please add a per-block option to disable code block execution

    Please add a per-block option to disable code block execution

    Is your feature request related to a problem? Please describe. I want to ensure that some code blocks are not executable, not even by accident (for example when presenting potentially dangerous commands like rm).

    Describe the solution you'd like A per-block option to disable code execution.

    Describe alternatives you've considered Not specifying the language prevents execution (error message: Error: could not parse code block) but lacks syntax highlighting.

    opened by hvhaugwitz 0
  • Flag to abort if a code block returns an error

    Flag to abort if a code block returns an error

    Is your feature request related to a problem? Please describe. I'd like to use slides sort of like a runnable playbook. Its actually not as crazy at it sounds :) (and I'd like to discuss this more).

    Describe the solution you'd like I'd like for code blocks to do some work and if an error is returned by a code block (think bash returning an error) slide prints it and stops moving forward in the presentation.

    Describe alternatives you've considered In terms of slide, I've only thought about printing a flashy warning POSSIBLY IN ALL CAPS that continuing is strongly not advised.

    Additional context I don't think any are needed but can show some snippets of what I'd like to use this feature with if necessary.

    opened by mmlb 1
Releases(v0.9.0)
Owner
Maas Lalani
Maas Lalani
A terminal based typing test.

What A terminal based typing test. Installation Linux sudo curl -L https://github.com/lemnos/tt/releases/download/v0.4.0/tt-linux -o /usr/local/bin/tt

null 424 Dec 28, 2022
Raspberry Pi terminal based activity monitor

pitop Raspberry Pi terminal based activity monitor Yes I know there are plenty of solutions already available, but I wanted to build my own terminal b

Pierre 222 Dec 11, 2022
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals

Zachary Yedidia 20.9k Jan 7, 2023
A collection of terminal-based widgets for richer Golang CLI apps.

Flinch A collection of terminal-based widgets for richer Golang CLI apps. Ships with a library to build your own widgets/TUIs too. Warning: This modul

Liam Galvin 41 Jan 7, 2023
A terminal based graphical activity monitor inspired by gtop and vtop

NO LONGER MAINTAINED. A maintained fork of gotop exists at https://github.com/xxxserxxx/gotop. Another terminal based graphical activity monitor, insp

Caleb Bassi 7.3k Jan 1, 2023
Terminal based dashboard.

Termdash is a cross-platform customizable terminal based dashboard. The feature set is inspired by the gizak/termui project, which in turn was inspire

Jakub Sobon 2.2k Jan 1, 2023
A terminal based file manager

Keep those files organized About The Project A terminal based file manager Built With Go bubbletea bubbles lipgloss Installation go install github.com

Tyler Knipfer 370 Dec 27, 2022
TScli - a very simple terminal-based client for TSWeb online judge

TScli TScli - a very simple terminal-based client for TSWeb online judge. It supports submitting problems and receiving feedback on them. Installation

Sergey Kharitontsev-Beglov 4 Oct 24, 2021
A terminal-based download manager written in Go!

goload-manager About A terminal-based download manager written in Go! This project uses grab for downloading and tcell for the terminal interface. Hea

Manolis Skouris 4 Oct 7, 2021
basic terminal based chat application written in go

this app uses websocket protocol to communicate in real time. both the client and the server are written in golang. it uses: gorilla/websocket package

Abidin Durdu 0 Nov 4, 2021
A go lib based on tcell which builds a simple menu UI in your terminal.

MenuScreen A simple go lib based on github.com/gdamore/tcell/v2,which helps you build a simple menu UI in your terminal. Install go get -u github.com/

SCU-SJL 0 Nov 11, 2021
cview - Terminal-based user interface toolkit

cview - Terminal-based user interface toolkit This package is a fork of tview. See FORK.md for more information. Demo ssh cview.rocketnine.space -p 20

Trevor Slocum 2 Jan 23, 2022
Go-wordle - Terminal based wordle game

Go-wordle - Terminal based wordle game

Ann Kilzer キルザー杏 7 Feb 25, 2022
Terminal based wordle clone. Uses the amazing charm.sh libraries to render and expose the game over SSH

Terminal based wordle clone. Uses the amazing charm.sh libraries to render and expose the game over SSH

David Roda 46 Nov 17, 2022
gomerge is a tool to quickly bulk merge several pull requests from your terminal.

Gomerge is a tool to quickly enable you to bulk merge Github pull requests from your terminal. The intention of this tool is to simplfy, and eventually automate the merging of github pull requests. This tool should be able to run on most systems.

Cian Gallagher 41 Dec 28, 2022
`tmax` is a powerful tool to help you get terminal cmd directly.

The positioning of tmax is a command line tool with a little artificial intelligence. If you frequently deal with the terminal daily, tmax will greatly improve your work efficiency.

Jeremy 32 Oct 15, 2022
a python command-line tool which draws basic graphs in the terminal

Termgraph A command-line tool that draws basic graphs in the terminal, written in Python. Graph types supported: Bar Graphs Color charts Multi-variabl

Marcus Kazmierczak 2.9k Dec 30, 2022
🌿circumflex is a command line tool for browsing Hacker News in your terminal

??circumflex is a command line tool for browsing Hacker News in your terminal

Ben Sadeh 669 Jan 1, 2023
t is a command line tool for testing on your terminal.

t t is a command line tool for testing on your terminal. Installation $ go get github.com/yusukebe/t/cmd/t Usage Basic usage: $ t hello hello # => PA

Yusuke Wada 31 May 5, 2022