Paginator that uses all available screen/window width
# A wide-screen reading app

[![0 dependencies!]https://0dependencies.dev/0dependencies.svg]https://0dependencies.dev

Use all available width to read (no editing).

![demo showing how the app renders text at different widths]assets/demo.gif
This repo is an example of a [Freewheeling App]http://akkartik.name/freewheeling,
designed above all to be easy to run, easy to modify and easy to share.

## Getting started

Install [LÖVE]https://love2d.org. It's just a 5MB download, open-source and
extremely well-behaved.

To run from the terminal, [pass this directory to LÖVE]https://love2d.org/wiki/Getting_Started#Running_Games,
optionally with a file path to edit.
```
$ path/to/love path/to/broadsheet.love path/to/file
```

Alternatively, turn it into a .love file you can double-click on:
```
$ zip -r /tmp/broadsheet.love *.lua
```

To load a file, drop it on the broadsheet.love window.

When restarting, broadsheet.love will load the file from the previous session
by default.

## Hacking

To modify it live without restarting the app each time, download [the driver
app](https://git.sr.ht/~akkartik/driver.love). Here's an example session
with a different freewheeling app:

![making changes without restarting the app]assets/2.gif

[Some reference documentation on how to create your own apps.]reference.md

If the app being modified by the driver lives in a .love file, your changes
will go into the [save directory]https://love2d.org/wiki/love.filesystem.getSaveDirectory.
If it lives in a directory (like this repo), your changes will go straight
into the same directory.

## Keyboard shortcuts

* `pgUp`/`pgDn` to scroll
* `ctrl+f` to find patterns within a file
* `ctrl+=` to zoom in, `ctrl+-` to zoom out, `ctrl+0` to reset zoom
* mouse drag or `shift` + movement to select text, `ctrl+a` to select all,
  `ctrl+c` to copy selection to clipboard

## Known issues

* No support yet for Unicode graphemes spanning multiple codepoints.

* No support yet for right-to-left languages.

* Can't scroll while selecting text with mouse.

* No scrollbars yet. That stuff is hard.

## Mirrors and Forks

This repo is a fork of [lines.love]http://akkartik.name/lines.html, an
editor for plain text where you can also seamlessly insert line drawings.
Its immediate upstream is [the template repo for freewheeling apps]https://git.sr.ht/~akkartik/template-live-editor.
Updates to it can be downloaded from:

* https://git.sr.ht/~akkartik/broadsheet.love
* https://tildegit.org/akkartik/broadsheet.love
* https://git.merveilles.town/akkartik/broadsheet.love
* https://nest.pijul.com/akkartik/broadsheet.love (using the Pijul version control system)

Further forks are encouraged. If you show me your fork, I'll link to it here.

## Feedback

[Most appreciated.]http://akkartik.name/contact Messages, PRs, patches,
forks, it's all good.