-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
c2da9a2
commit 4cbe221
Showing
21 changed files
with
883 additions
and
3 deletions.
There are no files selected for viewing
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,36 @@ | ||
name: CI | ||
on: [ pull_request ] | ||
jobs: | ||
pytest: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: { python-version: '3.9' } | ||
- name: Install dependencies | ||
run: pip install tox | ||
- name: Run pytest | ||
run: tox -e pytest | ||
pylama: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: { python-version: '3.9' } | ||
- name: Install dependencies | ||
run: pip install tox | ||
- name: Run pylama | ||
run: tox -e pylama | ||
pyre: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: { python-version: '3.9' } | ||
- name: Install dependencies | ||
run: pip install tox | ||
- name: Run pyre | ||
run: tox -e pyre |
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,31 @@ | ||
name: Release | ||
on: { push: { tags: [ 'v*' ] } } | ||
jobs: | ||
github: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Create GitHub release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
pypi: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: { python-version: '3.9' } | ||
- name: Run sdist | ||
run: python setup.py sdist | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
skip_existing: true | ||
verbose: true | ||
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,4 @@ | ||
{ | ||
"source_directories": ["pikepdf_annots"], | ||
"strict": false | ||
} |
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 @@ | ||
update: all | ||
pin: True | ||
search: True | ||
close_prs: True | ||
requirements: | ||
- requirements.txt | ||
- requirements-dev.txt |
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,2 @@ | ||
include requirements.txt | ||
graft tests |
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,2 +1,19 @@ | ||
# pikepdf-annots | ||
Helper utilities for pikepdf | ||
PikePDF helper utilities | ||
======================== | ||
|
||
Helper utilities for editing PDFs using [PikePDF](https://github.com/pikepdf/pikepdf). | ||
|
||
## Example usage | ||
|
||
```python3 | ||
from pathlib import PosixPath | ||
from pikepdf_annots import EditableForm, AnnotationMatcher | ||
|
||
class ExampleForm(EditableForm): | ||
def _get_source_pdf(self) -> PosixPath: | ||
return PosixPath('source.pdf') | ||
|
||
with ExampleForm() as pdf: | ||
pdf.update_annotation(0, AnnotationMatcher("First Name"), "Bob") | ||
pdf.update_annotation(0, AnnotationMatcher("Last Name"), "Smoth") | ||
``` |
Oops, something went wrong.