Giter Club home page Giter Club logo

revelation's Introduction

revelation's People

Contributors

danieleteti avatar dependabot-preview[bot] avatar humrochagf avatar trellixvulnteam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

revelation's Issues

Move from click to typer

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 ๐Ÿ˜ƒ

README instructions media path

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)

Removing "revelation installreveal" command

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?

Static file generation

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?

Custom background image for a single slide

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>

Move from unittest/nosetests to pytest

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.

highlightjs support

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

WebSocket error in static presentation

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.

Error: Presentation file not found.

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.

Review and update defaults and doc

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.

Does not run in Python 3.7: Issues with gevent

Python Version and dependencies

$ 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

Running revelation

$ 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

Problem

The problem is gevent<1.3.6 is broken with python 3.7 as discussed here gevent/gevent#1260.

Solution

Updating gevent>=1.3.6 or greenlet >= 0.4.14 in setup.cfg and requirments.txt

Drop Gevent

Drop gevent to use werkzeug 1.0.0 websocket system to trigger the page refresh.

Automatic Reload

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?

Adding a custom style to `override` the default one.

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.

REVEAL_SLIDE_SEPARATOR not working on Windows (Python 3.6)

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.

image

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!

Move from os.path to pathlib

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.