- Homepage: https://bast.fr/
- Twitter: @__radovan
Other websites/places where I hang out:
:microphone: Serving presentation slides written in Markdown.
Home Page: https://cicero.xyz
License: GNU Affero General Public License v3.0
Other websites/places where I hang out:
This is an important issue.
For users/organizations with more than 100 repos, the remaining repos seem to be dropped from the selection menu.
Is there a standard way to override and/or extend the standard "modules" that configure cicero? A use case I have in mind is when I want to use a local version of MathJax or set up some TeX macros for it. It seems like I need to modify cicero's sources to do that and always serve locally.
One idea is that if a local template.html
or remark.html
is present, then that would override the generic template. This would allow branding and customizing.
Looks a bit more lightweight and I need a good excuse to learn it.
I need to test a bit more but soon will make v3 the default API.
@robertodr @olemb I would like to suggest changing license to Affero GPL:
https://www.gnu.org/licenses/why-affero-gpl.html
I think this license is more appropriate for programs behind web services.
In particular:
The GNU Affero General Public License is a modified version of the ordinary GNU GPL
version 3. It has one added requirement: if you run a modified program on a server
and let other users communicate with it there, your server must also allow them to
download the source code corresponding to the modified version running there.
In other words running a web service then equals to distributing the code. I personally care much more about share-alike than permissiveness.
What is your opinion?
Would be nice to extract it from the Markdown file. Question is how to define the title. As the first top-level heading?
I am not sure if it is a big deal, but I get an "Internal Server Error" if the md-file is encoded with ANSI (windows). It is probably only a problem if the file contains special characters (like Norwegian letters). See example below.
With ANSI encoding:
http://cicero.xyz/v2/remark/github/arnfinn/presentasjoner/master/ansi.md
With UTF-8 encoding (the same presentation):
http://cicero.xyz/v2/remark/github/arnfinn/presentasjoner/master/utf8.md
v3 also does not work: http://cicero.xyz/v3/remark/0.14.0/github.com/arnfinn/presentasjoner/master/ansi.md
For this:
Pipfile (thanks to @robertodr):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
cicero = {git = "https://github.com/bast/cicero.git", ref = "master"}
[dev-packages]
With super simple copy-paste-able code snippets.
The recent setup.py doesn't account for the need for html template files etc. I will correct this in a PR soonish.
We should probably serve them locally.
Goal of this issue thread is to agree on v3 of the API and iron out some known issues (listed below).
Current headaches with v2:
This may well be a feature but currently this breaks the demo slides.
I was linked to someone's slides on cicero, and didn't know what it was, so I decided to move up a few levels in the URL hierarchy. Every level between the .md file and cicero.xyz gives an internal server error.
Non-matching URLs should give a 404 message, with a link up to cicero.xyz.
With this the latest version currently fails on the server.
Easier encoding, more compact code.
Works with Python 3. @robertodr
This seems to work:
cicero -f aoijoiwjd.mkd
but when I load the page I get "Internal Server Error" and this in the console:
[2016-10-26 11:45:07,635] ERROR in app: Exception on /favicon.ico [GET]
Traceback (most recent call last):
File "/home/olemb/.local/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "/home/olemb/.local/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/olemb/.local/lib/python2.7/site-packages/flask/app.py", line 1539, in handle_user_exception
return self.handle_http_exception(e)
File "/home/olemb/.local/lib/python2.7/site-packages/flask/app.py", line 1498, in handle_http_exception
return handler(e)
File "/home/olemb/src/cicero/cicero/app.py", line 16, in page_not_found
return render_template('404.html'), 404
File "/home/olemb/.local/lib/python2.7/site-packages/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/home/olemb/.local/lib/python2.7/site-packages/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/home/olemb/.local/lib/python2.7/site-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/home/olemb/.local/lib/python2.7/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/olemb/src/cicero/cicero/templates/404.html", line 1, in top-level template code
{% extends "base.html" %}
File "/home/olemb/src/cicero/cicero/templates/base.html", line 45, in top-level template code
{% block content %}
File "/home/olemb/src/cicero/cicero/templates/404.html", line 11, in block "content"
<a href="{{ url_for('home') }}">nice</a>.
File "/home/olemb/.local/lib/python2.7/site-packages/flask/helpers.py", line 332, in url_for
return appctx.app.handle_url_build_error(error, endpoint, values)
File "/home/olemb/.local/lib/python2.7/site-packages/flask/app.py", line 1811, in handle_url_build_error
reraise(exc_type, exc_value, tb)
File "/home/olemb/.local/lib/python2.7/site-packages/flask/helpers.py", line 322, in url_for
force_external=external)
File "/home/olemb/.local/lib/python2.7/site-packages/werkzeug/routing.py", line 1758, in build
raise BuildError(endpoint, values, method, self)
BuildError: Could not build url for endpoint 'home'. Did you mean 'preview.home' instead?
127.0.0.1 - - [26/Oct/2016 11:45:07] "GET /favicon.ico HTTP/1.1" 500 -
Seems like rawgit is closing down its services.
I get the following page when I try to open one of my presentations:
Also redirect all traffic to https.
I do not think it is possible at the moment.
How to test it (if you are on a Windows machine with Python 3.6 using Git Bash)
virtualenv venv
source venv/Scripts/activate # Scripts instead of bin on Windows...
pip install git+https://github.com/bast/cicero.git@master#egg=cicero
git clone [email protected]:arnfinn/presentasjoner.git
cicero --file presentasjoner/utf8.md --debug
Then go to http://127.0.0.1:5000/
Currently it just shows an empty selector.
This is because files get cached forever. This means that if images get updated, they may not refresh.
Today we have separate apps for server and preview mode. This leads to duplicate code and makes it impossible to pass config parameters to the Flask contructor based on the command line.
We could fix this by switching to blueprints: http://flask.pocoo.org/docs/0.10/blueprints/
The code would then look something like this:
server = flask.Blueprint('server')
@server.route('/')
def home():
...
def main():
args = parse_args()
app = flask.Flask('Cicero',
template_folder=paths.TEMPLATE_FOLDER,
static_folder=paths.STATIC_FOLDER)
if args.filename:
app.config['filename'] = args.filename
app.register_blueprint(preview)
else:
app.register_blueprint(server)
app.register_blueprint(common)
We will need to find a workaround: https://www.mathjax.org/cdn-shutting-down/ @robertodr
I would like to make a 16:9 presentation. Is that possible through Cicero? With Remark it is something like this:
var slideshow = remark.create({ ratio: "16:9" });
Sidenote: Are there still places you have to use 4:3?
The local preview works only if the markdown file is in the same directory as the Python scripts:
python cicero.py -f demo.mkd
renders correctly to 0.0.0.0:5000
while:
python ~/path/to/cicero.py -f my_file.mkd
gives an error in the browser.
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.