Hello there! ๐
My name is Humberto Rocha and I like to solve problems and automate stuff ๐
You can also find me at:
Make awesome reveal.js presentations with revelation :sparkler:
License: MIT License
My name is Humberto Rocha and I like to solve problems and automate stuff ๐
You can also find me at:
Click is a great tool but it's a bit verbose when it comes to input validation.
After working for a good time with typer on other projects I think it's time to embrace type hints to make our lives a bit easier ๐
I believe the README has a discrepancy here:
All images used on your presentation are placed inside the 'media' folder and referenced on your slides starting from your presentation root.
![Python Logo](img/python.png)
Should be
![Python Logo](media/python.png)
IMHO this command is an "internal initialization" that should now seen by the end user.
We could invoke the needed function before each other commands to be sure that reveal.js
is available.
What do you think?
Move from requirements.txt and setuptools in favour of poetry
Remove Python 2 dependencies
Would be really useful to have the option to generate statical HTML (and all the needed files) to use the presentation wihout having python installed.
Seeing the code should not be too much difficult, but I didn't tried to do the change by myself (maybe in the future).
Is this feature already planned?
Is it possible to use a background image for a single slide of the presentation?
In reveal.js you can do this with something like the following:
<section data-background-image="http://example.com/image.png">
<h2>Image</h2>
</section>
As nosetests is quite handy to extend unittest functionalities, we still keep the vebose unittest way of testing.
Moving to pytest will make tests more "fun" to write and easy to maintain.
I'm not sure this is an issue or something I'm doing incorrectly. But I'm following the instructions at https://revealjs.com/markdown/ about using code snippets with highlight according to lines.
I took a look to the template that is being used and it has some references to highlightjs but using this following snippet is not working: (note I'm trying to highlight lines 1 in a first step and 2 to 4 in a second step)
def primera_funcion(x):
return resultado
primera_funcion(x)
I'm not sure this is a particular issue with highlightjs because other plugins such as zoomjs seems to work as expected.
Is there any guidance you could provide to make this feature work?
Thanks
Alfonso
The version 0.4.0 added static rendering and automatic reload (great!) however when static presentation is generated, the javascript code related to the websockets (used for the automatic reload) is still there in the HTML, so the browser generated an error in the console because it request a WebSocket endpoint.
Nice idea but I can't pass this error, tested with 1.1.0 and main
revelation installreveal
revelation mkpresentation p # I suggest to adjust documentation to use this command befor start (I guess)
revelation start p
Error: Presentation file not found.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
The default parameters and the current documentation needs to be revisited and checked against Reveal.js parameter changes to be sure all changes on both sides are covered.
$ python --version
Python 3.7.0
$ pip freeze
argh==0.26.2
certifi==2018.8.13
click==6.7
gevent==1.3.4
gevent-websocket==0.10.1
greenlet==0.4.14
Jinja2==2.10
MarkupSafe==1.0
pathtools==0.1.2
PyYAML==3.14
revelation==0.5.1
watchdog==0.8.3
Werkzeug==0.14.1
$ revelation start NAME/slides.md
/home/jt/miniconda3/envs/presentation/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
return f(*args, **kwds)
/home/jt/miniconda3/envs/presentation/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
return f(*args, **kwds)
/home/jt/miniconda3/envs/presentation/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
return f(*args, **kwds)
/home/jt/miniconda3/envs/presentation/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
return f(*args, **kwds)
/home/jt/miniconda3/envs/presentation/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
return f(*args, **kwds)
Starting revelation server...
Running at http://localhost:4000
Traceback (most recent call last):
File "/home/jt/miniconda3/envs/presentation/bin/revelation", line 11, in <module>
sys.exit(cli())
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/revelation/cli.py", line 307, in start
("^/.*", DebuggedApplication(app)),
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/geventwebsocket/server.py", line 22, in __init__
super(WebSocketServer, self).__init__(*args, **kwargs)
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/gevent/pywsgi.py", line 1441, in __init__
StreamServer.__init__(self, listener, backlog=backlog, spawn=spawn, **ssl_args)
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/gevent/server.py", line 109, in __init__
BaseServer.__init__(self, listener, handle=handle, spawn=spawn)
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/gevent/baseserver.py", line 95, in __init__
self._stop_event = Event()
File "src/gevent/event.py", line 163, in gevent._event.Event.__init__
File "src/gevent/event.py", line 45, in gevent._event._AbstractLinkable.__init__
File "src/gevent/_hub_local.py", line 80, in gevent.__hub_local.get_hub_noargs
File "/home/jt/miniconda3/envs/presentation/lib/python3.7/site-packages/gevent/hub.py", line 390, in __init__
WaitOperationsGreenlet.__init__(self, None, None)
File "src/gevent/_greenlet_primitives.py", line 42, in gevent.__greenlet_primitives.TrackedRawGreenlet.__init__
SystemError: /tmp/build/80754af9/python_1530186926074/work/Objects/dictobject.c:1439: bad argument to internal function
The problem is gevent<1.3.6
is broken with python 3.7 as discussed here gevent/gevent#1260.
Updating gevent>=1.3.6
or greenlet >= 0.4.14
in setup.cfg
and requirments.txt
Drop gevent to use werkzeug 1.0.0 websocket system to trigger the page refresh.
Hi, this project is really nice.
I currently use reveal-md but I really would use this one (cause of python).
What stops me to use revelation is the lack of automatic reload, which is very useful when you are writing your presentation (thinks to have 2 monitors where write markdown and see how the presentation changes).
Do you plan to implement this functionality?
Currently AFAIK the user can substitute the default style with a custom one. However as far as I know, usually users just want to override some css classes (e.g. I need to put a background with the logo of my company). Should be really simple to add another css file which can override or add new css classes for this cases.
It seems that the separator is for some reason not respected. Tried with the default "---" and this will not slice the markdown into 3 slides.
As a sanity check I modified the app.py, load_slides function to open the slides.md in text (not binary) mode and without the utf-8 decode.
E.g.
with open(path, "rt") as presentation:
slides = presentation.read()
In this case the slides got created properly, leading me to suspect that there is something related to Windows and how the file is read / handled before the actual split (the regex).
Thanks for having a look!
Since this lib has a lot of file handling. It will be easier to manipulate them with Path objects instead of keeping them as strings.
This move will be easier to do by finishing #84 and using the type Path
to parse the cli input, and then introducing it to the core lib than going on the opposite direction.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.