Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
af16262
Modified pandoc_reader by adding capabilities to read YAML header
nandac Apr 14, 2020
61b221e
Added error checking and the ability to not encode {static} reference…
nandac Apr 15, 2020
5a9ec41
Added ability to unencode attach and static link directives
nandac Apr 15, 2020
3350703
Corrected issue where output was not assigned to post pandoc output
nandac Apr 16, 2020
8cf5526
Updated wording of README
nandac Apr 16, 2020
580ec05
Updated documentation and added a check to see if Pandoc is installed
nandac Oct 15, 2020
3c0266d
Updated .gitignore by adding settings from GitHub's python .gitignore
nandac Oct 15, 2020
2252089
Restructured code according to new pelican plugin namespaece format
nandac Oct 15, 2020
ca5d7af
Used isort to sort imports correctly and fix linting issue on GitHub
nandac Oct 16, 2020
39ef3f9
Used black package to reformat code to fix linting issues
nandac Oct 16, 2020
cf890ff
Added docstring to empty tests file
nandac Oct 16, 2020
92aec38
Ran flake8 linter on file to fix issues
nandac Oct 16, 2020
8f2496f
Added tests to see if all checks pass
nandac Oct 16, 2020
9c4a14d
Fixed issue with test
nandac Oct 16, 2020
f0cee8e
Fixing raising of exception test
nandac Oct 16, 2020
3bb09f4
Added invalid path unit tests for pandoc-reader
nandac Oct 17, 2020
6c1fdb6
Reformatted tasks.py so that we can pass liny checks on GitHub
nandac Oct 17, 2020
db1c019
Added pandoc installation step as a test dependency
nandac Oct 17, 2020
a5464d1
Adding sudo to pandoc installation step
nandac Oct 17, 2020
ae2ba83
Removed line-length check on black command to see if we can pass lint…
nandac Oct 17, 2020
0fb62fc
Reformatted test_pandoc_reader.py
nandac Oct 17, 2020
a52aa86
Using absolute paths to fixtures so that tests pass
nandac Oct 17, 2020
86d28b8
Fixing path to fixtures
nandac Oct 17, 2020
b816115
Fixed unmatched bracket syntax issue
nandac Oct 17, 2020
32d5669
Added more tests and set line length to 79 characters
nandac Oct 18, 2020
ddaeafd
Fixing import order
nandac Oct 18, 2020
7182afc
Fixing import order
nandac Oct 18, 2020
de9fb7d
Setting line-legth argument for black
nandac Oct 18, 2020
80dbce8
Reformatted files as per linting issues
nandac Oct 18, 2020
a6dee23
Updated and improved README with links to Pandoc's documentation
nandac Oct 18, 2020
dea0bf3
Fixed README formatting issues
nandac Oct 18, 2020
f8fe46a
More tweaks to the README
nandac Oct 18, 2020
88f9610
Added more information about the two ways to specify options to Pandoc
nandac Oct 18, 2020
f9a76e3
Added code and test for default file support and added PyYAML package
nandac Oct 20, 2020
c14e5f5
Fixed formatting and warnings to pass lint checks
nandac Oct 20, 2020
991f665
Fixing import sorting error
nandac Oct 20, 2020
97b97ea
Fixing import error
nandac Oct 20, 2020
606b2a9
Fixing import error
nandac Oct 20, 2020
5860380
Added tests using default files
nandac Oct 21, 2020
4428a91
Trying to fix linting errors with imports
nandac Oct 21, 2020
90d24b6
Output isort diff to get insight into import formatting error
nandac Oct 21, 2020
ffd94e4
Fixing import formatting errors
nandac Oct 21, 2020
12fefeb
Updated README with more information about usage and dependencies
nandac Oct 21, 2020
10fcc92
Added capability to add title metadata as first heading
nandac Oct 27, 2020
04a9f4f
Removal of leading and trailing quotes before saving as metadata
nandac Oct 30, 2020
a39d597
Updated README with examples showing quotation marks for YAML files
nandac Oct 30, 2020
1514474
Updated README with examples showing quotation marks for YAML files
nandac Oct 30, 2020
32c9bb5
Removed code to automatically insert title specified in metadata
nandac Nov 1, 2020
8135ca6
Updated README by removing information about title insertion and adde…
nandac Nov 1, 2020
a4aa126
Added capability to generate a table of contents
nandac Nov 7, 2020
5cc3d1d
Reformatted files using black
nandac Nov 7, 2020
3930c20
Updated README with information about generating a table of contents …
nandac Nov 7, 2020
8964041
Added missing call to process metadata for table of contents
nandac Nov 7, 2020
6fb3efb
Updated tanle of comtents template to have a class instead of an id
nandac Nov 7, 2020
3e2d51e
Fixed tests to be in accrodance with table of contents template changes
nandac Nov 7, 2020
3c45eb2
Added capability to add citations using a bibliography file - not cov…
nandac Nov 12, 2020
cfc7e17
Refactored and modularized code and add citation tests
nandac Nov 13, 2020
2d52493
Fixed code comments and formatting.
nandac Nov 13, 2020
f9de207
Fixing tests and linting issues.
nandac Nov 13, 2020
7af0f8d
Added tests for using citations with command line extensions and argu…
nandac Nov 14, 2020
19d68cb
Rearranged code to follow flow of function calls
nandac Nov 14, 2020
cca853b
Fixing indentation errors
nandac Nov 14, 2020
4f32e91
Used locally downloaded citation style file for tests
nandac Nov 16, 2020
785e0e7
Reverted tests back to use remote CSL file
nandac Nov 16, 2020
1e6c7a1
Updated documentation to add information about citation support
nandac Nov 17, 2020
ed1f6f9
Fixed wording and mispellings in README
nandac Nov 17, 2020
4aa957f
Added abilities to parse FORMATTED_FIELDS as markdown and calculate r…
nandac Nov 20, 2020
86e999f
Made methods private, fixed pylint errors and fixed isort import issues
nandac Nov 21, 2020
f269031
Fixed failing tests
nandac Nov 21, 2020
bc80b13
Checking diff of black
nandac Nov 21, 2020
2348d02
Fixed formatting issue reported by black on GitHub
nandac Nov 21, 2020
dc6aeb6
Checking diff again for flake8-black issues
nandac Nov 21, 2020
f4b7875
Setting max-line-length to 79 for flake8
nandac Nov 21, 2020
b542ec3
Setting max-line-length to 79 for flake8-black
nandac Nov 21, 2020
5a958a9
Setting max-line-length to 79
nandac Nov 21, 2020
ebb99e5
Fixed line length issue on pandoc_reader.py
nandac Nov 21, 2020
e2e0b0e
Ignoring BLK100 error
nandac Nov 21, 2020
b3d7b88
Added line length setting for black in pyproject.toml
nandac Nov 21, 2020
e4f4591
Updated README to add informatiob about retrieving the reading time f…
nandac Nov 21, 2020
631b3fd
Added tests for reading time and separated out summary tests
nandac Nov 24, 2020
a8a87b0
Updated reading time documentation and corrected wording
nandac Nov 24, 2020
e4876ea
Fixed formatting of dependency list and fixed number three to four
nandac Nov 24, 2020
c58c517
Changed value of WORDS_PER_MINUTE_READ_TIME to READING_SPEED and upda…
nandac Nov 24, 2020
ee1c7f3
Fixed formatting issues
nandac Nov 24, 2020
19311ed
README tweaks to wording
nandac Nov 24, 2020
930f99c
README tweaks
nandac Nov 24, 2020
a3823a6
Updated all configuration for line length to 79 characters to be inli…
nandac Nov 24, 2020
59c3807
README tweaks
nandac Nov 25, 2020
27c035f
Pushing changes for known issues
nandac Nov 25, 2020
e746361
Moved known issue to citations section
nandac Nov 25, 2020
7566018
Updated reading time section
nandac Nov 25, 2020
68f4972
Changed known issues citation section
nandac Nov 25, 2020
64694bf
Added comma
nandac Nov 25, 2020
4458ef1
Added instructions to install markdown-word-count
nandac Nov 25, 2020
4ba7a1d
Several fixes to documentation
nandac Nov 25, 2020
e7feb82
Added some more changes to README and updated requirements.txt
nandac Nov 25, 2020
d4871a6
More README tweaks and added markdown-word-count as dependency
nandac Nov 25, 2020
83d5693
Replaced Pandoc Lua filter word counting with Python package for fast…
nandac Nov 25, 2020
7176aa4
Updated tests to get greater code coverage
nandac Nov 25, 2020
718b1dc
Removed extra blank lines in test content file
nandac Nov 25, 2020
d7bfe00
Renamed directories for content and default files
nandac Nov 25, 2020
da10e93
Fixed black formatting issues
nandac Nov 25, 2020
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
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
max_line_length = 79

[*.yml]
indent_size = 2
107 changes: 107 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: build

on: [push, pull_request]

env:
PYTEST_ADDOPTS: "--color=yes"

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Pip cache
uses: actions/cache@v2
id: pip-cache
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('**/pyproject.toml') }}
- name: Upgrade Pip
run: python -m pip install -U pip
- name: Install Poetry
run: python -m pip install poetry
- name: Set up Poetry cache
uses: actions/cache@v2
id: poetry-cache
with:
path: ~/.cache/pypoetry/virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry run pip install -U pip
poetry install
- name: Install pandoc
run: |
wget https://github.com/jgm/pandoc/releases/download/2.11.0.2/pandoc-2.11.0.2-1-amd64.deb
sudo dpkg -i pandoc-2.11.0.2-1-amd64.deb
- name: Run tests
run: poetry run invoke tests


lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set Poetry cache
uses: actions/cache@v2
id: poetry-cache
with:
path: ~/.cache/pypoetry/virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
- name: Upgrade Pip
run: python -m pip install -U pip
- name: Install Poetry
run: python -m pip install poetry
- name: Install dependencies
run: |
poetry run pip install -U pip
poetry install
- name: Run linters
run: poetry run invoke lint


deploy:
name: Deploy
needs: [test, lint]
runs-on: ubuntu-latest
if: ${{ github.ref=='refs/heads/main' && github.event_name!='pull_request' }}

steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Check release
id: check_release
run: |
python -m pip install pip --upgrade
python -m pip install poetry githubrelease autopub
echo "##[set-output name=release;]$(autopub check)"
- name: Publish
if: ${{ steps.check_release.outputs.release=='' }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
git remote set-url origin https://$GITHUB_TOKEN@github.com/${{ github.repository }}
autopub prepare
poetry build
autopub commit
autopub githubrelease
poetry publish -u __token__ -p $PYPI_PASSWORD
58 changes: 55 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
*.pyc
.idea
*~
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
.DS_Store

# C extensions
*.so

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

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

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

# VSCode Project Settings
.vscode
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# See https://pre-commit.com/hooks.html for info on hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
args: [--max-line-length=88]
language_version: python3.7

- repo: https://github.com/timothycrosley/isort
rev: 5.4.2
hooks:
- id: isort
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Contributing
============

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][].

To start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.

[existing issues]: https://github.com/pelican-plugins/pandoc-reader/issues
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html
Loading