-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
637 additions
and
558 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'V*' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install pypa/build | ||
run: python -m pip install build --user | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: python -m build --sdist --wheel --outdir dist/ . | ||
|
||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Unit Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags-ignore: | ||
- 'V*' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.6, 3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
sudo apt update | ||
sudo apt install -y xvfb | ||
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb | ||
sudo apt install -y ./wkhtmltox_0.12.6-1.bionic_amd64.deb | ||
pip install -r requirements.txt | ||
- name: Run unit test | ||
run: nosetests --with-coverage --cover-package=src/imgkit --where tests imgkit_test.py | ||
|
||
- name: Run code coverage | ||
run: codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
build | ||
dist | ||
imgkit.egg-info | ||
__pycache__ | ||
|
||
# Tests | ||
.tox | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
# Change Log | ||
|
||
## [1.2.0] - 2018-04-07 | ||
|
||
### Added | ||
|
||
### Changed | ||
|
||
Use GH actions for CI/CD. | ||
### Fixed | ||
|
||
Fix `six` package requirements. | ||
|
||
## [1.1.1] - 2018-04-06 | ||
|
||
### Added | ||
|
||
### Changed | ||
|
||
### Fixed | ||
|
||
Use `six` for `basestring` compatibility. | ||
|
||
## [1.1.0] - 2021-03-17 | ||
|
||
### Added | ||
|
||
### Changed | ||
|
||
- Refine code on get `wkhtmltoimage` & `xvfb-run` path. | ||
- Refine code based on codacy suggestion. | ||
- Use issue templates in GitHub. | ||
|
||
### Fixed | ||
|
||
## [1.0.5] - 2021-03-12 | ||
|
||
### Added | ||
|
||
### Changed | ||
|
||
- Fix travis-ci CI/CD error. | ||
- Support new python version: 3.7, 3.8, 3.9. | ||
|
||
### Fixed | ||
|
||
## [1.0.2] - 2019-05-16 | ||
## [1.0.1] - 2018-02-08 | ||
## [1.0.0] - 2018-02-07 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = [ | ||
"setuptools", | ||
"wheel", | ||
"six" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
six | ||
coverage | ||
codecov | ||
nose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[metadata] | ||
# replace with your username: | ||
name = imgkit | ||
version = 1.2.0 | ||
author = Jarrekk | ||
author_email = [email protected] | ||
description = Wkhtmltopdf python wrapper to convert html to image using the webkit rendering engine and qt | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/jarrekk/imgkit | ||
project_urls = | ||
Bug Tracker = https://github.com/jarrekk/imgkit/issues | ||
classifiers = | ||
Programming Language :: Python | ||
Programming Language :: Python :: 2.7 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
License :: OSI Approved :: MIT License | ||
Operating System :: OS Independent | ||
Topic :: Text Processing | ||
Topic :: Text Processing :: General | ||
Topic :: Text Processing :: Markup | ||
Topic :: Text Processing :: Markup :: HTML | ||
Topic :: Text Processing :: Markup :: XML | ||
Topic :: Utilities | ||
|
||
[options] | ||
package_dir = | ||
= src | ||
packages = find: | ||
|
||
[options.packages.find] | ||
where = src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
from distutils.core import setup | ||
from setuptools.command.test import test | ||
import os | ||
import sys | ||
import imgkit | ||
|
||
|
||
class PyTest(test): | ||
def finalize_options(self): | ||
test.finalize_options(self) | ||
self.test_args = ['imgkit_test.py'] | ||
self.test_suite = True | ||
|
||
def run_tests(self): | ||
# import here, cause outside the eggs aren't loaded | ||
import pytest | ||
os.chdir('test/') | ||
err_no = pytest.main(self.test_args) | ||
sys.exit(err_no) | ||
|
||
|
||
def long_description(): | ||
try: | ||
import pypandoc | ||
long_desc = pypandoc.convert_file('README.md', 'rst') | ||
long_desc += '\n' + pypandoc.convert_file('AUTHORS.md', 'rst') | ||
except Exception as e: | ||
print(e) | ||
long_desc = imgkit.__doc__.strip() | ||
return long_desc | ||
|
||
from setuptools import setup | ||
|
||
setup( | ||
name='imgkit', | ||
version=imgkit.__version__, | ||
description=imgkit.__doc__.strip(), | ||
long_description=long_description(), | ||
download_url='https://github.com/jarrekk/imgkit', | ||
license=imgkit.__license__, | ||
tests_require=['pytest'], | ||
cmdclass={'test': PyTest}, | ||
packages=['imgkit'], | ||
author=imgkit.__author__, | ||
author_email=imgkit.__contact__, | ||
url=imgkit.__homepage__, | ||
classifiers=[ | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Topic :: Text Processing', | ||
'Topic :: Text Processing :: General', | ||
'Topic :: Text Processing :: Markup', | ||
'Topic :: Text Processing :: Markup :: HTML', | ||
'Topic :: Text Processing :: Markup :: XML', | ||
'Topic :: Utilities' | ||
] | ||
name="imgkit", | ||
install_requires=[ | ||
"six", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,8 @@ | |
|
||
__author__ = "jarrekk" | ||
__contact__ = "[email protected]" | ||
__version__ = "1.1.0" | ||
__homepage__ = "https://github.com/jarrekk/imgkit" | ||
__license__ = "MIT" | ||
|
||
from .api import config, from_file, from_string, from_url | ||
from .imgkit import IMGKit | ||
from .api import from_url, from_file, from_string, config |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.