https://github.com/coderefinery/sphinx-minipres
Lightweight presentations out of any webpage
https://github.com/coderefinery/sphinx-minipres
Last synced: 5 months ago
JSON representation
Lightweight presentations out of any webpage
- Host: GitHub
- URL: https://github.com/coderefinery/sphinx-minipres
- Owner: coderefinery
- Created: 2019-08-07T20:31:49.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-29T10:36:53.000Z (over 5 years ago)
- Last Synced: 2025-09-10T04:44:27.339Z (9 months ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Lightweight presentations out of any web page
=============================================
You want to give a presentation. But you also want the material to be
available in a plain reading format. In fact, you want to target the
"looks good when read" rather than the presentation mode. And you
want the minimum work.
This extension transforms any HTML page into an presentation by hiding
unnecessary elements, increasing space between the sections, and
adding a direct scroll (using left and right arrow keys) between
sections.
Right now it is distributed as a `Sphinx documentation generator
`__ extension since that's how the
authors use it, but ``minipres.js`` should be usable by others.
Examples:
* `minipres mode
`__, vs
`normal page `__,
vs `plain mode
`__. In
minipres mode, try pushing left and right arrow keys.
Sphinx extension usage
----------------------
Install::
pip install sphinx-minipres
Add to extensions::
extensions = [
'sphinx_ext_minipres',
]
In any rendered page:
* Add ``?pres`` to the URL to go into slideshow mode
* Add ``?plain`` to go into "plain" mode - no scrolling, but remove
unnecessary elements from the page (most useful for sphinx_rtd_theme)
* Add ``&h=3`` (or so on) to the URL to select the highest (or lowest
actually) heading to use as each section
In the slideshow mode, you can use the left and right arrow keys to
navigate.
Independent usage
-----------------
The sphinx extension simply copies ``minipres.js`` to the build and
includes it - there is not much Sphinx specific here.
On an unrelated website with it hard coded, minipres can be loaded
dynamically from the browser console ``x =
$.getScript('/path/to/minipres.js')`` and then started with
``minipres()``
Development status
------------------
Alpha and works. However, it needs to be adapted to work for each
theme/page style, which will limit its usefulness. Currently removes
unneeded elements on ``sphinx_rtd_theme`` but the core scrolling
probably works on others.
See also
--------
Please let me know if you know of other tools such as this.