1156 Commits

Author SHA1 Message Date
Matias Fontanini
9dd4b2105c ci: build with sixel enabled 2025-03-20 16:41:37 -07:00
Matias Fontanini
ec6926358a fix: center lists correctly 2025-03-20 16:40:37 -07:00
Matias Fontanini
aa38a7120b
feat: allow specifying export dimensions in config file (#511)
Some checks are pending
Deploy docs / build-and-deploy (push) Waiting to run
Merge checks / Checks (push) Waiting to run
Merge checks / Validate nix flake (push) Waiting to run
Merge checks / Validate bat assets (push) Waiting to run
Merge checks / Validate JSON schemas (push) Waiting to run
This allows specifying the dimensions to use when exporting a
presentation to PDF. This allows exporting to PDF in contexts without a
tty which should help people write scripts that automatically export
presentations. This now also adds a step in the CI that tries to export
the default presentation as PDF, which couldn't be tested before because
of the tty restriction.

```yaml
export:
  dimensions:
    rows: 35
    columns: 135
```
2025-03-20 06:06:28 -07:00
Matias Fontanini
66091f3b6a ci: export PDF during merge checks 2025-03-20 06:03:49 -07:00
Matias Fontanini
f933032958 feat: allow specifying export dimensions in config file 2025-03-20 06:02:31 -07:00
Matias Fontanini
0e4fad5e5e chore: use nightly for nightly tag
Some checks are pending
Deploy docs / build-and-deploy (push) Waiting to run
Merge checks / Checks (push) Waiting to run
Merge checks / Validate nix flake (push) Waiting to run
Merge checks / Validate bat assets (push) Waiting to run
Merge checks / Validate JSON schemas (push) Waiting to run
nightly
2025-03-19 17:37:17 -07:00
Matias Fontanini
2784dee624
feat: respect font sizes in generated PDF (#510)
Some checks are pending
Deploy docs / build-and-deploy (push) Waiting to run
Merge checks / Checks (push) Waiting to run
Merge checks / Validate nix flake (push) Waiting to run
Merge checks / Validate bat assets (push) Waiting to run
Merge checks / Validate JSON schemas (push) Waiting to run
This respects font sizes in the generated PDF. The one thing that is not
yet supported here is text with font size > 1 _and_ with a background
color. The background color only shows up in the line where the text is.
But this should be rarer (e.g. a font size > 1 code block?) so this
works for most cases.

Fixes https://github.com/mfontanini/presenterm-export/issues/17
2025-03-19 06:39:46 -07:00
Matias Fontanini
4254a0bafd feat: respect font sizes in generated PDF 2025-03-19 06:07:04 -07:00
Matias Fontanini
1b3e79fa57
Create FUNDING.yml
Some checks are pending
Deploy docs / build-and-deploy (push) Waiting to run
Merge checks / Checks (push) Waiting to run
Merge checks / Validate nix flake (push) Waiting to run
Merge checks / Validate bat assets (push) Waiting to run
Merge checks / Validate JSON schemas (push) Waiting to run
2025-03-18 18:22:23 -07:00
Matias Fontanini
cae9452c15
feat: invoke weasyprint directly to generate PDFs (#509)
This removes the need for `presenterm-export` and instead invokes
weasyprint directly from presenterm. This removes lots of logic and
simplifies things considerably. Besides this it also opens the door to
be able to use font sizes in the generated PDF + allowing other types of
export in the future, like HTML.

This also gets rid of the need for tmux, essentially now we take the
operations to render the presentation and use a converter internally
that turns them into HTML, which we then feed to weasyprint.

Relates to https://github.com/mfontanini/presenterm-export/issues/17
2025-03-18 16:42:34 -07:00
Matias Fontanini
ccc58deaea feat: invoke weasyprint directly to generate PDFs 2025-03-18 16:38:47 -07:00
Matias Fontanini
a861501091
feat: add skip_slide command (#505)
Some checks failed
Deploy docs / build-and-deploy (push) Has been cancelled
Merge checks / Checks (push) Has been cancelled
Merge checks / Validate nix flake (push) Has been cancelled
Merge checks / Validate bat assets (push) Has been cancelled
Merge checks / Validate JSON schemas (push) Has been cancelled
This adds a new `skip_slide` comment command that allows skipping that
slide and not including it in the final presentation.

Fixes #502
2025-03-16 12:49:23 -07:00
Matias Fontanini
99be30211b feat: add skip_slide command 2025-03-16 12:46:10 -07:00
Matias Fontanini
995cf9683e
ci: add nightly build job (#496)
Some checks are pending
Deploy docs / build-and-deploy (push) Waiting to run
Merge checks / Checks (push) Waiting to run
Merge checks / Validate nix flake (push) Waiting to run
Merge checks / Validate bat assets (push) Waiting to run
Merge checks / Validate JSON schemas (push) Waiting to run
This adds a nightly job that builds the latest source code and uploads
it to "pre-release" release.
2025-03-15 13:00:08 -07:00
Matias Fontanini
28f121218e ci: add nightly build job 2025-03-15 12:54:07 -07:00
Matias Fontanini
964b36e0fb
fix: ansi escape code parsing (#500)
Changes in 0.10.0 were made to fix some incorrect ansi escape code
parsing when processing snippet execution output. However, those changes
were still not handling parsing properly and ended up causing it to
break in other cases.

This change hopefully fixes that. This also removes ansi-parser and
starts using vte to parse escape codes as ansi-parser doesn't let you
have more than 5 segments in an escape code. As an added bonus this also
removes a bunch of dependencies.

Fixes #499
2025-03-15 12:52:48 -07:00
Matias Fontanini
e7ee9a7316 fix: ansi escape code parsing 2025-03-15 12:49:16 -07:00
Matias Fontanini
d3d1b29a24
fix; don't wait if incremental lists disabled (#498)
Some checks failed
Deploy docs / build-and-deploy (push) Has been cancelled
Merge checks / Checks (push) Has been cancelled
Merge checks / Validate nix flake (push) Has been cancelled
Merge checks / Validate bat assets (push) Has been cancelled
Merge checks / Validate JSON schemas (push) Has been cancelled
Fixes #497
2025-03-14 05:29:56 -07:00
Matias Fontanini
788d041ad1 fix; don't wait if incremental lists disabled 2025-03-14 05:25:43 -07:00
Matias Fontanini
4a6bb4197f
Correctly include layout pic (#495)
Some checks failed
Merge checks / Validate nix flake (push) Has been cancelled
Merge checks / Validate bat assets (push) Has been cancelled
Merge checks / Validate JSON schemas (push) Has been cancelled
Deploy docs / build-and-deploy (push) Has been cancelled
Merge checks / Checks (push) Has been cancelled
Seems like the example layout picture wasn't referred correctly and
hence doesn't show up when visiting
https://mfontanini.github.io/presenterm/features/layout.html .

This change should probably fix it.
2025-03-13 05:20:50 -07:00
Tonći Galić
af82ee747b
Correctly include layout pic
Seems like the example layout picture wasn't referred correctly and hence doesn't show up when visiting https://mfontanini.github.io/presenterm/features/layout.html . 

This change should probably fix it.
2025-03-13 12:54:42 +01:00
Matias Fontanini
c47721cfca
fix: respect end slide shorthand in speaker notes mode (#494)
Some checks are pending
Deploy docs / build-and-deploy (push) Waiting to run
Merge checks / Checks (push) Waiting to run
Merge checks / Validate nix flake (push) Waiting to run
Merge checks / Validate bat assets (push) Waiting to run
Merge checks / Validate JSON schemas (push) Waiting to run
This causes end slide shorthands to be respected when in speaker notes
mode.

This speaker notes/presentation mode code needs some splitting, this
currently makes it hard to know what needs to be done / is done in each
case. But this does for now.

Fixes #491
2025-03-12 19:46:08 -07:00
Matias Fontanini
94f43c4cb9 fix: respect end slide shorthand in speaker notes mode 2025-03-12 19:42:34 -07:00
Matias Fontanini
cbbf0b4c0b
feat: add alignment comment command (#493)
This adds an `alignment` comment command that can have a
left/center/right values. This uncovered a few issues in how some
elements (e.g. lists in particular, but also normal text) render with
center/right alignment, but they'll be fixed separately.

Fixes #492
2025-03-12 19:41:15 -07:00
Matias Fontanini
ed09b06103 feat: add alignment comment command 2025-03-12 19:37:41 -07:00
Matias Fontanini
e5486a8043
feat: add --current-theme to display the theme in use (#489)
Some checks are pending
Deploy docs / build-and-deploy (push) Waiting to run
Merge checks / Checks (push) Waiting to run
Merge checks / Validate nix flake (push) Waiting to run
Merge checks / Validate bat assets (push) Waiting to run
Merge checks / Validate JSON schemas (push) Waiting to run
The new `--current-theme` switch will print the theme in use to stdout.
This will be the configured theme in the config file, if set, or the
default theme as a fallback.

Relates to #488
2025-03-11 17:45:23 -07:00
Matias Fontanini
6642a2eb0b
fix!: pause before and after incremental lists (#487)
This changes the behavior for incremental lists so that pauses are added
before and after lists. This changes the default behavior since this
seems more sensible.

To use the original behavior that causes no pauses before nor after set
`defaults.incremental_lists.pause_before` and
`defaults.incremental_lists.pause_after` to `false` in the config file.

The following presentation:

```markdown
<!-- incremental_lists: true -->

greetings I know:

* hi
* bye 


vegetables I know:

* potato
* carrot 
```

Now looks like this:


[![asciicast](https://asciinema.org/a/QQq1IZzyLSyquh9TKRjVGFy0u.svg)](https://asciinema.org/a/QQq1IZzyLSyquh9TKRjVGFy0u)

Fixes #486
2025-03-11 17:45:08 -07:00
Matias Fontanini
6230ef566c
docs: update README.md (#490)
Some checks are pending
Deploy docs / build-and-deploy (push) Waiting to run
Merge checks / Checks (push) Waiting to run
Merge checks / Validate nix flake (push) Waiting to run
Merge checks / Validate bat assets (push) Waiting to run
Merge checks / Validate JSON schemas (push) Waiting to run
Customizeable -> Customizable
2025-03-11 06:01:20 -07:00
Ikko Eltociear Ashimine
14e8e3ad49
docs: update README.md
Customizeable -> Customizable
2025-03-11 21:42:58 +09:00
Matias Fontanini
410e671438 feat: add --current-theme to display the theme in use 2025-03-10 19:34:04 -07:00
Matias Fontanini
19364b2193 fix!: pause before and after incremental lists 2025-03-10 15:56:23 -07:00
Matias Fontanini
10bf968f86
fix: snippet execution output colors in terminal-* themes (#485)
For some reason terminal-light and terminal-dark were using bright
background/text in snippet execution outputs.
2025-03-09 15:05:00 -07:00
Matias Fontanini
979aebe6da fix: snippet execution output colors in terminal-* themes 2025-03-09 13:56:05 -07:00
Matias Fontanini
6de1f83105
chore: refactor snippet processing (#484)
This mostly moves the snippet processing to a separate module to remove
the noise in `builder.rs`.
2025-03-09 13:46:54 -07:00
Matias Fontanini
ad0c9badc1 chore: remove redundant checks for alignment 2025-03-09 13:41:23 -07:00
Matias Fontanini
6fb9df56a3 chore: move snippet processing code to separate module 2025-03-09 13:20:29 -07:00
Matias Fontanini
44f0787bb5
Add gruvbox dark theme (#483)
This PR adds a [gruvbox](https://github.com/morhetz/gruvbox) theme to
presenterm.


![image](https://github.com/user-attachments/assets/d8760b5f-3ab7-4e1f-ac34-d3046d44759e)
2025-03-09 08:51:01 -07:00
ret2src
00ed4fb01c
Add Gruvbox Dark theme 2025-03-09 15:19:01 +01:00
Matias Fontanini
c4011b67d3 docs: fix changelog link 2025-03-08 13:25:59 -08:00
Matias Fontanini
0057b8ba5e
chore: prepare for 0.11.0 release (#479) v0.11.0 2025-03-08 13:19:04 -08:00
Matias Fontanini
cafc6bb850 chore: include screenshot of footer example 2025-03-08 13:16:33 -08:00
Matias Fontanini
50040bfcc1 chore: update README 2025-03-08 13:16:33 -08:00
Matias Fontanini
c6223a2ab6 chore: bump version to 0.11.0 2025-03-08 13:16:33 -08:00
Matias Fontanini
60dd8eecc0 chore: update example presentations before 0.11.0 2025-03-08 13:16:33 -08:00
Matias Fontanini
3b40c8fd3d chore: add docs for 0.11.0 2025-03-08 13:16:33 -08:00
Matias Fontanini
d5b172048a docs: add release notes for 0.11.0 2025-03-08 13:16:33 -08:00
Matias Fontanini
77979984bf
chore: cleanup Builder::push_code (#480) 2025-03-08 12:47:12 -08:00
Matias Fontanini
644a57f9f9 chore: cleanup Builder::push_code 2025-03-08 12:43:41 -08:00
Matias Fontanini
f17724bf91
fix: jump to right slide on code attribute change (#478)
Changing attributes like `+line_numbers` wasn't causing the code's slide
to be jumped-to.
2025-03-07 16:24:38 -08:00
Matias Fontanini
92313b4fd9 fix: jump to right slide on code attribute change 2025-03-07 16:21:09 -08:00