Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Almost there, blocked by Terminal errors in ListBoxes #71

Merged
merged 26 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
21517ab
Almost there, blocked by Terminal errors in ListBoxes
d0c-s4vage Dec 10, 2019
f5815f0
Need to finish fixing the tests
d0c-s4vage Dec 10, 2019
b30a7ff
Merge pull request #83 from d0c-s4vage/develop
d0c-s4vage Dec 19, 2019
80fea0e
Updated changelog for v1.1.0
d0c-s4vage Dec 19, 2019
fbcd10b
Added presentation for tomorrow
d0c-s4vage Dec 19, 2019
2fa5c27
Updated slides
d0c-s4vage Dec 20, 2019
cd95229
final update before presentation
d0c-s4vage Dec 20, 2019
8c01fc2
Fix keypress issue
d0c-s4vage Dec 27, 2019
c44d6c4
Merge pull request #85 from d0c-s4vage/hotfix/84-keypresses_incorrect
d0c-s4vage Dec 27, 2019
5a17c40
Added fix to changelog for v1.1.1
d0c-s4vage Dec 27, 2019
15fe94c
Merge branch 'master' into develop
d0c-s4vage Dec 29, 2019
3269143
Made tests pass again - only works if using the new changes in urwid/…
d0c-s4vage Dec 29, 2019
93d10e1
Added mode
d0c-s4vage Feb 28, 2020
9e0039e
Merge pull request #87 from d0c-s4vage/feature/86-terminal_ex
d0c-s4vage Feb 28, 2020
28d157d
Forgot to include CHANGELOG.md changes
d0c-s4vage Feb 28, 2020
bc24f71
Merge branch 'master' into feature/29-vertically_scrollable
d0c-s4vage Feb 28, 2020
a1a2e54
Adds numbered list handling
d0c-s4vage Sep 19, 2020
bfaf467
Reworked lists - alignment is fixed now with variable markers
d0c-s4vage Sep 19, 2020
62a4035
Tests are passing now
d0c-s4vage Sep 19, 2020
83c64f4
Updated tour gif
d0c-s4vage Sep 19, 2020
c1feeaa
Merge pull request #94 from d0c-s4vage/93-numbered_list_support
d0c-s4vage Sep 19, 2020
9634c33
Changelog update
d0c-s4vage Sep 19, 2020
631db2f
Merge branch 'master' into feature/29-vertically_scrollable
d0c-s4vage Sep 22, 2020
70c9368
Removes up/down as slide advancement so that scrolling works
d0c-s4vage Sep 22, 2020
cb86e6c
Fixes tests that changed due to listbox vs pile
d0c-s4vage Sep 22, 2020
21f2d08
Update the readme with vertical scrolling instrs
d0c-s4vage Sep 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# editors
.*.sw[mnop]
.*.sw[hijklmnop]

# python
*.pyc
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,48 @@
# Changelog

- [v1.2.0](#v120)
- [v1.1.1](#v111)
- [v1.1.0](#v110)
- [v1.0.1](#v101)
- [v1.0.0](#v100)
- [v0.5.0](#v050)
- [v0.4.0](#v040)
- [v0.3.0](#v030)
- [v0.2.0](#v020)
- [v0.1.0](#v010)

## v1.2.1

Fixes numbered lists and general list formatting.

| type | ticket | description |
|-----:|---------------------------------------------------------|----------------------|
| bug | [#86](https://github.com/d0c-s4vage/lookatme/issues/93) | Fixes numbered lists |

## v1.2.0

Adds `terminal-ex` mode to embedded terminal code blocks.

| type | ticket | description |
|-----:|---------------------------------------------------------|-------------------------|
| bug | [#86](https://github.com/d0c-s4vage/lookatme/issues/86) | Adds `terminal-ex` mode |

## v1.1.1

Fixed keypress handling - pressing the "up" key works now

| type | ticket | description |
|-----:|---------------------------------------------------------|----------------------|
| bug | [#84](https://github.com/d0c-s4vage/lookatme/issues/84) | Fixes keypress issue |

## v1.1.0

Added file loader builtin extension

| type | ticket | description |
|--------:|---------------------------------------------------------|----------------------------|
| feature | [#81](https://github.com/d0c-s4vage/lookatme/issues/81) | Adds file loader extension |

## v1.0.1

Fixed unicode rendering inside Terminals
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ Sourcing external files example

## Navigating the Presentation

| Action | Keys | Notes |
|----------------|----------------------------------|-------|
| Next Slide | `l j down right space` | |
| Prev Slide | `h k up left delete backspace` | |
| Quit | `q Q` | |
| Terminal Focus | Click on the terminal | |
| Exit Terminal | `ctrl+a` and then a slide action | |
| Action | Keys | Notes |
|--------------------------------|----------------------------------|-------|
| Next Slide | `l j right space` | |
| Prev Slide | `h k left delete backspace` | |
| Quit | `q Q` | |
| Terminal Focus | Click on the terminal | |
| Exit Terminal | `ctrl+a` and then a slide action | |
| Vertically scroll within slide | `up/down or page up/page down` | |

## CLI Options

Expand Down
Binary file modified docs/source/_static/lookatme_tour.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 43 additions & 2 deletions docs/source/builtin_extensions/terminal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ Terminal Extension
The :any:`lookatme.contrib.terminal` builtin extension allows terminals to be
embedded within slides.

Format
------
Basic Format
------------

The terminal extension modifies the code block markdown rendering by intercepting
code blocks whose language has the format ``terminal\d+``. The number following
the ``terminal`` string indicates how many rows the terminal should use when
rendered (the height).

Usage
*****

E.g.

.. code-block:: md
Expand All @@ -26,3 +29,41 @@ inside of the terminal gives the terminal focus, which will allow you to
interact with it, type in it, etc.

To escape from the terminal, press ``ctrl+a``.

Extended Format
---------------

The terminal extension also has a `terminal-ex` mode that can be used as the
language in a code block. When `terminal-ex` is used, the contents of the code
block must be YAML that conforms to the :any:`TerminalExSchema` schema.

The default schema is shown below:

.. code-block:: yaml

command: "the command to run" # required
rows: 10 # number of rows for the terminal (height)
init_text: null # initial text to feed to the command. This is
# useful to, e.g., pre-load text on a
# bash prompt so that only "enter" must be
# pressed. Uses the `expect` command.
init_wait: null # the prompt (string) to wait for with `expect`
# this is required if init_text is set.
init_codeblock: true # show a codeblock with the init_text as its
# content
init_codeblock_lang: text # the language of the init codeblock

Usage
*****

E.g.

.. code-block:: md

```terminal-ex
command: bash -il
rows: 20
init_text: echo hello
init_wait: '$> '
init_codeblock_lang: bash
```
120 changes: 62 additions & 58 deletions docs/source/style_precendence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,61 +68,65 @@ The default styles and formats are defined in the marshmallow schemas in

.. code-block:: yaml


title:
bg: default
fg: '#f30,bold,italics'
author:
bg: default
fg: '#f30'
date:
bg: default
fg: '#777'
slides:
bg: default
fg: '#f30'
bullets:
'1': •
'2': ⁃
'3': ◦
default: •
headings:
'1':
bg: default
fg: '#9fc,bold'
prefix: '██ '
suffix: ''
'2':
bg: default
fg: '#1cc,bold'
prefix: '▓▓▓ '
suffix: ''
'3':
bg: default
fg: '#29c,bold'
prefix: '▒▒▒▒ '
suffix: ''
'4':
bg: default
fg: '#559,bold'
prefix: '░░░░░ '
suffix: ''
default:
bg: default
fg: '#346,bold'
prefix: '░░░░░ '
suffix: ''
link:
bg: default
fg: '#33c,underline'
quote:
bottom_corner: └
side: ╎
style:
bg: default
fg: italics,#aaa
top_corner: ┌
style: monokai
table:
column_spacing: 3
header_divider: ─
author:
bg: default
fg: '#f30'
bullets:
'1': •
'2': ⁃
'3': ◦
default: •
date:
bg: default
fg: '#777'
headings:
'1':
bg: default
fg: '#9fc,bold'
prefix: '██ '
suffix: ''
'2':
bg: default
fg: '#1cc,bold'
prefix: '▓▓▓ '
suffix: ''
'3':
bg: default
fg: '#29c,bold'
prefix: '▒▒▒▒ '
suffix: ''
'4':
bg: default
fg: '#559,bold'
prefix: '░░░░░ '
suffix: ''
default:
bg: default
fg: '#346,bold'
prefix: '░░░░░ '
suffix: ''
link:
bg: default
fg: '#33c,underline'
numbering:
'1': numeric
'2': alpha
'3': roman
default: numeric
quote:
bottom_corner: └
side: ╎
style:
bg: default
fg: italics,#aaa
top_corner: ┌
slides:
bg: default
fg: '#f30'
style: monokai
table:
column_spacing: 3
header_divider: ─
title:
bg: default
fg: '#f30,bold,italics'
31 changes: 24 additions & 7 deletions examples/tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ author: James Johnson
extensions:
- qrcode
styles:
style: solarized-dark
style: monokai
table:
column_spacing: 3
column_spacing: 10
---

# Markdown Support: Inline
Expand Down Expand Up @@ -70,6 +70,25 @@ A quote is below:

---

# Markdown Support: Numbered Lists

* Top level
1. Level 2
1. Level 3
1. Level 3
1. Level 3
* Level 4
1. Level 2
1. Level 3
1. Level 4
1. Level 4
1. Level 4
1. Level 2
* Level 3
* Level 4

---

# Extensions

lookatme supports extensions that can add additional functionality to lookatme
Expand Down Expand Up @@ -129,18 +148,16 @@ docker run --rm -it ubuntu:18.04

# Live Editing

Live editing is supported in `lookatme` with the `--live` command-line
argument.

More text from vim
Hello from vim! lookatme supports live reloading when the source markdown changes
with the `--live` option

---

# Live Editing: Including Styles!

```python
def a_function(test):
pass
print "hello there"
```

| h1 | h2 | h3 |
Expand Down
Loading