You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
6.0 KiB
164 lines
6.0 KiB
# Besos Loves Slides
|
|
|
|
There's an amazing story about Amazon. One day Jeff Besos saw a PowerPoint presentation so heinous,
|
|
so evil, so boring, that he full on _banned_ PowerPoint presentations at Amazon. Immediately after
|
|
this presentation he emailed the entire company declaring all PowerPoint presentations dead.
|
|
|
|
Can you imagine being the guy who gave this fateful presentation? I personally would be proud. I'd
|
|
take that .ppt on the road and show everyone the power of _POWER POINT_! Who knew it has the ability to destroy the
|
|
will of even the wealthiest of individuals with its unmitigated and complete boredom.
|
|
|
|
This project is a celebration of that one PPT presentation. That .ppt that sent Jeff into a tailspin
|
|
of madness. It seeks to bring Jeff Besos painful memories of that one fateful day when he crashed
|
|
out over some slides in a boardroom.
|
|
|
|
## Status
|
|
|
|
This is mostly a simple presentation tool for my videos in my courses. I decided to take some of
|
|
the knowledge from my Game Development adventures and use those to make something better than
|
|
PowerPoint for my use cases. I mostly need to show text and some videos for a short amount of time
|
|
on a randomly attached monitor while also looking at a status screen on another one.
|
|
|
|
Currently you can run `besos.exe` (it might work on other platforms, let me know) and give it a
|
|
`.md` file formatted to have slides. See `samples/about-bezos.md` which is a quick
|
|
example from one of my courses.
|
|
|
|
## Features
|
|
|
|
1. Metadata at the top is json which can set fonts, sizes, etc.
|
|
2. Slides start with `===`.
|
|
3. Each slide is separated with `---`.
|
|
4. Each slide can also have json metadata for font sizes, shaders, colors, etc.
|
|
4. Use `# Title` on the first line for the title.
|
|
5. Everything after is content.
|
|
6. Hot reloading mostly works.
|
|
7. There's a remote control program `bezos_ctl` you can use from the command line.
|
|
8. There's one for windows named `bezos_ctrl` that won't open a `cmd.exe`.
|
|
9. You can apply shaders to slides.
|
|
10. Horrible performance for now.
|
|
11. Separate control window to see current/next slides and control the present window.
|
|
12. The ability to easily move the present window to another monitor (only tested on Windows).
|
|
|
|
# Supported "Markdown"
|
|
|
|
It's barely markdown at this point, but look in `samples/about-bezos.md` for a demo of everything.
|
|
The features supported are:
|
|
|
|
`{}`
|
|
: JSON meta data can go at the top of the deck and on each slide. Settings at the top are defaults
|
|
and you change then in the slides.
|
|
|
|
`#`
|
|
: This tags the line as the title. You can change its style using `"title_"` options.
|
|
|
|
`Plain Text`
|
|
: Just put lines of text.
|
|
|
|
`*`
|
|
: Bullet points are supported, but nothing fancy.
|
|
|
|
`!(assets/some_image.jpg)`
|
|
: Images are supported and should work with at least `.png` and `.jpg`.
|
|
|
|
``
|
|
: You can explicitly place an image in a specific cell by giving the cell name where you'd normally
|
|
put alt text.
|
|
|
|
That's it. The parser is also very basic and gives terrible errors. If you make a change and
|
|
nothing reloads then check the logs in the console.
|
|
|
|
## Available Metadata Options
|
|
|
|
## Shaders
|
|
|
|
You can apply a shader to your slide with `"shader": "name"`. The shaders are configured in
|
|
`assets/shaders.json` but I may change this to be just a file.
|
|
|
|
Here's an example from `samples/about-bezos.md`:
|
|
|
|
```
|
|
{
|
|
"shader": "flame",
|
|
"bg_color": [80, 0, 0, 255],
|
|
"layout": "no_title",
|
|
"font_size": 200
|
|
}
|
|
I Made a
|
|
PowerPoint
|
|
Killer
|
|
```
|
|
|
|
I'm actually not very good at writing shaders, but I'm sure you'll cook up something really great.
|
|
|
|
## Layout Language
|
|
|
|
The layouts are defined in `assets/layouts.json` and use my layout description language from
|
|
[lel-guecs](https://git.zedshaw.games/games/lel-guecs).
|
|
|
|
Layout Expression Language (lel) is a small
|
|
language that describes how ragged arrays of cells are structured. The idea is that you define
|
|
where stuff goes separate from the stuff that goes there. This makes it easier to work out common
|
|
UI layouts and reuse them, and also makes your code _way_ simpler. Instead of crazy nested objects
|
|
inside objects you just create a layout and put stuff in it like a container.
|
|
|
|
I'll document this further in a later release, but ifyou look at `"default_ui"` in
|
|
`assets/layouts.json" you see this:
|
|
|
|
```
|
|
"[t_left|t_center|t_right]",
|
|
"[*%(100,600)slide]",
|
|
"[_]",
|
|
"[_]",
|
|
"[_]",
|
|
"[_]",
|
|
"[_]",
|
|
"[=title|=*%(200,100)description|_|_|_]"
|
|
```
|
|
|
|
This is multiple strings only because JSON doesn't have a multiline string. This is converted into a
|
|
single string to define the layout.
|
|
|
|
The `[]` Creates a single cell. The `[t_left]` creates a cell name `t_left`. The `[*%(100,600)slide]` says, "Expand (`*`) to fill percent (`%`) 100 wide by 600 long." In this case the `slide` cell will take up 1 column and 6 rows. If you see `=` that means to center it.
|
|
|
|
## Command Line Remote
|
|
|
|
There's a `builddir/bezos_cli` that allows for remote control of your presentation. It can do most
|
|
things the control window does. Here's the options:
|
|
|
|
`-L`/`-R`
|
|
: Move the present window to the "Left" or "Right" screen.
|
|
|
|
`-N`/`-P`
|
|
: Next and Previous slide.
|
|
|
|
`-q`
|
|
: Quit.
|
|
|
|
`-f`
|
|
: Toggle full screen.
|
|
|
|
`-p`
|
|
: What port to use.
|
|
|
|
> __WARNING__ This works by opening a UDP port on port 9898. If it doesn't work that's probably
|
|
> why. Also, it should only be on localhost but let me know if it's getting it wrong.
|
|
|
|
## `bezos_cli` vs. `bezos_ctrl`
|
|
|
|
You may notice there's a `bezos_cli` and `bezos_ctrl`
|
|
but *only on Windows*. This is because Windows makes a distinction between "console" apps and
|
|
"windows" apps.
|
|
|
|
The `bezos_cli` is what you want when using it from the command line or on Unix systems. It just
|
|
works like you think it does and the code is in `src/bezos_ctl.cpp`.
|
|
|
|
The `bezos_ctrl` is compiled as a `windows` subsystem app so when run it does _no console output_.
|
|
This lets you run it in things like Stream Deck and other launchers without popping open a `cmd.exe`
|
|
window to run it.
|
|
|
|
## Future Features
|
|
|
|
I'm pretty good with this so far but I may tinker with it more later. If you have ideas or requests
|
|
send them to help@learncodethehardway.com and I'll take a look.
|
|
|
|
Or...just write your own. This ain't that hard.
|
|
|