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
Issues
  • 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
  • Support incrementally highlighted code blocks

    Support incrementally highlighted code blocks

    Is your feature request related to a problem? Please describe.

    when defining a code block, let's provide the user some controls that allow them to describe the groups of lines that will be incrementally highlighted as they press next slide key.

    Describe the solution you'd like

        ## Slide One
        
        Welcome!
        
        ## Slide Two
        
        ```typescript[1,3-5,7-11]
        import React, { useState } from 'react';
    
        export type FooProps = {
          isLoading?: boolean;
        }
        
        export function Foo({ isLoading }: FooProps) {
          return (
            <div className={isLoading ? "foo--is-loading" : ""}></div>
          )
        }
        ```
    
    • Defines a codeblock with reveal groups for the following lines:
      • 1
      • 3,4,5
      • 7,8,9,10,11
    • code block is fully revealled and all are dimmed except for first group: line 1.
    • Pressing next-slide will dimm the first group (line 1) and highlight the next group (lines 3,4,5)
    • Pressing previous-slide, group (lines 3,4,5) us dimmed and the previous group is hightlighted (line 1)
    • Only one group is highlighted at a time
    • When highlighting the last group of the slide, pressing next-slide will move to the next slide
    • When highlighting the first group of the slide, pressing previous-slide will move to the previous slide.

    Describe alternatives you've considered

    There isn't any way to do this currently, and the only work around is to cry in the corner hoping for a better world in which the utopian dream of incrementally highlighted code can exist.

    Additional context

    https://revealjs.com/code/

    opened by airtonix 1
  • Support Incremental list items

    Support Incremental list items

    Is your feature request related to a problem? Please describe.

    Currently the only increment supported at the moment, is revealing next slide.

    Instead lets also provide incremental reveal of items within a slide.

    Describe the solution you'd like

    ## Slide One
    
    Welcome!
    
    ---
    
    ## Slide Two
    
    What are incremental slides?
    
    + Incremental list items are defined as with `+`
    + Pressing `next slide` key will begin revealing them.
    + When there no more items to reveal `next slide` moves to the next slide.
    

    Describe alternatives you've considered

    Create clones of a slide where each slide progressivel contains more content.

    ## Slide One
    
    Welcome!
    
    ---
    
    ## Slide Two
    
    What are incremental slides? 
    
    ---
    
    ## Slide Two
    
    What are incremental slides?
    
    - Incremental list items are defined as with `+`
    
    ---
    
    ## Slide Two
    
    What are incremental slides?
    
    - Incremental list items are defined as with `+`
    - Pressing `next slide` key will begin revealing them.
    
    ---
    
    ## Slide Two
    
    What are incremental slides?
    
    - Incremental list items are defined as with `+`
    - Pressing `next slide` key will begin revealing them.
    - When there no more items to reveal `next slide` moves to the next slide.
    

    Additional context

    This feauture exists in RevealJs.

    opened by airtonix 0
  • windows builds at releases

    windows builds at releases

    Is your feature request related to a problem? Please describe. Yes, it would let windows users run slides on their pc without any kind of an emulator.

    Describe the solution you'd like I would like to have windows builds in the releases section.

    Describe alternatives you've considered You must not accept this feature. It's just an advice.

    Additional context /

    opened by eaxn 0
  • snap install of slides does not allow code execution

    snap install of slides does not allow code execution

    Describe the bug a snapd install of slides doesn't know the path of python/go and other programs. It can't execute them for code samples

    To Reproduce

    sudo snap install slides

    echo "# code excution doesn't work in snap slides install\n\npress ctrl+e on this slide\n\`\`\`python\nprint('I am wrong')\n\`\`\`\n" > snap_issue.md;slides snap_issue.md
    

    Expected behavior

    The reproducer SHOULD output "I am wrong" when the user presses ctrl+e, but sadly I am right.

    Screenshots If applicable, add screenshots to help explain your problem.

    Desktop (please complete the following information):

    • OS: Ubuntu 22.04
    opened by mattkatz 2
  • print code block results just after the code block

    print code block results just after the code block

    Consider this (backticks replaced with single quotes)

    '''bash
    echo A
    '''
    
    '''bash
    echo B
    '''
    

    This produces

    '''bash
    echo A
    '''
    
    '''bash
    echo B
    '''
    
    A
    B
    

    I think ideally, it should produce:

    '''bash
    echo A
    '''
    
    A
    
    '''bash
    echo B
    '''
    
    B
    
    opened by primalmotion 0
Releases(v0.8.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 376 Aug 10, 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 219 Apr 4, 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 19.9k Aug 9, 2022
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 39 Jul 22, 2022
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.2k Aug 8, 2022
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 2k Aug 12, 2022
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 303 Aug 4, 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 45 Aug 9, 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 33 Jul 23, 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 29 Jul 24, 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 Aug 3, 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 119 Aug 8, 2022
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