Commit 37d86a6b authored by Andrej Shadura's avatar Andrej Shadura

New upstream version 2.3.3

parent 46ed9784
[bumpversion]
current_version = 2.3.3
commit = True
tag = True
[bumpversion:file:setup.py]
[bumpversion:file:docs/conf.py]
[bumpversion:file:src/darkslide/__init__.py]
# Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher)
cookiecutter:
appveyor: 'yes'
c_extension_cython: 'no'
c_extension_optional: 'no'
c_extension_support: 'no'
codacy: 'yes'
codeclimate: 'yes'
codecov: 'yes'
command_line_interface: plain
command_line_interface_bin_name: darkslide
coveralls: 'yes'
distribution_name: darkslide
email: contact@ionelmc.ro
full_name: Ionel Cristian Mărieș
github_username: ionelmc
landscape: 'yes'
package_name: darkslide
project_name: Darkslide
project_short_description: Lightweight markup language-based html5 slideshow generator.
Forked from landslide.
release_date: today
repo_name: python-darkslide
requiresio: 'yes'
scrutinizer: 'yes'
sphinx_doctest: 'no'
sphinx_theme: sphinx-py3doc-enhanced-theme
test_matrix_configurator: 'no'
test_matrix_separate_coverage: 'no'
test_runner: pytest
travis: 'yes'
version: 2.3.0
website: http://blog.ionelmc.ro
year: 2015-2016
[paths]
source =
src/darkslide
*/site-packages/darkslide
[run]
branch = True
source = darkslide
parallel = true
[report]
show_missing = true
precision = 2
omit = *migrations*
# see http://editorconfig.org
root = true
[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8
[*.{bat,cmd,ps1}]
end_of_line = crlf
*.pyc
*.py[cod]
# C extensions
*.so
# Packages
*.egg
*.egg-info
dist
build
eggs
.eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
venv*/
pyvenv*/
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
.coverage.*
nosetests.xml
coverage.xml
htmlcov
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
.idea
landslide/.idea
presentation.html
*.pdf
examples/.DS_Store
*.swp
src/landslide.egg-info/
dist/
*.iml
*.komodoproject
.komodotools
landslide.sublime-project
# Complexity
output/*.html
output/*/index.html
# Sphinx
docs/_build
venv
.tox
.DS_Store
*~
.*.sw[po]
.build
.ve
.env
.cache
.pytest
.bootstrap
.appveyor.token
*.bak
presentation.html
\ No newline at end of file
language: python
python: '3.5'
sudo: false
env:
global:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
- SEGFAULT_SIGNALS=all
matrix:
- TOXENV=check
- TOXENV=examples,publish
- TOXENV=py27,coveralls,codecov
- TOXENV=py33,coveralls,codecov
- TOXENV=py34,coveralls,codecov
- TOXENV=py35,coveralls,codecov
- TOXENV=pypy,coveralls,codecov
before_install:
- |
if [[ "${TOXENV}" =~ "publish" ]]; then
openssl aes-256-cbc -K $encrypted_fabbc4622c56_key -iv $encrypted_fabbc4622c56_iv -in publish-key.enc -out ~/.ssh/publish-key -d
chmod u=rw,og= ~/.ssh/publish-key
echo "Host github.com" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/publish-key" >> ~/.ssh/config
git --version
git remote set-url origin git@github.com:ionelmc/python-darkslide.git
git fetch origin -f gh-pages:gh-pages
fi
- python --version
- uname -a
- lsb_release -a
install:
- pip install tox
- virtualenv --version
- easy_install --version
- pip --version
- tox --version
script:
- tox -v
after_failure:
- more .tox/log/* | cat
- more .tox/*/log/* | cat
before_cache:
- rm -rf $HOME/.cache/pip/log
cache:
directories:
- $HOME/.cache/pip
notifications:
email:
on_success: never
on_failure: always
# Changelog
## v1.1.3
- Identify each slide by a numbered class (#171) (dkg)
- Fix theme image embedding regex to grab all images (#170)
- Fix blockquote font size for rst (#161)
- Fix display of RST image target links (#87)
- Fix relative path generation (#147)
- Add command line option for print version (#135)
- Add use of '---' as a slide separator to textile files (#163)
- README improvements (#88 and #101)
- Improve image path regex and replacement (#177)
## v1.1.2
- Add support for Python 3
- Allow support for copy_theme argument in CFG files (#139) (syscomet)
- Improve MathJax rendering for Markdown files
- Support math output (#144) (davidedelvento)
- Allow presenter notes in slides with no heading in RST files (#141) (regebro)
- And more...
## v1.1.1
### Fixes
- Don't accidentally require watchdog (#134)
## v1.1.0
### Major Enhancements
- Add CHANGELOG
- Add "ribbon" theme from "shower" presentation tool (#129) (durden)
- Add `-w` flag for watching/auto-regenerating slideshow (#71, #120) (jondkoon)
### Minor Enhancements
- Supress ReST rendering errors
- CSS pre enhancements (#91) (roktas)
- Add an example using presenter notes (#106) (netantho)
- Run macros on headers also, to embed images (#74) (godfat)
- Allow PHP code snippets to not require <?php (#127) (akrabat)
- Allow for line numbers and emphasis with reStructuredText (#97) (copelco)
- Add an option to strip presenter notes from output (#107) (aaugustin)
### Fixes
- Firefox offset bug on next slide (#73)
- Fix base64 encoding issue (#109) (ackdesha)
- Fix to embed images defined in CSS (#126) (akrabat)
- Minor documentation fixes (#119, #131) (durden, spin6lock)
- Use configured encoding when reading all embedded files (#125) (iguananaut)
- Allow pygments lexer names that include special characters (#123) (shreyankg)
=========
Changelog
=========
Darkslide v2.3.3 (2016-05-15)
=============================
* Fixed height of QR svg elements.
Darkslide v2.3.2 (2016-04-12)
=============================
* Fixed underline occlusion shadows in the footer (for links).
* Fixed missing `presenter_notes` class not being set when notes mode was on.
Darkslide v2.3.1 (2016-02-08)
=============================
* MathJax is loaded on HTTPS.
Darkslide v2.3.0 (2016-02-07)
=============================
* The Darkslide version is shown in the help sidebar.
Darkslide v2.2.1 (2015-10-06)
=============================
* Fixed config file parsing for math_output.
Darkslide v2.2.0 (2015-10-06)
=============================
* Now macro failures abort rendering. Previously they would just log a message that you'd probably woulnd't notice.
* Fixed broken handling where you have css/js in the cfg file.
* Allowed setting the math_output option in the cfg file.
* Fixed encoding issues in the QR macro.
* Added back the old theme with completely black background (as "void").
* Tweak the faux underlines to look better.
Darkslide v2.1.0 (2015-10-05)
=============================
* Added demo links.
* Fixed options handling. Options from command line now will actually work if a cfg file is used.
* Corrected relative paths handling:
- paths in sources are now relative to the cfg file (previously they were relative to whatever was cwd).
- relative option now correctly works when destination file is not in cwd.
* Fixed layout of slides with many headering (no more paddings for headings, all root elements are spread out evenly
anyway).
* Fixed bad styling of ToC (and probably other things in the sidebar).
* Fixed ToC links (contributed by Cyrille Pontvieux).
Darkslide v2.0.4 (2015-09-09)
=============================
* Improved handling for filenames that have non-ascii characters in them.
Darkslide v2.0.3 (2015-09-08)
=============================
* Fixed handling for filenames that have non-ascii characters in them.
Darkslide v2.0.2 (2015-07-20)
=============================
- Added color classes in the abyss theme.
- Fixed link underlines in the presenter notes.
Darkslide v2.0.1 (2015-07-19)
=============================
* Don't use Monaco in the ``base.css`` - it's way bigger than Consolas and the other fonts. And Consolas is nice enough.
Darkslide v2.0.0 (2015-07-17)
=============================
- Fix display of RST image target links.
- Add cmd line option to print version.
- Rewrote the default theme (solarized colors)
- Overhauled the abyss theme, improved the coloring.
- Removed all the other themes (they are ugly and broken anyway) (**backwards incompatible**).
- Fixes for print css.
- Added support for two new css files: ``base.css`` and ``theme.css``. This
makes reusing styles acros themes and kinds of display (print/screen) more easy.
- Expanded mode is now activated by default.
- Changed macros to use compiled regexes.
- Added a footnote macro.
- Changed QR macro to use ``qrcode`` library. Now it's rendered to SVG. The size is removed (**backwards incompatible**).
Darkslide v1.2.2 (2015-05-22)
=============================
- Fix the blank page issue when generating pdfs (via Chrome's pdf printer).
Darkslide v1.2.1 (2015-05-21)
=============================
- Couple minor improvements to Abyss theme.
Darkslide v1.2.0 (2015-05-19)
=============================
- Modifier keys flag was not cleared propertly (kb shortcuts were not working anymore after
alt-tab etc); now it's cleared on visibility changes and focus loss.
- Changed expanded mode to automatically hide the context.
- Fixed window resize flickering (for every resize event the expaded flag was toggled).
- Disabled context hiding in presenter view.
- Other small styling improvements.
- Added "abyss" theme.
Landslide v1.1.3
================
- Identify each slide by a numbered class (#171) (dkg)
- Fix theme image embedding regex to grab all images (#170)
- Fix blockquote font size for rst (#161)
- Fix display of RST image target links (#87)
- Fix relative path generation (#147)
- Add command line option for print version (#135)
- Add use of '---' as a slide separator to textile files (#163)
- README improvements (#88 and #101)
- Improve image path regex and replacement (#177)
Landslide v1.1.2
================
- Add support for Python 3
- Allow support for copy\_theme argument in CFG files (#139) (syscomet)
- Improve MathJax rendering for Markdown files
- Support math output (#144) (davidedelvento)
- Allow presenter notes in slides with no heading in RST files (#141)
(regebro)
- And more...
Landslide v1.1.1
================
Fixes
-----
- Don't accidentally require watchdog (#134)
Landslide v1.1.0
================
Major Enhancements
------------------
- Add CHANGELOG
- Add "ribbon" theme from "shower" presentation tool (#129) (durden)
- Add ``-w`` flag for watching/auto-regenerating slideshow (#71, #120)
(jondkoon)
Minor Enhancements
------------------
- Supress ReST rendering errors
- CSS pre enhancements (#91) (roktas)
- Add an example using presenter notes (#106) (netantho)
- Run macros on headers also, to embed images (#74) (godfat)
- Allow PHP code snippets to not require <?php (#127) (akrabat)
- Allow for line numbers and emphasis with reStructuredText (#97)
(copelco)
- Add an option to strip presenter notes from output (#107) (aaugustin)
Fixes
-----
- Firefox offset bug on next slide (#73)
- Fix base64 encoding issue (#109) (ackdesha)
- Fix to embed images defined in CSS (#126) (akrabat)
- Minor documentation fixes (#119, #131) (durden, spin6lock)
- Use configured encoding when reading all embedded files (#125)
(iguananaut)
- Allow pygments lexer names that include special characters (#123)
(shreyankg)
============
Contributing
============
Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.
Bug reports
===========
When `reporting a bug <https://github.com/ionelmc/python-darkslide/issues>`_ please include:
* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.
Documentation improvements
==========================
Darkslide could always use more documentation, whether as part of the
official Darkslide docs, in docstrings, or even on the web in blog posts,
articles, and such.
Feature requests and feedback
=============================
The best way to send feedback is to file an issue at https://github.com/ionelmc/python-darkslide/issues.
If you are proposing a feature:
* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that code contributions are welcome :)
Development
===========
To set up `python-darkslide` for local development:
1. Fork `python-darkslide <https://github.com/ionelmc/python-darkslide>`_
(look for the "Fork" button).
2. Clone your fork locally::
git clone git@github.com:your_name_here/python-darkslide.git
3. Create a branch for local development::
git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.org/en/latest/install.html>`_ one command::
tox
5. Commit your changes and push your branch to GitHub::
git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
6. Submit a pull request through the GitHub website.
Pull Request Guidelines
-----------------------
If you need some code review or feedback while you're developing the code just make the pull request.
For merging, you should:
1. Include passing tests (run ``tox``) [1]_.
2. Update documentation when there's new API, functionality etc.
3. Add a note to ``CHANGELOG.rst`` about the changes.
4. Add yourself to ``AUTHORS.rst``.
.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will
`run the tests <https://travis-ci.org/ionelmc/python-darkslide/pull_requests>`_ for each change you add in the pull request.
It will be slower though ...
Tips
----
To run a subset of tests::
tox -e envname -- py.test -k test_myfeature
To run all the test environments in *parallel* (you need to ``pip install detox``)::
detox
graft src/landslide/themes
graft docs
graft examples
graft src
graft ci
graft tests
include .bumpversion.cfg
include .coveragerc
include .cookiecutterrc
include .editorconfig
include .isort.cfg
include AUTHORS.rst
include CHANGELOG.rst
include CONTRIBUTING.rst
include LICENSE
include README.rst
include tox.ini .travis.yml appveyor.yml
exclude publish-key.enc
global-exclude *.py[cod] __pycache__ *.so *.dylib
This diff is collapsed.
version: '{branch}-{build}'
build: off
cache:
- '%LOCALAPPDATA%\pip\Cache'
environment:
global:
WITH_COMPILER: 'cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd'
matrix:
- TOXENV: check
PYTHON_HOME: C:\Python27
PYTHON_VERSION: '2.7'
PYTHON_ARCH: '32'
- TOXENV: 'py27,codecov'
TOXPYTHON: C:\Python27\python.exe
PYTHON_HOME: C:\Python27
PYTHON_VERSION: '2.7'
PYTHON_ARCH: '32'
- TOXENV: 'py27,codecov'
TOXPYTHON: C:\Python27-x64\python.exe
WINDOWS_SDK_VERSION: v7.0
PYTHON_HOME: C:\Python27-x64
PYTHON_VERSION: '2.7'
PYTHON_ARCH: '64'
- TOXENV: 'py34,codecov'
TOXPYTHON: C:\Python34\python.exe
PYTHON_HOME: C:\Python34
PYTHON_VERSION: '3.4'
PYTHON_ARCH: '32'
- TOXENV: 'py34,codecov'
TOXPYTHON: C:\Python34-x64\python.exe
WINDOWS_SDK_VERSION: v7.1
PYTHON_HOME: C:\Python34-x64
PYTHON_VERSION: '3.4'
PYTHON_ARCH: '64'
- TOXENV: 'py35,codecov'
TOXPYTHON: C:\Python35\python.exe
PYTHON_HOME: C:\Python35
PYTHON_VERSION: '3.5'
PYTHON_ARCH: '32'
- TOXENV: 'py35,codecov'
TOXPYTHON: C:\Python35-x64\python.exe
PYTHON_HOME: C:\Python35-x64
PYTHON_VERSION: '3.5'
PYTHON_ARCH: '64'
init:
- ps: echo $env:TOXENV
- ps: ls C:\Python*
install:
- python -u ci\appveyor-bootstrap.py
- '%PYTHON_HOME%\Scripts\virtualenv --version'
- '%PYTHON_HOME%\Scripts\easy_install --version'
- '%PYTHON_HOME%\Scripts\pip --version'
- '%PYTHON_HOME%\Scripts\tox --version'
test_script:
- '%WITH_COMPILER% %PYTHON_HOME%\Scripts\tox'
on_failure:
- ps: dir "env:"
- ps: get-content .tox\*\log\*
artifacts:
- path: dist\*
### To enable remote debugging uncomment this (also, see: http://www.appveyor.com/docs/how-to/rdp-to-build-worker):
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
"""
AppVeyor will at least have few Pythons around so there's no point of implementing a bootstrapper in PowerShell.
This is a port of https://github.com/pypa/python-packaging-user-guide/blob/master/source/code/install.ps1
with various fixes and improvements that just weren't feasible to implement in PowerShell.
"""
from __future__ import print_function
from os import environ
from os.path import exists
from subprocess import check_call
try:
from urllib.request import urlretrieve
except ImportError:
from urllib import urlretrieve
BASE_URL = "https://www.python.org/ftp/python/"
GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
GET_PIP_PATH = "C:\get-pip.py"
URLS = {
("2.7", "64"): BASE_URL + "2.7.10/python-2.7.10.amd64.msi",
("2.7", "32"): BASE_URL + "2.7.10/python-2.7.10.msi",
# NOTE: no .msi installer for 3.3.6
("3.3", "64"): BASE_URL + "3.3.3/python-3.3.3.amd64.msi",
("3.3", "32"): BASE_URL + "3.3.3/python-3.3.3.msi",
("3.4", "64"): BASE_URL + "3.4.3/python-3.4.3.amd64.msi",
("3.4", "32"): BASE_URL + "3.4.3/python-3.4.3.msi",
("3.5", "64"): BASE_URL + "3.5.0/python-3.5.0-amd64.exe",
("3.5", "32"): BASE_URL + "3.5.0/python-3.5.0.exe",
}
INSTALL_CMD = {
# Commands are allowed to fail only if they are not the last command. Eg: uninstall (/x) allowed to fail.
"2.7": [["msiexec.exe", "/L*+!", "install.log", "/qn", "/x", "{path}"],
["msiexec.exe", "/L*+!", "install.log", "/qn", "/i", "{path}", "TARGETDIR={home}"]],
"3.3": [["msiexec.exe", "/L*+!", "install.log", "/qn", "/x", "{path}"],
["msiexec.exe", "/L*+!", "install.log", "/qn", "/i", "{path}", "TARGETDIR={home}"]],
"3.4": [["msiexec.exe", "/L*+!", "install.log", "/qn", "/x", "{path}"],
["msiexec.exe", "/L*+!", "install.log", "/qn", "/i", "{path}", "TARGETDIR={home}"]],
"3.5": [["{path}", "/quiet", "TargetDir={home}"]],
}
def download_file(url, path):
print("Downloading: {} (into {})".format(url, path))
progress = [0, 0]
def report(count, size, total):
progress[0] = count * size
if progress[0] - progress[1] > 1000000:
progress[1] = progress[0]
print("Downloaded {:,}/{:,} ...".format(progress[1], total))
dest, _ = urlretrieve(url, path, reporthook=report)
return dest
def install_python(version, arch, home):
print("Installing Python", version, "for", arch, "bit architecture to", home)
if exists(home):
return
path = download_python(version, arch)
print("Installing", path, "to", home)
success = False
for cmd in INSTALL_CMD[version]:
cmd = [part.format(home=home, path=path) for part in cmd]
print("Running:", " ".join(cmd))
try:
check_call(cmd)
except Exception as exc:
print("Failed command", cmd, "with:", exc)
if exists("install.log"):
with open("install.log") as fh:
print(fh.read())
else:
success = True
if success:
print("Installation complete!")
else:
print("Installation failed")
def download_python(version, arch):
for _ in range(3):
try:
return download_file(URLS[version, arch], "installer.exe")
except Exception as exc:
print("Failed to download:", exc)
print("Retrying ...")
def install_pip(home):
pip_path = home + "/Scripts/pip.exe"
python_path = home + "/python.exe"
if exists(pip_path):
print("pip already installed.")
else:
print("Installing pip...")
download_file(GET_PIP_URL, GET_PIP_PATH)
print("Executing:", python_path, GET_PIP_PATH)
check_call([python_path, GET_PIP_PATH])
def install_packages(home, *packages):
cmd = [home + "/Scripts/pip.exe", "install"]
cmd.extend(packages)
check_call(cmd)
if __name__ == "__main__":
install_python(environ['PYTHON_VERSION'], environ['PYTHON_ARCH'], environ['PYTHON_HOME'])
install_pip(environ['PYTHON_HOME'])
install_packages(environ['PYTHON_HOME'], "setuptools>=18.0.1", "wheel", "tox", "virtualenv>=13.1.0")
:: To build extensions for 64 bit Python 3, we need to configure environment