Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparation for pypi #6

Merged
merged 3 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# IDE user files
.idea/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include README.md
include LICENSE.md
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,47 @@ Copyright 2013 - [Helder Correia](http://heldercorreia.com) (GPL2)
--------------------------------------------

Example – this source:
```markdown
Bla bla bla

Bla bla bla
![this is the caption](http://lorempixel.com/400/200/)

![this is the caption](http://lorempixel.com/400/200/)

Next paragraph starts here
Next paragraph starts here
```


would generate this:

<p> Bla bla bla</p>

<figure>
<img src="http://lorempixel.com/400/200/">
<figcaption>this is the caption</figcaption>
</figure>

<p>Next paragraph starts here</p>
```html
<p> Bla bla bla</p>

<figure>
<img src="http://lorempixel.com/400/200/">
<figcaption>this is the caption</figcaption>
</figure>

<p>Next paragraph starts here</p>
```


It can also handle images that use references and/or titles :

Some really good writing.
```markdown
Some really good writing.

![Description of something cool.][ref1]
![Description of something cool.][ref1]

More great writing.
More great writing.

[ref1]: http://lorempixel.com/400/200/ "A title for the cool image."
[ref1]: http://lorempixel.com/400/200/ "A title for the cool image."
```

would generate this:
```html
<p>Some really good writing.</p>

<p>Some really good writing.</p>

<figure><img alt="Description of something cool." src="http://lorempixel.com/400/200/" title="A title for the cool image."><figcaption>Description of something cool.</figcaption>
</figure>
<figure><img alt="Description of something cool." src="http://lorempixel.com/400/200/" title="A title for the cool image."><figcaption>Description of something cool.</figcaption>
</figure>

<p>More great writing.</p>
<p>More great writing.</p>
```
19 changes: 18 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,27 @@

from setuptools import setup

with open('README.md') as f:
readme = f.read()

setup(
name='figureAltCaption',
version='1.0.0',
description='Extension for Python-Markdown to parse images with captions.',
long_description=readme,
long_description_content_type="text/markdown",
url='https://github.com/jdittrich/figureAltCaption',
py_modules=['figureAltCaption'],
install_requires=['Markdown>=2.0',],
install_requires=['Markdown>=2.0,<3.0', ],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Documentation',
'Topic :: Text Processing :: Markup',
'Topic :: Utilities'
]
)