pax_global_header00006660000000000000000000000064152443224660014522gustar00rootroot0000000000000052 comment=65b67269dceb0b6758f865b1f1476b0c463e934a python-readme-renderer-46.0/000077500000000000000000000000001524432246600160335ustar00rootroot00000000000000python-readme-renderer-46.0/.devcontainer/000077500000000000000000000000001524432246600205725ustar00rootroot00000000000000python-readme-renderer-46.0/.devcontainer/Dockerfile000066400000000000000000000032541524432246600225700ustar00rootroot00000000000000FROM ghcr.io/astral-sh/uv:trixie-slim # uv writes to UV_PYTHON_INSTALL_DIR/.temp and UV_CACHE_DIR during install # operations, and the runtime user has to be able to write there too. We # can't chown to a fixed UID — devcontainer's `updateRemoteUserUID` remaps # vscode to the host user's UID at start — so the parent dirs get sticky-bit # world-write, the UID-agnostic version of /tmp. # # /opt locations are chosen because: # - UV_TOOL_DIR: the uv image defaults to /root/.local/share/uv/tools, # which is unreadable to non-root users (/root is mode 700). # - UV_CACHE_DIR: lives somewhere devcontainer.json can persist via a # named Docker volume across rebuilds. ENV UV_PYTHON_INSTALL_DIR=/opt/python \ UV_TOOL_DIR=/opt/uv/tools \ UV_CACHE_DIR=/opt/uv/cache # Pre-install the CPython interpreters the tox matrix uses, plus tox # itself (with tox-uv for fast env creation). --default makes 3.14 the # system `python` / `python3`. # # PyPy is intentionally omitted: nh3's Rust extension has no prebuilt # PyPy wheel for aarch64 and source builds fail. CI still tests PyPy # on x86_64 where wheels exist. ARG PYTHON_VERSIONS="3.10 3.11 3.12 3.13 3.14" RUN uv python install --default 3.14 \ && uv python install ${PYTHON_VERSIONS} \ && uv tool install tox --with tox-uv \ # The build populated /opt/python/.temp and /opt/uv/cache as root. # Clear both: uv recreates .temp at runtime under the new perms, and # an empty cache lets the named volume initialize cleanly on first # mount (otherwise root-owned wheels get copied into it). && rm -rf /opt/python/.temp /opt/uv/cache \ && mkdir -p /opt/uv/cache \ && chmod 1777 /opt/python /opt/uv/cache python-readme-renderer-46.0/.devcontainer/devcontainer-lock.json000066400000000000000000000005251524432246600250760ustar00rootroot00000000000000{ "features": { "ghcr.io/devcontainers/features/common-utils:2": { "version": "2.5.9", "resolved": "ghcr.io/devcontainers/features/common-utils@sha256:cb0c4d3c276f157eed17935747e364178d75fee17f55c4e129966f64633deb3a", "integrity": "sha256:cb0c4d3c276f157eed17935747e364178d75fee17f55c4e129966f64633deb3a" } } } python-readme-renderer-46.0/.devcontainer/devcontainer.json000066400000000000000000000023121524432246600241440ustar00rootroot00000000000000{ "name": "readme_renderer", "build": { "dockerfile": "Dockerfile" }, "features": { "ghcr.io/devcontainers/features/common-utils:2": {} }, "mounts": [ "source=readme-renderer-uv-cache,target=/opt/uv/cache,type=volume" ], "remoteEnv": { "PATH": "/home/vscode/.local/bin:${containerEnv:PATH}" }, "remoteUser": "vscode", "postCreateCommand": "bash .devcontainer/post-create.sh", "customizations": { "vscode": { "extensions": [ "EditorConfig.EditorConfig", "ms-python.python", "ms-python.mypy-type-checker", "tamasfe.even-better-toml" ], "settings": { "python.defaultInterpreterPath": "${containerWorkspaceFolder}/.venv/bin/python", "python.terminal.activateEnvInCurrentTerminal": true, "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, "python.testing.pytestArgs": ["tests"], "python.analysis.typeCheckingMode": "strict", "python.analysis.diagnosticMode": "workspace" } } } } python-readme-renderer-46.0/.devcontainer/post-create.sh000066400000000000000000000005241524432246600233550ustar00rootroot00000000000000#!/usr/bin/env bash set -e # Local dev venv for IDE completion, running the package, etc. # tox + tox-uv are pre-installed in the image. uv venv --clear # Mirror tox.ini's [testenv] deps so the IDE's Test Explorer and # `Debug current pytest file` launch config can import pytest. uv pip install -e ".[md]" pytest pytest-cov pytest-icdiff python-readme-renderer-46.0/.github/000077500000000000000000000000001524432246600173735ustar00rootroot00000000000000python-readme-renderer-46.0/.github/CONTRIBUTING.md000066400000000000000000000023021524432246600216210ustar00rootroot00000000000000# Contributing Thanks for considering a contribution. Bug reports, fixes, and additions are all welcome. ## Development setup ### Devcontainer (recommended) This repo ships a [devcontainer](https://containers.dev/) config in `.devcontainer/`. Open the project in any tool that understands the spec — VS Code's Dev Containers extension, GitHub Codespaces, etc. — and you get a container with [`uv`](https://docs.astral.sh/uv/), `tox` (with `tox-uv`), and CPython 3.10–3.14 already installed. GitHub Codespaces availability depends on your account or org's billing. ### Manual If you'd rather set things up yourself: 1. Fork and clone the repo. 1. Install whichever Python versions you want to test against. 1. Install `tox`. Depending on your platform you may need extra build tools — `nh3` and `comrak` are Rust extensions and normally install from prebuilt wheels, but source builds need a Rust toolchain. ## Running tests `tox -l` lists the available environments. Run one with `tox -e py313` (or whatever), or `tox` alone to run them all. Parallel run across all CPUs: ``` tox -p auto ``` See the [tox parallel mode docs](https://tox.wiki/en/latest/user_guide.html#parallel-mode) for details. python-readme-renderer-46.0/.github/dependabot.yml000066400000000000000000000013131524432246600222210ustar00rootroot00000000000000# To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: github-actions directory: / schedule: interval: "monthly" groups: actions: patterns: - "*" cooldown: default-days: 7 - package-ecosystem: pip directory: / schedule: interval: "monthly" groups: python: patterns: - "*" cooldown: default-days: 7 python-readme-renderer-46.0/.github/workflows/000077500000000000000000000000001524432246600214305ustar00rootroot00000000000000python-readme-renderer-46.0/.github/workflows/ci.yml000066400000000000000000000041651524432246600225540ustar00rootroot00000000000000name: CI on: push: branches: - main pull_request: permissions: {} jobs: test: name: Test - ${{ matrix.python-version }} runs-on: ubuntu-latest strategy: matrix: python-version: - "pypy-3.11" - "3.10" - "3.11" - "3.12" - "3.13" - "3.14" steps: - name: Check out repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} check-latest: true cache: 'pip' - name: Install dependencies run: python -m pip install tox - name: Run tests run: | python -m tox -e py python -m tox -e noextra lint: name: Lint runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" check-latest: true cache: 'pip' - name: Install dependencies run: python -m pip install tox - name: Run linting run: python -m tox -e pep8 -e ruff - name: Run mypy run: python -m tox -e mypy packaging: name: Packaging runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" check-latest: true cache: 'pip' - name: Install dependencies run: python -m pip install tox - name: Test packaging run: python -m tox -e packaging python-readme-renderer-46.0/.github/workflows/release.yml000066400000000000000000000024031524432246600235720ustar00rootroot00000000000000name: Release on: release: types: [published] permissions: {} jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false ref: ${{ github.event.release.tag_name }} - name: Set up Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" check-latest: true - name: Install build dependencies run: pip install -U setuptools wheel build - name: Build run: python -m build . - name: Upload distribution artifacts uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: dist path: dist/ publish: needs: build runs-on: ubuntu-latest permissions: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - name: Download distribution artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: dist path: dist/ - name: Publish uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1 python-readme-renderer-46.0/.github/workflows/zizmor.yml000066400000000000000000000011721524432246600235060ustar00rootroot00000000000000name: GitHub Actions Security Analysis with zizmor 🌈 on: push: branches: ["main"] pull_request: branches: ["**"] permissions: {} jobs: zizmor: name: Run zizmor 🌈 runs-on: ubuntu-latest permissions: security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files. steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Run zizmor 🌈 uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1 python-readme-renderer-46.0/.gitignore000066400000000000000000000003001524432246600200140ustar00rootroot00000000000000__pycache__/ _build/ build/ dist/ htmlcov/ .tox/ .venv/ .cache/ .coverage *.egg-info/ *.egg *.eggs *.py[co] .pytest_cache/ .python-version venv/ .venv/ .idea/ .vscode/* !.vscode/launch.json python-readme-renderer-46.0/.vscode/000077500000000000000000000000001524432246600173745ustar00rootroot00000000000000python-readme-renderer-46.0/.vscode/launch.json000066400000000000000000000011761524432246600215460ustar00rootroot00000000000000{ "version": "0.2.0", "configurations": [ { "name": "Render README.rst", "type": "debugpy", "request": "launch", "module": "readme_renderer", "args": ["${workspaceFolder}/README.rst"], "console": "integratedTerminal", "justMyCode": false }, { "name": "Debug current pytest file", "type": "debugpy", "request": "launch", "module": "pytest", "args": ["${file}", "-v"], "console": "integratedTerminal", "justMyCode": false } ] } python-readme-renderer-46.0/CHANGES.rst000066400000000000000000000177371524432246600176540ustar00rootroot00000000000000Changes ======= 46.0 (2026-08-28) ----------------- * Render Markdown GFM alerts as semantic HTML admonitions (#374, #379) * Support GitHub emoji shortcodes in Markdown (#374) * Don't drop reStructuredText's top-level heading, and render headings at their literal levels starting at ``

``, consistent with Markdown (#377) * Require ``comrak`` 0.0.13 and higher for the ``md`` extra (#379) * Handle expected warnings in the test suite (#373) * Fix the 45.0 changelog date (#372) * Update workflows (#376, #381) 45.0 (2026-06-09) ----------------- * Replace ``cmarkgfm`` with ``comrak`` (#340) * Support footnotes in Markdown (#324) * Support inline link anchors (#351) * Allow ``class`` attribute on ``
`` tags (#365)

* Advertise support for Python 3.13 (#319), Python 3.14 (#333), pypy 3.11 (#334)
* Remove support for Python 3.9, pypy 3.9, 3.10 (#342)
* Remove `python3` alias from Pygments (#320)
* Fix test suite for Pygments update (#325)
* Fix mypy annotations (#328)
* Fix test failure with docutils 0.22 (#332)
* Fix package metadata (#327), (#337), (#356)
* Fix ignored allowlists on ``clean()`` (#368)
* Don't abort reStructuredText rendering when a ``:scale:`` image can't be sized (#359)
* Disable active input controls in rendered output (#370)
* Remove executable bit from tests (#329)
* Update Dependabot config (#338, #358), update workflows (#343), prevent dual run (#344)
* CI: security updates (#354)
* Split apart build and release in CI (#363)
* Speed up test execution (#349)
* Fix documentation typos and formatting (#352)
* Replace Gitpod with devcontainer (#326)
* Convert package data config from exclude to include (#364)
* Apply ruff/pyupgrade rules (UP) (#330)
* Apply ruff (RUF) and tryceratops (TRY) rules (#336)
* Run ruff in addition to flake8 during CI (#355)

44.0 (2024-07-08)
-----------------

* Drop support for Python 3.8 (#315)
* Require docutils 0.21.2 and higher (#315)
* Remove HTML5 ```` tag from the list of allowed HTML tags (#315)
* Test all supported CPython and PyPy versions in CI (#315)
* Resolve Node 16 deprecation warnings in CI (#309)
* Lint specific directories (#312)
* Build a wheel once for all tox test environments (#308)
* Lazy open output files, and always close them (#314)
* Gitpod: Migrate to the Even Better TOML extension (#306)
* check-manifest: Remove a now-default ``.gitpod.yml`` exclusion (#307)

43.0 (2024-02-26)
-----------------

* Allow HTML5 ``picture`` tag through cleaner (#299)
* Test against Python 3.12 (#300)

42.0 (2023-09-07)
-----------------

* Migrate from ``bleach`` to ``nh3`` (#295)
* Migrate from ``setup.py`` to ``pyproject.toml``

41.0 (2023-08-18)
-----------------

* Allow HTML5 ``figcaption`` tag through cleaner (#291)
* Test ``README.rst`` from this project (#288)

40.0 (2023-06-16)
-----------------

* Add CLI option to render package README. (#271)
* Adapt tests to pygments 2.14.0 (#272)
* Update release process to use Trusted Publishing (#276)
* Replace usage of deprecated ``pkg_resources`` with ``importlib.metadata`` (#281)
* Drop support for Python 3.7 (#282), Test against Python 3.11 (#280)

37.3 (2022-10-31)
-----------------

* Allow HTML5 ``figure`` tag through cleaner (#265)

37.2 (2022-09-24)
-----------------

* Allow HTML5 ``s`` tag through cleaner (#261)

37.1 (2022-09-03)
-----------------

* Allow HTML5 ``nav`` tag through cleaner (#259)

37.0 (2022-08-21)
-----------------

* Remove command line example from docs (#197)
* Multiple pyproject.toml fixes (#251)
* Confirm handling multiple inline strong (#252)
* Convert RST output to HTML5 (#253)
* Add Typing to classifiers (#254)
* Development tweaks - coverage reporting, actions updates (#255)
* Add test confirming behavior with unknown lexers (#256)

36.0 (2022-08-06)
-----------------

* Enable gitpod development (#238)
* Allow rst admonitions to render (#242)
* Add badges to README (#243)
* Update codebase for modern Python (#244)
* Fix table cell spans (#245)
* Allow ``math`` directive in rst (#246)
* Preserve ``lang`` attribute in ``pre`` (#247)

35.0 (2022-04-19)
-----------------

* Add py.typed to the built wheel (#228)
* Use isolated build for tox (#229)
* Fix renderer ignore (#230)
* Remove legacy check command and distutils (#233)
* Emit a warning when no content is rendered (#231)
* Drop support for Python 3.6 (#236)
* Update html attribute order in tests (#235)

34.0 (2022-03-11)
-----------------

* Add static types (#225)

33.0 (2022-03-05)
-----------------

* Support cmarkgfm>=0.8.0 (#224)

33.0 (2022-02-05)
-----------------

* Support cmarkgfm>=0.8.0 (#224)
* Support Python 3.10

32.0 (2021-12-13)
-----------------

* Allow start attribute in ordered lists (#216)
* No limit rendering RST one column field names (#219)

31.0 (2021-12-09)
-----------------

* Render disabled checkboxes from Markdown (#217)

30.0 (2021-09-30)
-----------------

* support cmarkgfm>=0.6.0 (#209)

29.0 (2021-02-22)
-----------------

* Support cmarkgfm>=0.5.0 (#180)
* Drop support for Python 2 and 3.5 (#188)

28.0 (2020-10-20)
-----------------

* Support Python 3.9

27.0 (2020-10-09)
-----------------

* Add support for align attribute rendering Markdown headers (#173)

26.0 (2020-04-22)
-----------------

* Fix regression with image width/height attributes (#164)


25.0 (2020-03-14)
-----------------

* Support Python 3.7 and 3.8
* Drop support for Python 3.4
* Require Pygments>=2.5.1


24.0 (2018-10-27)
-----------------

* Remove dependency on ``future``. (#134)


23.0 (2018-10-22)
-----------------

* Breaking change: Move the cmarkgfm dependency into an extra (#130). Users
  that want to render Markdown will need to install readme_render[md] instead.


22.0 (2018-09-17)
-----------------

* Unify handling of SVG and other images in RST. (#113)
* Support width and alignment of images in RST (#114)


21.0 (2018-05-28)
-----------------

* Allow . (#105)
* Add specific tests for the raw directive. (#103)
* Include docinfo when rendering rst. (#99)
* Make Python 3 the default lexer for highlighting Python code in Markdown (#97)
* Allow align attribute on 

tags (#98) 20.0 (2018-04-13) ----------------- * Reformat docutils messages into more human-friendly output. (#92) * Fix incorrect escaping of html entities in pre tags when using markdown. (#89) * Allow width, height, alt, and align attributes on img tags. (#91) * Fix check to not report success when there is invalid RST. (#90) 19.0 (2018-04-10) ----------------- * Allow details and summary tags. (#77) * Add .pytest_cache to .gitignore. (#85) * Warn about Markdown content type when checking RST. (#83) * Update pep8 tox env to use py3.6. (#84) * Add Pygments-based syntax highlighting for Markdown. (#82) * Update docs about check to talk about Markdown. (#80) 18.1 (2018-04-01) ----------------- * Change Github-flavored Markdown identifier from ``gfm`` to ``GFM``. 18.0 (2018-03-30) ----------------- * Add support for GitHub-flavored Markdown. (#67) * Switch to cmarkgfm completely for rendering Markdown. (#68) * Warn about missing long description. (#69) * Make Github-Flavored Markdown the default variant (#73) 17.4 (2018-03-16) ----------------- * All renderers now accept arbitrary ``kwargs`` for future-proofing. 17.3 (2018-03-08) ----------------- * Gracefully handle new exceptions from bleach. 17.2 (2017-03-11) ----------------- * Fix an issue cleaning plaintext values. 17.1 (2017-03-09) ----------------- * Fix an issue attempting to clean data that had ```` tags without a href. 17.0 (2017-03-08) ----------------- * Fix issue with bleach >= 2.0. 16.0 (2016-12-09) ----------------- * Fix issue with docutils >= 0.13.1. 0.7.0 (2016-01-04) ------------------ * Renamed to ``readme_renderer``: https://github.com/pypa/readme_renderer to work around an name overlap with ``README`` files shipped in Python's default site-packages directory on certain case-insensitive file systems. * Added `PyPA Code of Conduct`_. * Allow and tags when cleaning rST HTML output. * Dropped support for Python 2.6. .. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/ python-readme-renderer-46.0/LICENSE000066400000000000000000000227361524432246600170520ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. python-readme-renderer-46.0/MANIFEST.in000066400000000000000000000003561524432246600175750ustar00rootroot00000000000000include LICENSE README.rst CHANGES.rst include tox.ini include readme_renderer/py.typed recursive-include tests *.html recursive-include tests *.py recursive-include tests *.rst recursive-include tests *.txt recursive-include tests *.md python-readme-renderer-46.0/README.rst000066400000000000000000000027331524432246600175270ustar00rootroot00000000000000Readme Renderer ================ .. image:: https://badge.fury.io/py/readme-renderer.svg :target: https://badge.fury.io/py/readme-renderer .. image:: https://github.com/pypa/readme_renderer/actions/workflows/ci.yml/badge.svg :target: https://github.com/pypa/readme_renderer/actions/workflows/ci.yml Readme Renderer is a library that will safely render arbitrary ``README`` files into HTML. It is designed to be used in Warehouse_ to render the ``long_description`` for packages. It can handle Markdown, reStructuredText (``.rst``), and plain text. .. _Warehouse: https://github.com/pypa/warehouse Check Description Locally ------------------------- To locally check whether your long descriptions will render on PyPI, first build your distributions, and then use the |twine check|_ command. Code of Conduct --------------- Everyone interacting in the readme_renderer project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_. Contributing ------------ Contributions are welcome. See `CONTRIBUTING.md`_ for setup and testing. .. |twine check| replace:: ``twine check`` .. _twine check: https://packaging.python.org/guides/making-a-pypi-friendly-readme#validating-restructuredtext-markup .. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md .. _CONTRIBUTING.md: https://github.com/pypa/readme_renderer/blob/main/.github/CONTRIBUTING.md Copyright © 2014, The Python Packaging Authority. python-readme-renderer-46.0/pyproject.toml000066400000000000000000000041431524432246600207510ustar00rootroot00000000000000[project] name = "readme_renderer" version = "46.0" description = "readme_renderer is a library for rendering readme descriptions for Warehouse" authors = [ {name = "The Python Packaging Authority", email = "admin@mail.pypi.org"} ] readme = "README.rst" license = "Apache-2.0" license-files = ["LICENSE"] dependencies = [ "nh3>=0.2.14", "docutils>=0.21.2", "Pygments>=2.5.1", ] classifiers = [ "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Operating System :: POSIX :: BSD", "Operating System :: POSIX :: Linux", "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Typing :: Typed" ] requires-python = ">=3.10" [project.optional-dependencies] md = ["comrak>=0.0.13"] [tool.setuptools] include-package-data = true [tool.setuptools.packages.find] include = ["readme_renderer*"] [project.urls] Homepage = "https://github.com/pypa/readme_renderer" [build-system] requires = ["setuptools>=77.0.3"] build-backend = "setuptools.build_meta" [tool.check-manifest] ignore = [ ".devcontainer/*", ".vscode/*", ] [tool.ruff.lint] extend-select = [ "B", "C4", "FLY", "FURB", "ISC", "N", "PERF", "PGH", "PIE", "PYI", "RUF", "SIM", "UP", "W", ] ignore = [ "B028", # No explicit `stacklevel` keyword argument found ] [tool.coverage.run] branch = true source = ["readme_renderer"] [tool.mypy] strict = true warn_unused_configs = true show_error_codes = true enable_error_code = [ "ignore-without-code" ] [[tool.mypy.overrides]] # These modules do not yet have types available. module = [ "comrak.*" ] ignore_missing_imports = true python-readme-renderer-46.0/readme_renderer/000077500000000000000000000000001524432246600211565ustar00rootroot00000000000000python-readme-renderer-46.0/readme_renderer/__init__.py000066400000000000000000000010751524432246600232720ustar00rootroot00000000000000# Copyright 2014 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. python-readme-renderer-46.0/readme_renderer/__main__.py000066400000000000000000000050411524432246600232500ustar00rootroot00000000000000import argparse import pathlib import sys from importlib.metadata import metadata from readme_renderer.markdown import render as render_md from readme_renderer.rst import render as render_rst from readme_renderer.txt import render as render_txt def main(cli_args: list[str] | None = None) -> None: parser = argparse.ArgumentParser( description="Renders a .md, .rst, or .txt README to HTML", ) parser.add_argument("-p", "--package", help="Get README from package metadata", action="store_true") parser.add_argument("-f", "--format", choices=["md", "rst", "txt"], help="README format (inferred from input file name or package)") parser.add_argument('input', help="Input README file or package name") parser.add_argument('-o', '--output', help="Output file (default: stdout)", default='-') args = parser.parse_args(cli_args) content_format = args.format if args.package: message = metadata(args.input) source = message.get_payload() # type: ignore[attr-defined] # noqa: E501,RUF100 https://peps.python.org/pep-0566/ # Infer the format of the description from package metadata. if not content_format: content_type = message.get("Description-Content-Type", "text/x-rst") if content_type == "text/x-rst": content_format = "rst" elif content_type == "text/markdown": content_format = "md" elif content_type == "text/plain": content_format = "txt" else: raise ValueError(f"invalid content type {content_type} for package " "`long_description`") else: filename = pathlib.Path(args.input) content_format = content_format or filename.suffix.lstrip(".") with filename.open() as fp: source = fp.read() if content_format == "md": rendered = render_md(source, stream=sys.stderr) elif content_format == "rst": rendered = render_rst(source, stream=sys.stderr) elif content_format == "txt": rendered = render_txt(source, stream=sys.stderr) else: raise ValueError(f"invalid README format: {content_format} (expected `md`, " "`rst`, or `txt`)") if rendered is None: sys.exit(1) if args.output == "-": print(rendered, file=sys.stdout) else: with open(args.output, "w") as fp: print(rendered, file=fp) if __name__ == '__main__': main() python-readme-renderer-46.0/readme_renderer/clean.py000066400000000000000000000046561524432246600226250ustar00rootroot00000000000000# Copyright 2014 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import nh3 ALLOWED_TAGS = { # Bleach Defaults "a", "abbr", "acronym", "b", "blockquote", "code", "em", "i", "li", "ol", "strong", "ul", # Custom Additions "br", "caption", "cite", "col", "colgroup", "dd", "del", "details", "div", "dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "img", "p", "pre", "span", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead", "tr", "tt", "kbd", "var", "input", "section", "aside", "nav", "figure", "figcaption", "picture", } ALLOWED_ATTRIBUTES = { # Bleach Defaults "a": {"href", "title"}, "abbr": {"title"}, "acronym": {"title"}, # Custom Additions "*": {"id"}, "hr": {"class"}, "img": {"src", "width", "height", "alt", "align", "class"}, "span": {"class"}, "th": {"align", "class"}, "td": {"align", "colspan", "rowspan"}, "div": {"align", "class"}, "h1": {"align"}, "h2": {"align"}, "h3": {"align"}, "h4": {"align"}, "h5": {"align"}, "h6": {"align"}, "code": {"class"}, "p": {"align", "class"}, "pre": {"class", "lang"}, "ol": {"start"}, "input": {"type", "checked", "disabled"}, "aside": {"class"}, "dd": {"class"}, "dl": {"class"}, "dt": {"class"}, "ul": {"class"}, "nav": {"class"}, "figure": {"class"}, } def clean( html: str, tags: set[str] | None = None, attributes: dict[str, set[str]] | None = None ) -> str | None: if tags is None: tags = ALLOWED_TAGS if attributes is None: attributes = ALLOWED_ATTRIBUTES try: cleaned = nh3.clean( html, tags=tags, attributes=attributes, link_rel="nofollow", url_schemes={"http", "https", "mailto"}, set_tag_attribute_values={"input": {"disabled": ""}}, ) except ValueError: return None return cleaned python-readme-renderer-46.0/readme_renderer/markdown.py000066400000000000000000000125441524432246600233600ustar00rootroot00000000000000# Copyright 2014 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import re import warnings from collections.abc import Callable from html import unescape from re import Match from typing import Any import pygments import pygments.formatters import pygments.lexers from .clean import clean _EXTRA_WARNING = ( "Markdown renderers are not available. " "Install 'readme_renderer[md]' to enable Markdown rendering." ) # Prefix for header IDs to avoid conflicts with page elements. # Must match the value passed to comrak's header_id_prefix option. _HEADER_ID_PREFIX = "user-content-" try: import comrak gfm_extension_options = comrak.ExtensionOptions() gfm_extension_options.alerts = True gfm_extension_options.autolink = True gfm_extension_options.footnotes = True gfm_extension_options.header_id_prefix = _HEADER_ID_PREFIX gfm_extension_options.shortcodes = True gfm_extension_options.strikethrough = True gfm_extension_options.table = True gfm_extension_options.tagfilter = True gfm_extension_options.tasklist = True common_render_options = comrak.RenderOptions() common_render_options.unsafe_ = True # handled by nh3 common_render_options.alert_style = comrak.AlertStyle.Semantic variants: dict[str, Callable[[str], str]] = { "GFM": lambda raw: comrak.render_markdown( raw, extension_options=gfm_extension_options, render_options=common_render_options, ), "CommonMark": lambda raw: comrak.render_markdown( raw, render_options=common_render_options, ), } except ImportError: warnings.warn(_EXTRA_WARNING) variants = {} def render( raw: str, variant: str = "GFM", **kwargs: Any ) -> str | None: if not variants: warnings.warn(_EXTRA_WARNING) return None renderer = variants.get(variant) if not renderer: return None rendered = renderer(raw) if not rendered: return None # GFM uses header_id_prefix which prefixes generated IDs. We need to also # prefix relative links so they correctly point to those IDs. if variant == "GFM": rendered = _prefix_relative_links(rendered, _HEADER_ID_PREFIX) highlighted = _highlight(rendered) cleaned = clean(highlighted) return cleaned def _highlight(html: str) -> str: """Syntax-highlights HTML-rendered Markdown. Plucks sections to highlight that conform to the GitHub fenced code info string as defined at https://github.github.com/gfm/#info-string. Args: html (str): The rendered HTML. Returns: str: The HTML with Pygments syntax highlighting applied to all code blocks. """ formatter = pygments.formatters.HtmlFormatter(nowrap=True) code_expr = re.compile( # cmarkgfm<0.6.0:

print('hello')
# cmarkgfm>=0.6.0:
print('hello')
r'(
(?P[^"]+?)">'
        '(?(in_code)|)(?P.+?)'
        r'
', re.DOTALL) def replacer(match: Match[Any]) -> str: try: lang = match.group('lang') lexer = pygments.lexers.get_lexer_by_name(lang) except ValueError: lexer = pygments.lexers.TextLexer() code = match.group('code') # Decode html entities in the code. cmark tries to be helpful and # translate '"' to '"', but it confuses pygments. Pygments will # escape any html entities when re-writing the code, and we run # everything through bleach after. code = unescape(code) highlighted = pygments.highlight(code, lexer, formatter) return f'
{highlighted}
' result = code_expr.sub(replacer, html) return result def _prefix_relative_links(html: str, prefix: str) -> str: """Add prefix to relative anchor links to match prefixed header IDs. When header_id_prefix is set in comrak, the generated id attributes get the prefix, but href attributes pointing to anchors do not. This function rewrites relative links (href="#...") to include the prefix so they correctly link to the prefixed header IDs. Note: Footnote links (fn-*, fnref-*) are excluded since comrak does not prefix footnote IDs with header_id_prefix. Args: html: The rendered HTML. prefix: The prefix to add to relative links. Returns: The HTML with prefixed relative anchor links. """ def replacer(match: Match[str]) -> str: anchor = match.group(1) # Don't prefix footnote links - comrak doesn't prefix footnote IDs if anchor.startswith(("fn-", "fnref-")): return match.group(0) return f'href="#{prefix}{anchor}"' return re.sub(r'href="#([^"]+)"', replacer, html) python-readme-renderer-46.0/readme_renderer/py.typed000066400000000000000000000000001524432246600226430ustar00rootroot00000000000000python-readme-renderer-46.0/readme_renderer/rst.py000066400000000000000000000120011524432246600223320ustar00rootroot00000000000000# Copyright 2014 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import io from typing import IO, Any, ClassVar from docutils.core import publish_parts from docutils.nodes import Element from docutils.utils import SystemMessage from docutils.writers.html5_polyglot import HTMLTranslator, Writer from .clean import clean class ReadMeHTMLTranslator(HTMLTranslator): # Overrides base class not to output `` tag for SVG images. object_image_types: ClassVar[dict[str, str]] = {} def emptytag( self, node: Element, tagname: str, suffix: str = "\n", **attributes: Any ) -> Any: """Override this to add back the width/height attributes.""" if tagname == "img": if "width" in node: attributes["width"] = node["width"] if "height" in node: attributes["height"] = node["height"] return super().emptytag( node, tagname, suffix, **attributes ) def read_size_with_PIL(self, node: Element) -> None: # noqa: N802 """ We disable ``file_insertion_enabled`` for security, which means docutils can't read images to compute ``:scale:`` dimensions and emits a WARNING/2 that our ``halt_level=2`` would turn fatal. Skip the probe so the image renders at natural size instead of aborting render. """ return SETTINGS = { # Cloaking email addresses provides a small amount of additional # privacy protection for email addresses inside of a chunk of ReST. "cloak_email_addresses": True, # Prevent a lone top level heading from being promoted to document # title (and thus dropped from the rendered output), and second # level headings from being promoted to top level. Keeps heading # levels literal, consistent with how Markdown renders headings. "doctitle_xform": False, # Prevent a lone subsection heading from being demoted to a # non-heading subtitle paragraph. See doctitle_xform above. "sectsubtitle_xform": False, # Render the top-level heading as

, consistent with Markdown. "initial_header_level": 1, # Prevent local files from being included into the rendered output. # This is a security concern because people can insert files # that are part of the system, such as /etc/passwd. "file_insertion_enabled": False, # Halt rendering and throw an exception if there was any errors or # warnings from docutils. "halt_level": 2, # Output math blocks as LaTeX that can be interpreted by MathJax for # a prettier display of Math formulas. # Pass a dummy path to suppress docutils warning and emit HTML. "math_output": "MathJax /dummy.js", # Disable raw html as enabling it is a security risk, we do not want # people to be able to include any old HTML in the final output. "raw_enabled": False, # Disable all system messages from being reported. "report_level": 5, # Use typographic quotes, and transform --, ---, and ... into their # typographic counterparts. "smart_quotes": True, # Strip all comments from the rendered output. "strip_comments": True, # Use the short form of syntax highlighting so that the generated # Pygments CSS can be used to style the output. "syntax_highlight": "short", # Maximum width (in characters) for one-column field names. # 0 means "no limit" "field_name_limit": 0, # Add self-referential links to section headings, allowing users to # easily link to specific sections. "section_self_link": True, # Prefix generated IDs and anchors with a string "id_prefix": "user-content-" } def render( raw: str, stream: IO[str] | None = None, **kwargs: Any ) -> str | None: if stream is None: # Use a io.StringIO as the warning stream to prevent warnings from # being printed to sys.stderr. stream = io.StringIO() settings = SETTINGS.copy() settings["warning_stream"] = stream writer = Writer() writer.translator_class = ReadMeHTMLTranslator try: parts = publish_parts(raw, writer=writer, settings_overrides=settings) except SystemMessage: rendered = None else: rendered = parts.get("docinfo", "") + parts.get("fragment", "") if rendered: return clean(rendered) else: # If the warnings stream is empty, docutils had none, so add ours. if not stream.tell(): stream.write("No content rendered from RST source.") return None python-readme-renderer-46.0/readme_renderer/txt.py000066400000000000000000000014511524432246600223500ustar00rootroot00000000000000# Copyright 2015 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from html import escape as html_escape from typing import Any from .clean import clean def render(raw: str, **kwargs: Any) -> str | None: rendered = html_escape(raw).replace("\n", "
") return clean(rendered, tags={"br"}) python-readme-renderer-46.0/tests/000077500000000000000000000000001524432246600171755ustar00rootroot00000000000000python-readme-renderer-46.0/tests/__init__.py000066400000000000000000000000001524432246600212740ustar00rootroot00000000000000python-readme-renderer-46.0/tests/fixtures/000077500000000000000000000000001524432246600210465ustar00rootroot00000000000000python-readme-renderer-46.0/tests/fixtures/test_CommonMark_001.html000066400000000000000000000000151524432246600254120ustar00rootroot00000000000000

Hello

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_001.md000066400000000000000000000000061524432246600250460ustar00rootroot00000000000000Hello python-readme-renderer-46.0/tests/fixtures/test_CommonMark_002.html000066400000000000000000000000431524432246600254140ustar00rootroot00000000000000

http://mymalicioussite.com/

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_002.md000066400000000000000000000000341524432246600250500ustar00rootroot00000000000000http://mymalicioussite.com/ python-readme-renderer-46.0/tests/fixtures/test_CommonMark_003.html000066400000000000000000000002421524432246600254160ustar00rootroot00000000000000

Required packages

To run the PyPI software, you need Python 2.5+ and PostgreSQL

Quick development setup

Make sure you are sitting

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_003.md000066400000000000000000000002121524432246600250470ustar00rootroot00000000000000## Required packages To run the PyPI software, you need Python 2.5+ and PostgreSQL ## Quick development setup Make sure you are sitting python-readme-renderer-46.0/tests/fixtures/test_CommonMark_004.html000066400000000000000000000002421524432246600254170ustar00rootroot00000000000000

Required packages

To run the PyPI software, you need Python 2.5+ and PostgreSQL

Quick development setup

Make sure you are sitting

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_004.md000066400000000000000000000002411524432246600250520ustar00rootroot00000000000000

Required packages

To run the PyPI software, you need Python 2.5+ and PostgreSQL

Quick development setup

Make sure you are sitting

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_005.html000066400000000000000000000001131524432246600254150ustar00rootroot00000000000000

Click here

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_005.md000066400000000000000000000000651524432246600250570ustar00rootroot00000000000000Click here python-readme-renderer-46.0/tests/fixtures/test_CommonMark_006.html000066400000000000000000000000131524432246600254150ustar00rootroot00000000000000Click here python-readme-renderer-46.0/tests/fixtures/test_CommonMark_006.md000066400000000000000000000000751524432246600250610ustar00rootroot00000000000000python-readme-renderer-46.0/tests/fixtures/test_CommonMark_007.html000066400000000000000000000000511524432246600254200ustar00rootroot00000000000000

Something naughty this way comes

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_007.md000066400000000000000000000001101524432246600250500ustar00rootroot00000000000000Something naughty this way comes python-readme-renderer-46.0/tests/fixtures/test_CommonMark_008.html000066400000000000000000000032671524432246600254350ustar00rootroot00000000000000

Here is some Python code for a Dog:

class Dog(Animal):
    def __init__(self, name):
        self.name = name

    def make_sound(self):
        print('Ruff!')

dog = Dog('Fido')

and then here is some bash:

if [ "$1" = "--help" ]; then
    echo "OK"
fi

or click SurveyMonkey

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_008.md000066400000000000000000000005221524432246600250600ustar00rootroot00000000000000Here is some Python code for a `Dog`: ```python class Dog(Animal): def __init__(self, name): self.name = name def make_sound(self): print('Ruff!') dog = Dog('Fido') ``` and then here is some bash: ```bash if [ "$1" = "--help" ]; then echo "OK" fi ``` or click [SurveyMonkey](http://www.surveymonkey.com) python-readme-renderer-46.0/tests/fixtures/test_CommonMark_009.html000066400000000000000000000001761524432246600254320ustar00rootroot00000000000000

Normal text

Why am I getting an error during installation/when launching rtv?
python-readme-renderer-46.0/tests/fixtures/test_CommonMark_009.md000066400000000000000000000001701524432246600250600ustar00rootroot00000000000000Normal text
Why am I getting an error during installation/when launching rtv?
python-readme-renderer-46.0/tests/fixtures/test_CommonMark_smart_strong.html000066400000000000000000000001451524432246600276400ustar00rootroot00000000000000

Regular double underscore words.

Text with double__underscore__words.

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_smart_strong.md000066400000000000000000000001131524432246600272670ustar00rootroot00000000000000Regular __double underscore__ words. Text with double__underscore__words. python-readme-renderer-46.0/tests/fixtures/test_CommonMark_strong.html000066400000000000000000000002701524432246600264310ustar00rootroot00000000000000

sphinx: a password Store that Perfectly Hides from Itself (No Xaggeration)

python-readme-renderer-46.0/tests/fixtures/test_CommonMark_strong.md000066400000000000000000000001431524432246600260640ustar00rootroot00000000000000sphinx: a password **S**tore that **P**erfectly **H**ides from **I**tself (**N**o **X**aggeration) python-readme-renderer-46.0/tests/fixtures/test_CommonMark_style.html000066400000000000000000000000521524432246600262530ustar00rootroot00000000000000 python-readme-renderer-46.0/tests/fixtures/test_CommonMark_style.md000066400000000000000000000000521524432246600257070ustar00rootroot00000000000000 python-readme-renderer-46.0/tests/fixtures/test_GFM_001.html000066400000000000000000000001751524432246600237670ustar00rootroot00000000000000
foo bar
baz bim
python-readme-renderer-46.0/tests/fixtures/test_GFM_001.md000066400000000000000000000000521524432246600234150ustar00rootroot00000000000000| foo | bar | | --- | --- | | baz | bim | python-readme-renderer-46.0/tests/fixtures/test_GFM_002.html000066400000000000000000000002721524432246600237660ustar00rootroot00000000000000
abc defghi
bar baz
python-readme-renderer-46.0/tests/fixtures/test_GFM_002.md000066400000000000000000000000561524432246600234220ustar00rootroot00000000000000| abc | defghi | :-: | -----------: bar | baz python-readme-renderer-46.0/tests/fixtures/test_GFM_003.html000066400000000000000000000002401524432246600237620ustar00rootroot00000000000000
f|oo
b | az
b | im
python-readme-renderer-46.0/tests/fixtures/test_GFM_003.md000066400000000000000000000000641524432246600234220ustar00rootroot00000000000000| f\|oo | | ------ | | b `\|` az | | b **\|** im | python-readme-renderer-46.0/tests/fixtures/test_GFM_004.html000066400000000000000000000002431524432246600237660ustar00rootroot00000000000000
abc def
bar baz

bar

python-readme-renderer-46.0/tests/fixtures/test_GFM_004.md000066400000000000000000000000601524432246600234170ustar00rootroot00000000000000| abc | def | | --- | --- | | bar | baz | > bar python-readme-renderer-46.0/tests/fixtures/test_GFM_005.html000066400000000000000000000002521524432246600237670ustar00rootroot00000000000000
abc def
bar baz
bar

bar

python-readme-renderer-46.0/tests/fixtures/test_GFM_005.md000066400000000000000000000000631524432246600234230ustar00rootroot00000000000000| abc | def | | --- | --- | | bar | baz | bar bar python-readme-renderer-46.0/tests/fixtures/test_GFM_006.html000066400000000000000000000000451524432246600237700ustar00rootroot00000000000000

| abc | def | | --- | | bar |

python-readme-renderer-46.0/tests/fixtures/test_GFM_006.md000066400000000000000000000000361524432246600234240ustar00rootroot00000000000000| abc | def | | --- | | bar | python-readme-renderer-46.0/tests/fixtures/test_GFM_007.html000066400000000000000000000002371524432246600237740ustar00rootroot00000000000000
abc def
bar
bar baz
python-readme-renderer-46.0/tests/fixtures/test_GFM_007.md000066400000000000000000000000701524432246600234230ustar00rootroot00000000000000| abc | def | | --- | --- | | bar | | bar | baz | boo | python-readme-renderer-46.0/tests/fixtures/test_GFM_008.html000066400000000000000000000001071524432246600237710ustar00rootroot00000000000000
abc def
python-readme-renderer-46.0/tests/fixtures/test_GFM_008.md000066400000000000000000000000341524432246600234240ustar00rootroot00000000000000| abc | def | | --- | --- | python-readme-renderer-46.0/tests/fixtures/test_GFM_009.html000066400000000000000000000000431524432246600237710ustar00rootroot00000000000000

Hi Hello, world!

python-readme-renderer-46.0/tests/fixtures/test_GFM_009.md000066400000000000000000000000231524432246600234230ustar00rootroot00000000000000~Hi~ Hello, world! python-readme-renderer-46.0/tests/fixtures/test_GFM_010.html000066400000000000000000000000601524432246600237600ustar00rootroot00000000000000

This text~~~~ is ~~~~curious.

python-readme-renderer-46.0/tests/fixtures/test_GFM_010.md000066400000000000000000000000401524432246600234120ustar00rootroot00000000000000This ~text~~~~ is ~~~~curious~. python-readme-renderer-46.0/tests/fixtures/test_GFM_011.html000066400000000000000000000000541524432246600237640ustar00rootroot00000000000000

This ~~has a

new paragraph~~.

python-readme-renderer-46.0/tests/fixtures/test_GFM_011.md000066400000000000000000000000371524432246600234210ustar00rootroot00000000000000This ~~has a new paragraph~~. python-readme-renderer-46.0/tests/fixtures/test_GFM_012.html000066400000000000000000000001211524432246600237600ustar00rootroot00000000000000

www.commonmark.org

python-readme-renderer-46.0/tests/fixtures/test_GFM_012.md000066400000000000000000000000231524432246600234150ustar00rootroot00000000000000www.commonmark.org python-readme-renderer-46.0/tests/fixtures/test_GFM_013.html000066400000000000000000000001671524432246600237730ustar00rootroot00000000000000

Visit www.commonmark.org/help for more information.

python-readme-renderer-46.0/tests/fixtures/test_GFM_013.md000066400000000000000000000000641524432246600234230ustar00rootroot00000000000000Visit www.commonmark.org/help for more information. python-readme-renderer-46.0/tests/fixtures/test_GFM_014.html000066400000000000000000000002701524432246600237670ustar00rootroot00000000000000

Visit www.commonmark.org.

Visit www.commonmark.org/a.b.

python-readme-renderer-46.0/tests/fixtures/test_GFM_014.md000066400000000000000000000000711524432246600234220ustar00rootroot00000000000000Visit www.commonmark.org. Visit www.commonmark.org/a.b. python-readme-renderer-46.0/tests/fixtures/test_GFM_015.html000066400000000000000000000004001524432246600237630ustar00rootroot00000000000000

www.google.com/search?q=Markup+(business)

(www.google.com/search?q=Markup+(business))

python-readme-renderer-46.0/tests/fixtures/test_GFM_015.md000066400000000000000000000001271524432246600234250ustar00rootroot00000000000000www.google.com/search?q=Markup+(business) (www.google.com/search?q=Markup+(business)) python-readme-renderer-46.0/tests/fixtures/test_GFM_016.html000066400000000000000000000001711524432246600237710ustar00rootroot00000000000000

www.google.com/search?q=(business))+ok

python-readme-renderer-46.0/tests/fixtures/test_GFM_016.md000066400000000000000000000000471524432246600234270ustar00rootroot00000000000000www.google.com/search?q=(business))+ok python-readme-renderer-46.0/tests/fixtures/test_GFM_017.html000066400000000000000000000003761524432246600240010ustar00rootroot00000000000000

www.google.com/search?q=commonmark&hl=en

www.google.com/search?q=commonmark&hl;

python-readme-renderer-46.0/tests/fixtures/test_GFM_017.md000066400000000000000000000001211524432246600234210ustar00rootroot00000000000000www.google.com/search?q=commonmark&hl=en www.google.com/search?q=commonmark&hl; python-readme-renderer-46.0/tests/fixtures/test_GFM_018.html000066400000000000000000000001351524432246600237730ustar00rootroot00000000000000

www.commonmark.org/he<lp

python-readme-renderer-46.0/tests/fixtures/test_GFM_018.md000066400000000000000000000000311524432246600234220ustar00rootroot00000000000000www.commonmark.org/hehttp://commonmark.org

(Visit https://encrypted.google.com/search?q=Markup+(business))

Anonymous FTP is available at ftp://foo.bar.baz.

python-readme-renderer-46.0/tests/fixtures/test_GFM_019.md000066400000000000000000000002111524432246600234230ustar00rootroot00000000000000http://commonmark.org (Visit https://encrypted.google.com/search?q=Markup+(business)) Anonymous FTP is available at ftp://foo.bar.baz. python-readme-renderer-46.0/tests/fixtures/test_GFM_020.html000066400000000000000000000001031524432246600237570ustar00rootroot00000000000000

foo@bar.baz

python-readme-renderer-46.0/tests/fixtures/test_GFM_020.md000066400000000000000000000000141524432246600234140ustar00rootroot00000000000000foo@bar.baz python-readme-renderer-46.0/tests/fixtures/test_GFM_021.html000066400000000000000000000002051524432246600237630ustar00rootroot00000000000000

hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.

python-readme-renderer-46.0/tests/fixtures/test_GFM_021.md000066400000000000000000000001031524432246600234140ustar00rootroot00000000000000hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is. python-readme-renderer-46.0/tests/fixtures/test_GFM_022.html000066400000000000000000000002571524432246600237730ustar00rootroot00000000000000

a.b-c_d@a.b

a.b-c_d@a.b.

a.b-c_d@a.b-

a.b-c_d@a.b_

python-readme-renderer-46.0/tests/fixtures/test_GFM_022.md000066400000000000000000000000661524432246600234250ustar00rootroot00000000000000a.b-c_d@a.b a.b-c_d@a.b. a.b-c_d@a.b- a.b-c_d@a.b_ python-readme-renderer-46.0/tests/fixtures/test_GFM_023.html000066400000000000000000000002621524432246600237700ustar00rootroot00000000000000

<title> <style>

<xmp> is disallowed. <XMP> is also disallowed.
python-readme-renderer-46.0/tests/fixtures/test_GFM_023.md000066400000000000000000000001541524432246600234240ustar00rootroot00000000000000 <style> <em> <blockquote> <xmp> is disallowed. <XMP> is also disallowed. </blockquote> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_024.html����������������������������������������0000664�0000000�0000000�00000000702�15244322466�0023770�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ul> <li><input type="checkbox" disabled=""> Valid unchecked checkbox</li> <li><input type="checkbox" checked="" disabled=""> Valid checked checkbox</li> <li><input type="checkbox" disabled=""> Invalid enabled checkbox</li> <li> <input disabled=""> </li> <li> <input type="submit" disabled=""> </li> <li> <input disabled=""> </li> <li> <input type="checkbox" checked="" disabled=""> </li> <li> <input type="radio" checked="" disabled=""> </li> </ul> ��������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_024.md������������������������������������������0000664�0000000�0000000�00000000411�15244322466�0023421�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������- [ ] Valid unchecked checkbox - [x] Valid checked checkbox - <input type="checkbox"> Invalid enabled checkbox - <input onlick="alert('XSS')" /> - <input type="submit" /> - <input method="PUT" /> - <input type="checkbox" checked /> - <input type="radio" checked /> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_025.html����������������������������������������0000664�0000000�0000000�00000000164�15244322466�0023773�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<ol start="3"> <li>Foo</li> </ol> <p>Some text</p> <ol start="2"> <li> <p>Bar</p> </li> <li> <p>Baz</p> </li> </ol> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_025.md������������������������������������������0000664�0000000�0000000�00000000042�15244322466�0023422�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������3. Foo Some text 2. Bar 1. Baz ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_alerts.html�������������������������������������0000664�0000000�0000000�00000002143�15244322466�0024756�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<h1 id="user-content-github-alerts">GitHub Alerts<a href="#user-content-github-alerts" rel="nofollow"></a></h1> <p>Also known as callouts and admonitions.</p> <aside class="admonition note"> <p class="admonition-title">Note</p> <p>Useful information that users should know, even when skimming content.</p> </aside> <aside class="admonition tip"> <p class="admonition-title">Tip</p> <p>Helpful advice for doing things better or more easily.</p> </aside> <aside class="admonition important"> <p class="admonition-title">Important</p> <p>Key information users need to know to achieve their goal.</p> </aside> <aside class="admonition warning"> <p class="admonition-title">Warning</p> <p>Urgent info that needs immediate user attention to avoid problems.</p> </aside> <aside class="admonition caution"> <p class="admonition-title">Caution</p> <p>Advises about risks or negative outcomes of certain actions.</p> </aside> <p><a href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts" rel="nofollow">Source reference</a></p> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_alerts.md���������������������������������������0000664�0000000�0000000�00000001153�15244322466�0024412�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# GitHub Alerts Also known as callouts and admonitions. > [!NOTE] > Useful information that users should know, even when skimming content. > [!TIP] > Helpful advice for doing things better or more easily. > [!IMPORTANT] > Key information users need to know to achieve their goal. > [!WARNING] > Urgent info that needs immediate user attention to avoid problems. > [!CAUTION] > Advises about risks or negative outcomes of certain actions. [Source reference](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_doublequotes.html�������������������������������0000664�0000000�0000000�00000001032�15244322466�0026173�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is normal text.</p> <pre><code>This is code text. </code></pre> <pre lang="python"><span class="k">def</span><span class="w"> </span><span class="nf">this_is_python</span><span class="p">():</span> <span class="w"> </span><span class="sd">"""This is a docstring."""</span> <span class="k">pass</span> </pre> <pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span> <span class="w"> </span><span class="k">return</span> <span class="p">}</span> </pre> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_doublequotes.md���������������������������������0000664�0000000�0000000�00000000247�15244322466�0025636�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is normal text. ``` This is code text. ``` ```python def this_is_python(): """This is a docstring.""" pass ``` ```go func ThisIsGo(){ return } ``` ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_emoji.html��������������������������������������0000664�0000000�0000000�00000001103�15244322466�0024562�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<h1 id="user-content-github-emoji">GitHub Emoji<a href="#user-content-github-emoji" rel="nofollow"></a></h1> <p>Wow, 👍 I like this! 🎉 ✨</p> <p><code>:shipit:</code> and other custom GitHub emoji are not yet supported and will render as :shipit: <a href="https://github.com/rossmacarthur/emojis/issues/32" rel="nofollow">Track this issue</a> for updates.</p> <p><a href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#using-emojis" rel="nofollow">Source reference</a></p> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_emoji.md����������������������������������������0000664�0000000�0000000�00000000635�15244322466�0024227�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# GitHub Emoji Wow, :+1: I like this! :tada: :sparkles: `:shipit:` and other custom GitHub emoji are not yet supported and will render as :shipit: [Track this issue](https://github.com/rossmacarthur/emojis/issues/32) for updates. [Source reference](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#using-emojis) ���������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_footnotes.html����������������������������������0000664�0000000�0000000�00000000302�15244322466�0025477�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>a statement<sup><a href="#fn-1" id="fnref-1" rel="nofollow">1</a></sup></p> <section> <ol> <li id="fn-1"> <p>this is true <a href="#fnref-1" rel="nofollow">↩</a></p> </li> </ol> </section> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_footnotes.md������������������������������������0000664�0000000�0000000�00000000044�15244322466�0025136�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������a statement[^1] [^1]: this is true ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_headings.html�����������������������������������0000664�0000000�0000000�00000002104�15244322466�0025243�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<h1 id="user-content-heading-1">Heading 1<a href="#user-content-heading-1" rel="nofollow"></a></h1> <p>Some text</p> <h2 id="user-content-heading-2">Heading 2<a href="#user-content-heading-2" rel="nofollow"></a></h2> <p>Lorem ipsum dolor sit amet consectetur adipiscing elit.</p> <h3 id="user-content-heading-3">Heading 3<a href="#user-content-heading-3" rel="nofollow"></a></h3> <p>Lorem ipsum dolor sit amet consectetur adipiscing elit.</p> <h4 id="user-content-heading-4">Heading 4<a href="#user-content-heading-4" rel="nofollow"></a></h4> <p>Lorem ipsum dolor sit amet consectetur adipiscing elit.</p> <h5 id="user-content-heading-5">Heading 5<a href="#user-content-heading-5" rel="nofollow"></a></h5> <p>Lorem ipsum dolor sit amet consectetur adipiscing elit.</p> <h6 id="user-content-heading-6">Heading 6<a href="#user-content-heading-6" rel="nofollow"></a></h6> <p>Lorem ipsum dolor sit amet consectetur adipiscing elit.</p> <hr> <p>Relative links to <a href="#user-content-heading-2" rel="nofollow">Heading 2</a> and <a href="#user-content-heading-4" rel="nofollow">Heading 4</a></p> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_headings.md�������������������������������������0000664�0000000�0000000�00000000720�15244322466�0024701�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Heading 1 Some text ## Heading 2 Lorem ipsum dolor sit amet consectetur adipiscing elit. ### Heading 3 Lorem ipsum dolor sit amet consectetur adipiscing elit. #### Heading 4 Lorem ipsum dolor sit amet consectetur adipiscing elit. ##### Heading 5 Lorem ipsum dolor sit amet consectetur adipiscing elit. ###### Heading 6 Lorem ipsum dolor sit amet consectetur adipiscing elit. --- Relative links to [Heading 2](#heading-2) and [Heading 4](#heading-4) ������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_highlight.html����������������������������������0000664�0000000�0000000�00000000777�15244322466�0025446�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is normal text.</p> <pre><code>This is code text. </code></pre> <pre lang="python"><span class="k">def</span><span class="w"> </span><span class="nf">this_is_python</span><span class="p">():</span> <span class="k">pass</span> </pre> <pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span> <span class="w"> </span><span class="k">return</span> <span class="p">}</span> </pre> <pre lang="abc">An unknown code fence block </pre> �python-readme-renderer-46.0/tests/fixtures/test_GFM_highlight.md������������������������������������0000664�0000000�0000000�00000000260�15244322466�0025065�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is normal text. ``` This is code text. ``` ```python def this_is_python(): pass ``` ```go func ThisIsGo(){ return } ``` ```abc An unknown code fence block ``` ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_highlight_default_py.html�����������������������0000664�0000000�0000000�00000000535�15244322466�0027652�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<pre lang="python"><span class="k">async</span> <span class="k">def</span><span class="w"> </span><span class="nf">this_is_python</span><span class="p">():</span> <span class="k">pass</span> <span class="nb">print</span><span class="p">(</span><span class="k">await</span> <span class="n">this_is_python</span><span class="p">())</span> </pre> �������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_highlight_default_py.md�������������������������0000664�0000000�0000000�00000000122�15244322466�0027276�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������```python async def this_is_python(): pass print(await this_is_python()) ``` ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_img.html����������������������������������������0000664�0000000�0000000�00000000344�15244322466�0024241�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><img src="https://octodex.github.com/images/yaktocat.png" alt="Image of Yaktocat"></p> <p align="center"> <img src="https://octodex.github.com/images/yaktocat.png" width="20%" height="100px" alt="Image of Yaktocat"> </p> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_img.md������������������������������������������0000664�0000000�0000000�00000000320�15244322466�0023667�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png) <p align="center"> <img src="https://octodex.github.com/images/yaktocat.png" width="20%" height="100px" alt="Image of Yaktocat"> </p> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_malicious_pre.html������������������������������0000664�0000000�0000000�00000001216�15244322466�0026317�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>This is normal text.</p> <pre lang="python"><span class="k">def</span><span class="w"> </span><span class="nf">this_is_python</span><span class="p">():</span> <span class="w"> </span><span class="sd">"""This is a docstring."""</span> <span class="k">pass</span> <span class="o"><</span><span class="n">script</span> <span class="nb">type</span><span class="o">=</span><span class="s2">"text/javascript"</span><span class="o">></span><span class="n">alert</span><span class="p">(</span><span class="s1">'I am evil.'</span><span class="p">);</span><span class="o"></</span><span class="n">script</span><span class="o">></span> </pre> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_malicious_pre.md��������������������������������0000664�0000000�0000000�00000000237�15244322466�0025755�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is normal text. ```python def this_is_python(): """This is a docstring.""" pass <script type="text/javascript">alert('I am evil.');</script> ``` �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_picture.html������������������������������������0000664�0000000�0000000�00000000125�15244322466�0025135�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<picture> <img src="/media/cc0-images/painted-hand-298-332.jpg" alt=""> </picture> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_picture.md��������������������������������������0000664�0000000�0000000�00000000127�15244322466�0024573�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<picture> <img src="/media/cc0-images/painted-hand-298-332.jpg" alt="" /> </picture> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_style.html��������������������������������������0000664�0000000�0000000�00000000052�15244322466�0024621�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<img src="https://example.com/badge.png"> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_GFM_style.md����������������������������������������0000664�0000000�0000000�00000000052�15244322466�0024255�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<img src="https://example.com/badge.png"> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_003.html����������������������������������������0000664�0000000�0000000�00000000724�15244322466�0024170�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<section id="user-content-required-packages"> <h1>Required packages<a title="link to this section" href="#user-content-required-packages" rel="nofollow"></a></h1> <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p> </section> <section id="user-content-quick-development-setup"> <h1>Quick development setup<a title="link to this section" href="#user-content-quick-development-setup" rel="nofollow"></a></h1> <p>Make sure you are sitting</p> </section> ��������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_003.rst�����������������������������������������0000664�0000000�0000000�00000000260�15244322466�0024027�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Required packages ----------------- To run the PyPI software, you need Python 2.5+ and PostgreSQL Quick development setup ----------------------- Make sure you are sitting ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_004.html����������������������������������������0000664�0000000�0000000�00000000507�15244322466�0024170�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><div id=”required-packages”> <h2>Required packages</h2> <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p> </div> <div id=”quick-development-setup”> <h2>Quick development setup</h2> <p>Make sure you are sitting</p> </div></p> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_004.rst�����������������������������������������0000664�0000000�0000000�00000000360�15244322466�0024031�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<div id="required-packages"> <h2>Required packages</h2> <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p> </div> <div id="quick-development-setup"> <h2>Quick development setup</h2> <p>Make sure you are sitting</p> </div> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_005.html����������������������������������������0000664�0000000�0000000�00000000205�15244322466�0024164�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><a href=”<a href="http://mymalicioussite.com/" rel="nofollow">http://mymalicioussite.com/</a>”>Click here</a></p> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_005.rst�����������������������������������������0000664�0000000�0000000�00000000064�15244322466�0024033�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<a href="http://mymalicioussite.com/">Click here</a>����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_006.html����������������������������������������0000664�0000000�0000000�00000000216�15244322466�0024167�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p><iframe src=”<a href="http://mymalicioussite.com/" rel="nofollow">http://mymalicioussite.com/</a>”>Click here</iframe></p> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_006.rst�����������������������������������������0000664�0000000�0000000�00000000075�15244322466�0024036�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<iframe src="http://mymalicioussite.com/">Click here</iframe>�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_007.html����������������������������������������0000664�0000000�0000000�00000000124�15244322466�0024166�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Something naughty this way comes <script> alert("Hello"); </script> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_007.rst�����������������������������������������0000664�0000000�0000000�00000000110�15244322466�0024025�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Something naughty this way comes <script> alert("Hello"); </script> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_008.html����������������������������������������0000664�0000000�0000000�00000003755�15244322466�0024204�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Here is some Python code for a <span class="docutils literal">Dog</span>:</p> <pre class="code python literal-block"><code><span class="k">class</span><span class="w"> </span><span class="nc">Dog</span><span class="p">(</span><span class="n">Animal</span><span class="p">):</span><span class="w"> </span> <span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span><span class="w"> </span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span><span class="w"> </span> <span class="k">def</span><span class="w"> </span><span class="nf">make_sound</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w"> </span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Ruff!'</span><span class="p">)</span><span class="w"> </span><span class="n">dog</span> <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span><span class="s1">'Fido'</span><span class="p">)</span></code></pre> <p>and then here is some bash:</p> <pre class="code bash literal-block"><code><span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"--help"</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"OK"</span><span class="w"> </span><span class="k">fi</span></code></pre> <p>or click <a href="http://www.surveymonkey.com" rel="nofollow">SurveyMonkey</a></p> <pre class="code abc literal-block"><code>An unknown code fence block</code></pre> �������������������python-readme-renderer-46.0/tests/fixtures/test_rst_008.rst�����������������������������������������0000664�0000000�0000000�00000000705�15244322466�0024040�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Here is some Python code for a ``Dog``: .. code-block:: python class Dog(Animal): def __init__(self, name): self.name = name def make_sound(self): print('Ruff!') dog = Dog('Fido') and then here is some bash: .. code-block:: bash if [ "$1" = "--help" ]; then echo "OK" fi or click `SurveyMonkey <http://www.surveymonkey.com>`_ .. code-block:: abc An unknown code fence block �����������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_admonitions.html��������������������������������0000664�0000000�0000000�00000000725�15244322466�0026213�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<aside class="admonition danger"> <p class="admonition-title">!DANGER!</p> <p>Will Robinson</p> </aside> <aside class="admonition note"> <p class="admonition-title">Note</p> <p>F Sharp is a note, right?</p> </aside> <aside class="admonition admonition-see-also"> <p class="admonition-title">See also</p> <p>A customized admonition. Read more at <a href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#admonitions" rel="nofollow">docutils</a></p> </aside> �������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_admonitions.rst���������������������������������0000664�0000000�0000000�00000000342�15244322466�0026052�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. danger:: Will Robinson .. note:: F Sharp is a note, right? .. admonition:: See also A customized admonition. Read more at `docutils <https://docutils.sourceforge.io/docs/ref/rst/directives.html#admonitions>`_ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_bibtex.html�������������������������������������0000664�0000000�0000000�00000000606�15244322466�0025142�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<pre class="code bibtex literal-block"><code><span class="nc">@article</span><span class="p">{</span><span class="nl">the_impact_of_pygments_docutils_config_and_html5</span><span class="p">,</span><span class="w"> </span><span class="na">year</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s">{2022}</span><span class="p">,</span></code></pre> ��������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_bibtex.rst��������������������������������������0000664�0000000�0000000�00000000144�15244322466�0025003�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. code:: bibtex @article{the_impact_of_pygments_docutils_config_and_html5, year = {2022}, ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_caption.html������������������������������������0000664�0000000�0000000�00000001370�15244322466�0025321�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<table> <caption>Multiplication</caption> <thead> <tr><th class="head"><p>1</p></th> <th class="head"><p>2</p></th> <th class="head"><p>3</p></th> <th class="head"><p>4</p></th> <th class="head"><p>5</p></th> </tr> </thead> <tbody> <tr><td><p>1</p></td> <td><p>2</p></td> <td><p>3</p></td> <td><p>4</p></td> <td><p>5</p></td> </tr> <tr><td><p>2</p></td> <td><p>4</p></td> <td><p>6</p></td> <td><p>8</p></td> <td><p>10</p></td> </tr> <tr><td><p>3</p></td> <td><p>6</p></td> <td><p>9</p></td> <td><p>12</p></td> <td><p>15</p></td> </tr> <tr><td><p>4</p></td> <td><p>8</p></td> <td><p>12</p></td> <td><p>16</p></td> <td><p>20</p></td> </tr> <tr><td><p>5</p></td> <td><p>10</p></td> <td><p>15</p></td> <td><p>20</p></td> <td><p>25</p></td> </tr> </tbody> </table> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_caption.rst�������������������������������������0000664�0000000�0000000�00000000436�15244322466�0025167�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. The following test case is based on https://github.com/tiran/defusedxml/blob/f2c7c35b25f80c08923be49ac1f81e9cf95bd2ae/README.txt#L180 .. csv-table:: Multiplication :header: "1", "2", "3", "4", "5" 1,2,3,4,5 2,4,6,8,10 3,6,9,12,15 4,8,12,16,20 5,10,15,20,25 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_citations.html����������������������������������0000664�0000000�0000000�00000002105�15244322466�0025656�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Citation references, like <a href="#user-content-cit2002" id="user-content-citation-reference-1" rel="nofollow">[CIT2002]</a>. Note that citations may get rearranged, e.g., to the bottom of the “page”.</p> <div class="citation-list"> <div class="citation" id="user-content-cit2002"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-citation-reference-1" rel="nofollow">CIT2002</a><span class="fn-bracket">]</span></span> <p>A citation (as often used in journals).</p> </div> </div> <p>Citation labels contain alphanumerics, underlines, hyphens and fullstops. Case is not significant.</p> <p>Given a citation like <a href="#user-content-this" id="user-content-citation-reference-2" rel="nofollow">[this]</a>, one can also refer to it like <a href="#user-content-this" rel="nofollow">this</a>.</p> <div class="citation-list"> <div class="citation" id="user-content-this"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-citation-reference-2" rel="nofollow">this</a><span class="fn-bracket">]</span></span> <p>here.</p> </div> </div> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_citations.rst�����������������������������������0000664�0000000�0000000�00000000670�15244322466�0025527�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. Citations https://docutils.sourceforge.io/docs/user/rst/quickref.html#citations Citation references, like [CIT2002]_. Note that citations may get rearranged, e.g., to the bottom of the "page". .. [CIT2002] A citation (as often used in journals). Citation labels contain alphanumerics, underlines, hyphens and fullstops. Case is not significant. Given a citation like [this]_, one can also refer to it like this_. .. [this] here. ������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_contents.html�����������������������������������0000664�0000000�0000000�00000002426�15244322466�0025524�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<nav class="contents" id="user-content-contents"> <p class="topic-title"><a href="#top" rel="nofollow">Contents</a></p> <ul class="simple"> <li><p><a href="#user-content-features" id="user-content-toc-entry-1" rel="nofollow">Features</a></p></li> <li><p><a href="#user-content-installation" id="user-content-toc-entry-2" rel="nofollow">Installation</a></p> <ul> <li><p><a href="#user-content-requirements" id="user-content-toc-entry-3" rel="nofollow">Requirements</a></p></li> </ul> </li> </ul> </nav> <section id="user-content-features"> <h1><a href="#user-content-toc-entry-1" rel="nofollow">Features</a><a title="link to this section" href="#user-content-features" rel="nofollow"></a></h1> <ul class="simple"> <li><p>Eats cheese</p></li> </ul> </section> <section id="user-content-installation"> <h1><a href="#user-content-toc-entry-2" rel="nofollow">Installation</a><a title="link to this section" href="#user-content-installation" rel="nofollow"></a></h1> <section id="user-content-requirements"> <h2><a href="#user-content-toc-entry-3" rel="nofollow">Requirements</a><a title="link to this section" href="#user-content-requirements" rel="nofollow"></a></h2> <ul class="simple"> <li><p>Teeth</p></li> <li><p>Good taste</p></li> </ul> <p>Let’s eat some cheese together!</p> </section> </section> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_contents.rst������������������������������������0000664�0000000�0000000�00000000342�15244322466�0025363�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. Tests that using a Table of Contents directive renders correctly .. contents:: Features ======== * Eats cheese Installation ============ Requirements ------------ * Teeth * Good taste Let's eat some cheese together! ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_docinfo.html������������������������������������0000664�0000000�0000000�00000001632�15244322466�0025306�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<dl class="docinfo simple"> <dt class="project">Project<span class="colon">:</span></dt> <dd class="project"><p>pg_query – Pythonic wrapper around libpg_query</p> </dd> <dt class="created">Created<span class="colon">:</span></dt> <dd class="created"><p>mer 02 ago 2017 14:49:24 CEST</p> </dd> <dt class="author">Author<span class="colon">:</span></dt> <dd class="author"><p>Lele Gaifax <<a href="mailto:lele%40metapensiero.it" rel="nofollow">lele<span>@</span>metapensiero<span>.</span>it</a>></p></dd> <dt class="license">License<span class="colon">:</span></dt> <dd class="license"><p>GNU General Public License version 3 or later</p> </dd> <dt class="copyright">Copyright<span class="colon">:</span></dt> <dd class="copyright">© 2017, 2018 Lele Gaifax</dd> </dl> <section id="user-content-pg-query"> <h1>pg_query<a title="link to this section" href="#user-content-pg-query" rel="nofollow"></a></h1> </section> ������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_docinfo.rst�������������������������������������0000664�0000000�0000000�00000000426�15244322466�0025152�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:Project: pg_query -- Pythonic wrapper around libpg_query :Created: mer 02 ago 2017 14:49:24 CEST :Author: Lele Gaifax <lele@metapensiero.it> :License: GNU General Public License version 3 or later :Copyright: © 2017, 2018 Lele Gaifax ========== pg_query ========== ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_doctests.html�����������������������������������0000664�0000000�0000000�00000007613�15244322466�0025522�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<section id="user-content-doctests"> <h1>doctests<a title="link to this section" href="#user-content-doctests" rel="nofollow"></a></h1> <p>Looking for <a href="https://pygments.org/docs/lexers/#pygments.lexers.python.PythonConsoleLexer" rel="nofollow">https://pygments.org/docs/lexers/#pygments.lexers.python.PythonConsoleLexer</a></p> <section id="user-content-docutils"> <h2>docutils<a title="link to this section" href="#user-content-docutils" rel="nofollow"></a></h2> <section id="user-content-raw"> <h3>raw<a title="link to this section" href="#user-content-raw" rel="nofollow"></a></h3> <p>No indentation, no directive, just the code block of a repl session.</p> <pre class="code python doctest">>>> a = 'foo' >>> print(a) foo >>> 1 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero </pre> </section> <section id="user-content-code"> <h3>code<a title="link to this section" href="#user-content-code" rel="nofollow"></a></h3> <p>With the “code” directive, the content is indented and a lexer is specified.</p> <pre class="code pycon literal-block"><code><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="s1">'foo'</span><span class="w"> </span><span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">a</span><span class="p">)</span><span class="w"> </span><span class="go">foo </span><span class="gp">>>> </span><span class="mi">1</span> <span class="o">/</span> <span class="mi">0</span><span class="w"> </span><span class="gt">Traceback (most recent call last): </span> File <span class="nb">"<stdin>"</span>, line <span class="m">1</span>, in <span class="n"><module></span><span class="w"> </span><span class="gr">ZeroDivisionError</span>: <span class="n">integer division or modulo by zero</span></code></pre> <p>References:</p> <ul class="simple"> <li><p><a href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#code" rel="nofollow">https://docutils.sourceforge.io/docs/ref/rst/directives.html#code</a></p></li> </ul> <p>And without a lexer:</p> <pre class="code literal-block"><code>>>> a = 'foo' >>> print(a) foo >>> 1 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero</code></pre> </section> </section> <section id="user-content-sphinx"> <h2>sphinx<a title="link to this section" href="#user-content-sphinx" rel="nofollow"></a></h2> <p>raw - expect the same, as not using any sphinx extension.</p> <section id="user-content-code-block"> <h3>code-block<a title="link to this section" href="#user-content-code-block" rel="nofollow"></a></h3> <pre class="code pycon literal-block"><code><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="s1">'foo'</span><span class="w"> </span><span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">a</span><span class="p">)</span><span class="w"> </span><span class="go">foo </span><span class="gp">>>> </span><span class="mi">1</span> <span class="o">/</span> <span class="mi">0</span><span class="w"> </span><span class="gt">Traceback (most recent call last): </span> File <span class="nb">"<stdin>"</span>, line <span class="m">1</span>, in <span class="n"><module></span><span class="w"> </span><span class="gr">ZeroDivisionError</span>: <span class="n">integer division or modulo by zero</span></code></pre> <p>References:</p> <ul class="simple"> <li><p><a href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block" rel="nofollow">https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block</a></p></li> </ul> </section> </section> </section> ���������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_doctests.rst������������������������������������0000664�0000000�0000000�00000002627�15244322466�0025366�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������======== doctests ======== Looking for https://pygments.org/docs/lexers/#pygments.lexers.python.PythonConsoleLexer -------- docutils -------- raw === No indentation, no directive, just the code block of a repl session. >>> a = 'foo' >>> print(a) foo >>> 1 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero code ==== With the "code" directive, the content is indented and a lexer is specified. .. code:: pycon >>> a = 'foo' >>> print(a) foo >>> 1 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero References: - https://docutils.sourceforge.io/docs/ref/rst/directives.html#code And without a lexer: .. code:: >>> a = 'foo' >>> print(a) foo >>> 1 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero ------ sphinx ------ raw - expect the same, as not using any sphinx extension. code-block ========== .. code-block:: pycon >>> a = 'foo' >>> print(a) foo >>> 1 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero References: - https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block ���������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_figure.html�������������������������������������0000664�0000000�0000000�00000000465�15244322466�0025151�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<figure class="align-center"> <img alt="https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png" src="https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png"> <figcaption> <p>This is the caption for the figure</p> </figcaption> </figure> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_figure.rst��������������������������������������0000664�0000000�0000000�00000000241�15244322466�0025005�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. figure:: https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png :align: center This is the caption for the figure���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_footnotes.html����������������������������������0000664�0000000�0000000�00000006774�15244322466�0025721�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>Footnote references, like <a href="#user-content-5" id="user-content-footnote-reference-1" rel="nofollow"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a>. Note that footnotes may get rearranged, e.g., to the bottom of the “page”.</p> <aside class="footnote-list brackets"> <aside class="footnote brackets" id="user-content-5"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-footnote-reference-1" rel="nofollow">5</a><span class="fn-bracket">]</span></span> <p>A numerical footnote. Note there’s no colon after the <span class="docutils literal">]</span>.</p> </aside> </aside> <p>Autonumbered footnotes are possible, like using <a href="#user-content-footnote-1" id="user-content-footnote-reference-2" rel="nofollow"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a> and <a href="#user-content-footnote-2" id="user-content-footnote-reference-3" rel="nofollow"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>.</p> <aside class="footnote-list brackets"> <aside class="footnote brackets" id="user-content-footnote-1"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-footnote-reference-2" rel="nofollow">1</a><span class="fn-bracket">]</span></span> <p>This is the first one.</p> </aside> <aside class="footnote brackets" id="user-content-footnote-2"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-footnote-reference-3" rel="nofollow">2</a><span class="fn-bracket">]</span></span> <p>This is the second one.</p> </aside> </aside> <p>They may be assigned ‘autonumber labels’ - for instance, <a href="#user-content-fourth" id="user-content-footnote-reference-4" rel="nofollow"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></a> and <a href="#user-content-third" id="user-content-footnote-reference-5" rel="nofollow"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>.</p> <aside class="footnote-list brackets"> <aside class="footnote brackets" id="user-content-third"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-footnote-reference-5" rel="nofollow">3</a><span class="fn-bracket">]</span></span> <p>a.k.a. <a href="#user-content-third" rel="nofollow">third</a></p> </aside> <aside class="footnote brackets" id="user-content-fourth"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-footnote-reference-4" rel="nofollow">4</a><span class="fn-bracket">]</span></span> <p>a.k.a. <a href="#user-content-fourth" rel="nofollow">fourth</a></p> </aside> </aside> <p>Auto-symbol footnotes are also possible, like this: <a href="#user-content-footnote-3" id="user-content-footnote-reference-6" rel="nofollow"><span class="fn-bracket">[</span>*<span class="fn-bracket">]</span></a> and <a href="#user-content-footnote-4" id="user-content-footnote-reference-7" rel="nofollow"><span class="fn-bracket">[</span>†<span class="fn-bracket">]</span></a>.</p> <aside class="footnote-list brackets"> <aside class="footnote brackets" id="user-content-footnote-3"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-footnote-reference-6" rel="nofollow">*</a><span class="fn-bracket">]</span></span> <p>This is the first one.</p> </aside> <aside class="footnote brackets" id="user-content-footnote-4"> <span class="label"><span class="fn-bracket">[</span><a href="#user-content-footnote-reference-7" rel="nofollow">†</a><span class="fn-bracket">]</span></span> <p>This is the second one.</p> </aside> </aside> ����python-readme-renderer-46.0/tests/fixtures/test_rst_footnotes.rst�����������������������������������0000664�0000000�0000000�00000001223�15244322466�0025545�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. Footnotes https://docutils.sourceforge.io/docs/user/rst/quickref.html#footnotes Footnote references, like [5]_. Note that footnotes may get rearranged, e.g., to the bottom of the "page". .. [5] A numerical footnote. Note there's no colon after the ``]``. Autonumbered footnotes are possible, like using [#]_ and [#]_. .. [#] This is the first one. .. [#] This is the second one. They may be assigned 'autonumber labels' - for instance, [#fourth]_ and [#third]_. .. [#third] a.k.a. third_ .. [#fourth] a.k.a. fourth_ Auto-symbol footnotes are also possible, like this: [*]_ and [*]_. .. [*] This is the first one. .. [*] This is the second one. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_header_only.html��������������������������������0000664�0000000�0000000�00000000215�15244322466�0026152�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<section id="user-content-header"> <h1>Header<a title="link to this section" href="#user-content-header" rel="nofollow"></a></h1> </section> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_header_only.rst���������������������������������0000664�0000000�0000000�00000000016�15244322466�0026015�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Header ====== ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_headings.html�����������������������������������0000664�0000000�0000000�00000001373�15244322466�0025451�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<section id="user-content-section-one"> <h1>Section One<a title="link to this section" href="#user-content-section-one" rel="nofollow"></a></h1> <p>Some text here.</p> </section> <section id="user-content-section-two"> <h1>Section Two<a title="link to this section" href="#user-content-section-two" rel="nofollow"></a></h1> <p>Lorem ipsum dolor sit amet consectetur adipiscing elit.</p> <section id="user-content-subsection"> <h2>Subsection<a title="link to this section" href="#user-content-subsection" rel="nofollow"></a></h2> <p>More content here.</p> <hr class="docutils"> <p>Relative links to <a href="#user-content-section-one" rel="nofollow">Section One</a> and <a href="#user-content-section-two" rel="nofollow">Section Two</a>.</p> </section> </section> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_headings.rst������������������������������������0000664�0000000�0000000�00000000342�15244322466�0025310�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Section One ----------- Some text here. Section Two ----------- Lorem ipsum dolor sit amet consectetur adipiscing elit. Subsection ~~~~~~~~~~ More content here. ---- Relative links to `Section One`_ and `Section Two`_. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_linkify.html������������������������������������0000664�0000000�0000000�00000010142�15244322466�0025326�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<section id="user-content-multigtfs-gtfs-as-a-django-app"> <h1>multigtfs: GTFS as a Django app<a title="link to this section" href="#user-content-multigtfs-gtfs-as-a-django-app" rel="nofollow"></a></h1> <a href="https://travis-ci.org/tulsawebdevs/django-multi-gtfs" rel="nofollow"> <img alt="https://travis-ci.org/tulsawebdevs/django-multi-gtfs.svg?branch=master" src="https://travis-ci.org/tulsawebdevs/django-multi-gtfs.svg?branch=master"> </a> <a href="https://coveralls.io/github/tulsawebdevs/django-multi-gtfs" rel="nofollow"> <img alt="https://coveralls.io/repos/github/tulsawebdevs/django-multi-gtfs/badge.svg?branch=django19" src="https://coveralls.io/repos/github/tulsawebdevs/django-multi-gtfs/badge.svg?branch=django19"> </a> <p><strong>multigtfs</strong> is an <a href="http://choosealicense.com/licenses/apache/" rel="nofollow">Apache 2.0</a>-licensed Django app that supports importing and exporting of GTFS feeds. All features of the <a href="https://developers.google.com/transit/gtfs/reference" rel="nofollow">June 20, 2012 reference</a> are supported, including <a href="https://developers.google.com/transit/gtfs/changes#RevisionHistory" rel="nofollow">all changes</a> up to February 17, 2014. It allows multiple feeds to be stored in the database at once.</p> <p>It requires a spatial databases compatible with <a href="https://docs.djangoproject.com/en/dev/ref/contrib/gis/" rel="nofollow">GeoDjango</a>. <a href="http://www.postgresql.org" rel="nofollow">PostgreSQL</a> 9.x and <a href="http://postgis.refractions.net" rel="nofollow">PostGIS</a> 2.x are recommended for development and production, since these support all the GeoDjango features.</p> <section id="user-content-status"> <h2>Status<a title="link to this section" href="#user-content-status" rel="nofollow"></a></h2> <p>multigtfs is ready for your GTFS project.</p> <p>Point releases (0.4.1 to 0.4.2) should be safe, only adding features or fixing bugs. Minor updates (0.3.3 to 0.4.0) may include significant changes that will break relying code. In the worst case scenario, you may need to export your GTFS feeds in the original version, update multigtfs and your code, and re-import.</p> <p>multigtfs works with Django 1.5 through 1.9. In the next version, support will be limited to Django’s supported releases, so if you are using an old version you will want to update to at least 1.8, the long-term support (LTS) release.</p> <p>All valid GTFS feeds are supported for import and export. This includes feeds with extra columns not yet included in the GTFS spec, and feeds that omit <span class="docutils literal">calendar.txt</span> in favor of <span class="docutils literal">calendar_dates.txt</span> (such as the TriMet archive feeds). If you find a feed that doesn’t work, <a href="https://github.com/tulsawebdevs/django-multi-gtfs/issues" rel="nofollow">file a bug</a>!</p> <p>See the <a href="https://github.com/tulsawebdevs/django-multi-gtfs/issues?state=open" rel="nofollow">issues list</a> for more details on bugs and feature requests.</p> </section> <section id="user-content-example-project"> <h2>Example project<a title="link to this section" href="#user-content-example-project" rel="nofollow"></a></h2> <p>Check out the <a href="examples/explore/README.md" rel="nofollow">example project</a>.</p> </section> <section id="user-content-development"> <h2>Development<a title="link to this section" href="#user-content-development" rel="nofollow"></a></h2> <dl class="field-list simple"> <dt>Code<span class="colon">:</span></dt> <dd><p><a href="https://github.com/tulsawebdevs/django-multi-gtfs" rel="nofollow">https://github.com/tulsawebdevs/django-multi-gtfs</a></p> </dd> <dt>Issues<span class="colon">:</span></dt> <dd><p><a href="https://github.com/tulsawebdevs/django-multi-gtfs/issues" rel="nofollow">https://github.com/tulsawebdevs/django-multi-gtfs/issues</a></p> </dd> <dt>Dev Docs<span class="colon">:</span></dt> <dd><p><a href="http://multigtfs.readthedocs.org/" rel="nofollow">http://multigtfs.readthedocs.org/</a></p> </dd> <dt>IRC<span class="colon">:</span></dt> <dd><p><a rel="nofollow">irc://irc.freenode.net/tulsawebdevs</a></p> </dd> </dl> </section> </section> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_linkify.rst�������������������������������������0000664�0000000�0000000�00000005343�15244322466�0025201�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������multigtfs: GTFS as a Django app =============================== .. image:: https://travis-ci.org/tulsawebdevs/django-multi-gtfs.svg?branch=master :target: https://travis-ci.org/tulsawebdevs/django-multi-gtfs .. image:: https://coveralls.io/repos/github/tulsawebdevs/django-multi-gtfs/badge.svg?branch=django19 :target: https://coveralls.io/github/tulsawebdevs/django-multi-gtfs .. Omit badges from docs **multigtfs** is an `Apache 2.0`_-licensed Django app that supports importing and exporting of GTFS feeds. All features of the `June 20, 2012 reference`_ are supported, including `all changes`_ up to February 17, 2014. It allows multiple feeds to be stored in the database at once. It requires a spatial databases compatible with GeoDjango_. PostgreSQL_ 9.x and PostGIS_ 2.x are recommended for development and production, since these support all the GeoDjango features. Status ------ multigtfs is ready for your GTFS project. Point releases (0.4.1 to 0.4.2) should be safe, only adding features or fixing bugs. Minor updates (0.3.3 to 0.4.0) may include significant changes that will break relying code. In the worst case scenario, you may need to export your GTFS feeds in the original version, update multigtfs and your code, and re-import. multigtfs works with Django 1.5 through 1.9. In the next version, support will be limited to Django's supported releases, so if you are using an old version you will want to update to at least 1.8, the long-term support (LTS) release. All valid GTFS feeds are supported for import and export. This includes feeds with extra columns not yet included in the GTFS spec, and feeds that omit ``calendar.txt`` in favor of ``calendar_dates.txt`` (such as the TriMet archive feeds). If you find a feed that doesn't work, `file a bug`_! See the `issues list`_ for more details on bugs and feature requests. Example project --------------- Check out the `example project <examples/explore/README.md>`_. Development ----------- :Code: https://github.com/tulsawebdevs/django-multi-gtfs :Issues: https://github.com/tulsawebdevs/django-multi-gtfs/issues :Dev Docs: http://multigtfs.readthedocs.org/ :IRC: irc://irc.freenode.net/tulsawebdevs .. _`Apache 2.0`: http://choosealicense.com/licenses/apache/ .. _`June 20, 2012 reference`: https://developers.google.com/transit/gtfs/reference .. _`all changes`: https://developers.google.com/transit/gtfs/changes#RevisionHistory .. _PostgreSQL: http://www.postgresql.org .. _PostGIS: http://postgis.refractions.net .. _GeoDjango: https://docs.djangoproject.com/en/dev/ref/contrib/gis/ .. _`file a bug`: https://github.com/tulsawebdevs/django-multi-gtfs/issues .. _`issues list`: https://github.com/tulsawebdevs/django-multi-gtfs/issues?state=open ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_math.html���������������������������������������0000664�0000000�0000000�00000000512�15244322466�0024612�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<p>A <span class="docutils literal">math</span> directive:</p> <div class="math"> \begin{equation*} \alpha _t(i) = P(O_1, O_2, \ldots O_t, q_t = S_i \lambda ) \end{equation*} </div> <p>A <span class="docutils literal">:math:</span> role:</p> <p>The area of a circle is <span class="math">\(A_\text{c} = (\pi/4) d^2\)</span>.</p> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_math.rst����������������������������������������0000664�0000000�0000000�00000000500�15244322466�0024453�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. Sample from https://docutils.sourceforge.io/docs/ref/rst/directives.html#math A ``math`` directive: .. math:: α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ) .. Sample from https://docutils.sourceforge.io/docs/ref/rst/roles.html#math A ``:math:`` role: The area of a circle is :math:`A_\text{c} = (\pi/4) d^2`. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_png.html����������������������������������������0000664�0000000�0000000�00000000116�15244322466�0024445�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<img alt="https://example.com/badge.png" src="https://example.com/badge.png"> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_png.rst�����������������������������������������0000664�0000000�0000000�00000000051�15244322466�0024307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. image:: https://example.com/badge.png ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_png_attrs.html����������������������������������0000664�0000000�0000000�00000000160�15244322466�0025661�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<img alt="alternate text" class="align-right" height="100px" src="https://example.com/badge.png" width="25.0%"> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_png_attrs.rst�����������������������������������0000664�0000000�0000000�00000000165�15244322466�0025532�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. image:: https://example.com/badge.png :height: 100px :width: 25.0% :alt: alternate text :align: right �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_svg.html����������������������������������������0000664�0000000�0000000�00000000116�15244322466�0024460�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<img alt="https://example.com/badge.svg" src="https://example.com/badge.svg"> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_svg.rst�����������������������������������������0000664�0000000�0000000�00000000051�15244322466�0024322�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. image:: https://example.com/badge.svg ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_svg_attrs.html����������������������������������0000664�0000000�0000000�00000000160�15244322466�0025674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<img alt="alternate text" class="align-right" height="100px" src="https://example.com/badge.svg" width="25.0%"> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_svg_attrs.rst�����������������������������������0000664�0000000�0000000�00000000165�15244322466�0025545�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. image:: https://example.com/badge.svg :height: 100px :width: 25.0% :alt: alternate text :align: right �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_tables.html�������������������������������������0000664�0000000�0000000�00000002054�15244322466�0025136�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<table> <thead> <tr><th class="head"><p>Header row, column 1 (header rows optional)</p></th> <th class="head"><p>Header 2</p></th> <th class="head"><p>Header 3</p></th> <th class="head"><p>Header 4</p></th> </tr> </thead> <tbody> <tr><td><p>body row 1, column 1</p></td> <td><p>column 2</p></td> <td><p>column 3</p></td> <td><p>column 4</p></td> </tr> <tr><td><p>body row 2</p></td> <td colspan="3"><p>Cells may span columns.</p></td> </tr> <tr><td><p>body row 3</p></td> <td rowspan="2"><p>Cells may span rows.</p></td> <td colspan="2" rowspan="2"><ul class="simple"> <li><p>Table cells</p></li> <li><p>contain</p></li> <li><p>body elements.</p></li> </ul> </td> </tr> <tr><td><p>body row 4</p></td> </tr> </tbody> </table> <table> <thead> <tr><th class="head"><p>title1</p></th> <th class="head"><p>title2</p></th> </tr> </thead> <tbody> <tr><td><p>col1</p></td> <td><p>col2</p></td> </tr> <tr><td rowspan="2"><p>mutirow</p></td> <td><p>cell1</p></td> </tr> <tr><td><p>cell2</p></td> </tr> <tr><td><p>singlerow</p></td> <td><p>cell3</p></td> </tr> </tbody> </table> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_tables.rst��������������������������������������0000664�0000000�0000000�00000002320�15244322466�0024776�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. Example from https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#tables +------------------------+------------+----------+----------+ | Header row, column 1 | Header 2 | Header 3 | Header 4 | | (header rows optional) | | | | +========================+============+==========+==========+ | body row 1, column 1 | column 2 | column 3 | column 4 | +------------------------+------------+----------+----------+ | body row 2 | Cells may span columns. | +------------------------+------------+---------------------+ | body row 3 | Cells may | - Table cells | +------------------------+ span rows. | - contain | | body row 4 | | - body elements. | +------------------------+------------+---------------------+ .. Example from #182 +---------------+---------------+ | title1 | title2 | +===============+===============+ | col1 | col2 | +---------------+---------------+ | mutirow | cell1 | | +---------------+ | | cell2 | +---------------+---------------+ | singlerow | cell3 | +---------------+---------------+ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_top_level_heading.html��������������������������0000664�0000000�0000000�00000000303�15244322466�0027327�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<section id="user-content-top-level-heading"> <h1>Top Level Heading<a title="link to this section" href="#user-content-top-level-heading" rel="nofollow"></a></h1> <p>Some content.</p> </section> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_rst_top_level_heading.rst���������������������������0000664�0000000�0000000�00000000064�15244322466�0027177�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Top Level Heading ================== Some content. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_txt_001.html����������������������������������������0000664�0000000�0000000�00000017354�15244322466�0024204�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Algen<br><br>Algen generates opionated ORM classes for sqlalchemy given a simple schema<br>either as a commandline string or as a yaml file.<br>It is designed to have minimal dependencies and is trivially extensible.<br>A command line tool is bundled along to help generate the models.<br>For DB specific types, only postgres is currently supported.<br>The tool currently assumes that sqlalchemy's declarative base object<br>is to be imported like ```from .alchemy_base import Base```<br><br><br>### CLI<br>```bash<br>$ algen --help<br>Usage: algen [OPTIONS]<br><br>Options:<br> -n, --name TEXT Name of model<br> -c, --columns TEXT Column definition. e.g. col_name:col_type Can be<br> used multiple times hence named columns. e.g. -c<br> foo:Int -c bar:Unicode(20)<br> -d, --destination PATH Destination directory. Default will assume 'Models'<br> directory inside the current working directory<br> -y, --yaml PATH Yaml file describing the Model. This supersedes the<br> column definition provided through --columns option.<br> --help Show this message and exit.<br>```<br><br>Given a file as follows:<br>```yaml<br>Person:<br> columns:<br> - name: id<br> type: BigInteger<br> primary_key: True<br> auto_increment: True<br> - name: name<br> type: Unicode(255)<br> - name: is_vip<br> type: Boolean<br> - name: created_at<br> type: DateTime(timezone=True)<br><br>Address:<br> columns:<br> - name: id<br> type: BigInteger<br> primary_key: True<br> auto_increment: True<br> - name: line1<br> type: Unicode()<br> - name: line2<br> type: Unicode()<br> - name: line3<br> type: Unicode()<br> - name: postcode<br> type: Unicode(10)<br> index: True<br>```<br><br>The cli tool will create two the following two files ```Person.py``` and ```Address.py```.<br><br>```python<br>from __future__ import unicode_literals, absolute_import, print_function<br><br>from collections import namedtuple<br><br>from sqlalchemy import Column, DateTime, Boolean, Unicode, BigInteger<br><br><br>from .alchemy_base import Base<br><br>__author__ = 'danishabdullah'<br><br><br>class Person(Base):<br> __tablename__ = 'persons'<br><br> id = Column(BigInteger, primary_key=True, auto_increment=True)<br> name = Column(Unicode(255), )<br> is_vip = Column(Boolean, )<br> created_at = Column(DateTime(timezone=True), )<br><br><br> def __init__(self, id=None, name=None, is_vip=None, created_at=None):<br> self.id = id<br> self.name = name<br> self.is_vip = is_vip<br> self.created_at = created_at<br><br> def add(self, session):<br> session.add(self)<br><br> def update(self, name=None, is_vip=None, created_at=None):<br> # This function only updates a value if it is not None.<br> # Falsy values go through in the normal way.<br> # To set things to None use the usual syntax:<br> # Person.column_name = None<br><br> if name is not None:<br> self.name = name<br><br> if is_vip is not None:<br> self.is_vip = is_vip<br><br> if created_at is not None:<br> self.created_at = created_at<br><br> def delete(self, session):<br> session.delete(self)<br><br> def to_dict(self):<br> return {x: y for x, y in self.__dict__.items() if not x.startswith("_sa")}<br><br> def get_proxy_cls(self):<br> # PersonProxy is useful when you want to persist data<br> # independent of the sqlalchemy session. It's just a namedtuple<br> # that has very low memory/cpu footprint compared the regular<br> # orm class instances.<br> keys = self.to_dict().keys()<br> name = "PersonProxy"<br> return namedtuple(name, keys)<br><br> def to_proxy(self):<br> # Proxy-ing is useful when you want to persist data<br> # independent of the sqlalchemy session. It's just a namedtuple<br> # that has very low memory/cpu footprint compared the regular<br> # orm class instances.<br> cls = self._get_proxy_cls()<br> return cls(**self.to_dict())<br><br> @classmethod<br> def from_proxy(cls, proxy):<br> return cls(**proxy._asdict())<br><br> def __hash__(self):<br> return hash(str(self.id))<br><br> def __eq__(self, other):<br> return (self.id == other.id)<br><br> def __neq__(self, other):<br> return not (self.id == other.id)<br><br> def __str__(self):<br> return "<Person: {id}>".format(id=self.id)<br><br> def __unicode__(self):<br> return "<Person: {id}>".format(id=self.id)<br><br> def __repr__(self):<br> return "<Person: {id}>".format(id=self.id)<br>```<br><br>```python<br>from __future__ import unicode_literals, absolute_import, print_function<br><br>from collections import namedtuple<br><br>from sqlalchemy import Column, Unicode, BigInteger<br><br><br>from .alchemy_base import Base<br><br>__author__ = 'danishabdullah'<br><br><br>class Address(Base):<br> __tablename__ = 'addresses'<br><br> id = Column(BigInteger, primary_key=True, auto_increment=True)<br> line1 = Column(Unicode(), )<br> line2 = Column(Unicode(), )<br> line3 = Column(Unicode(), )<br> postcode = Column(Unicode(10), index=True)<br><br><br> def __init__(self, id=None, line1=None, line2=None, line3=None, postcode=None):<br> self.id = id<br> self.line1 = line1<br> self.line2 = line2<br> self.line3 = line3<br> self.postcode = postcode<br><br> def add(self, session):<br> session.add(self)<br><br> def update(self, line1=None, line2=None, line3=None, postcode=None):<br> # This function only updates a value if it is not None.<br> # Falsy values go through in the normal way.<br> # To set things to None use the usual syntax:<br> # Address.column_name = None<br><br> if line1 is not None:<br> self.line1 = line1<br><br> if line2 is not None:<br> self.line2 = line2<br><br> if line3 is not None:<br> self.line3 = line3<br><br> if postcode is not None:<br> self.postcode = postcode<br><br> def delete(self, session):<br> session.delete(self)<br><br> def to_dict(self):<br> return {x: y for x, y in self.__dict__.items() if not x.startswith("_sa")}<br><br> def get_proxy_cls(self):<br> # AddressProxy is useful when you want to persist data<br> # independent of the sqlalchemy session. It's just a namedtuple<br> # that has very low memory/cpu footprint compared the regular<br> # orm class instances.<br> keys = self.to_dict().keys()<br> name = "AddressProxy"<br> return namedtuple(name, keys)<br><br> def to_proxy(self):<br> # Proxy-ing is useful when you want to persist data<br> # independent of the sqlalchemy session. It's just a namedtuple<br> # that has very low memory/cpu footprint compared the regular<br> # orm class instances.<br> cls = self._get_proxy_cls()<br> return cls(**self.to_dict())<br><br> @classmethod<br> def from_proxy(cls, proxy):<br> return cls(**proxy._asdict())<br><br> def __hash__(self):<br> return hash(str(self.id))<br><br> def __eq__(self, other):<br> return (self.id == other.id)<br><br> def __neq__(self, other):<br> return not (self.id == other.id)<br><br> def __str__(self):<br> return "<Address: {id}>".format(id=self.id)<br><br> def __unicode__(self):<br> return "<Address: {id}>".format(id=self.id)<br><br> def __repr__(self):<br> return "<Address: {id}>".format(id=self.id)<br><br>```<br>������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/fixtures/test_txt_001.txt�����������������������������������������0000664�0000000�0000000�00000015723�15244322466�0024055�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Algen Algen generates opionated ORM classes for sqlalchemy given a simple schema either as a commandline string or as a yaml file. It is designed to have minimal dependencies and is trivially extensible. A command line tool is bundled along to help generate the models. For DB specific types, only postgres is currently supported. The tool currently assumes that sqlalchemy's declarative base object is to be imported like ```from .alchemy_base import Base``` ### CLI ```bash $ algen --help Usage: algen [OPTIONS] Options: -n, --name TEXT Name of model -c, --columns TEXT Column definition. e.g. col_name:col_type Can be used multiple times hence named columns. e.g. -c foo:Int -c bar:Unicode(20) -d, --destination PATH Destination directory. Default will assume 'Models' directory inside the current working directory -y, --yaml PATH Yaml file describing the Model. This supersedes the column definition provided through --columns option. --help Show this message and exit. ``` Given a file as follows: ```yaml Person: columns: - name: id type: BigInteger primary_key: True auto_increment: True - name: name type: Unicode(255) - name: is_vip type: Boolean - name: created_at type: DateTime(timezone=True) Address: columns: - name: id type: BigInteger primary_key: True auto_increment: True - name: line1 type: Unicode() - name: line2 type: Unicode() - name: line3 type: Unicode() - name: postcode type: Unicode(10) index: True ``` The cli tool will create two the following two files ```Person.py``` and ```Address.py```. ```python from __future__ import unicode_literals, absolute_import, print_function from collections import namedtuple from sqlalchemy import Column, DateTime, Boolean, Unicode, BigInteger from .alchemy_base import Base __author__ = 'danishabdullah' class Person(Base): __tablename__ = 'persons' id = Column(BigInteger, primary_key=True, auto_increment=True) name = Column(Unicode(255), ) is_vip = Column(Boolean, ) created_at = Column(DateTime(timezone=True), ) def __init__(self, id=None, name=None, is_vip=None, created_at=None): self.id = id self.name = name self.is_vip = is_vip self.created_at = created_at def add(self, session): session.add(self) def update(self, name=None, is_vip=None, created_at=None): # This function only updates a value if it is not None. # Falsy values go through in the normal way. # To set things to None use the usual syntax: # Person.column_name = None if name is not None: self.name = name if is_vip is not None: self.is_vip = is_vip if created_at is not None: self.created_at = created_at def delete(self, session): session.delete(self) def to_dict(self): return {x: y for x, y in self.__dict__.items() if not x.startswith("_sa")} def get_proxy_cls(self): # PersonProxy is useful when you want to persist data # independent of the sqlalchemy session. It's just a namedtuple # that has very low memory/cpu footprint compared the regular # orm class instances. keys = self.to_dict().keys() name = "PersonProxy" return namedtuple(name, keys) def to_proxy(self): # Proxy-ing is useful when you want to persist data # independent of the sqlalchemy session. It's just a namedtuple # that has very low memory/cpu footprint compared the regular # orm class instances. cls = self._get_proxy_cls() return cls(**self.to_dict()) @classmethod def from_proxy(cls, proxy): return cls(**proxy._asdict()) def __hash__(self): return hash(str(self.id)) def __eq__(self, other): return (self.id == other.id) def __neq__(self, other): return not (self.id == other.id) def __str__(self): return "<Person: {id}>".format(id=self.id) def __unicode__(self): return "<Person: {id}>".format(id=self.id) def __repr__(self): return "<Person: {id}>".format(id=self.id) ``` ```python from __future__ import unicode_literals, absolute_import, print_function from collections import namedtuple from sqlalchemy import Column, Unicode, BigInteger from .alchemy_base import Base __author__ = 'danishabdullah' class Address(Base): __tablename__ = 'addresses' id = Column(BigInteger, primary_key=True, auto_increment=True) line1 = Column(Unicode(), ) line2 = Column(Unicode(), ) line3 = Column(Unicode(), ) postcode = Column(Unicode(10), index=True) def __init__(self, id=None, line1=None, line2=None, line3=None, postcode=None): self.id = id self.line1 = line1 self.line2 = line2 self.line3 = line3 self.postcode = postcode def add(self, session): session.add(self) def update(self, line1=None, line2=None, line3=None, postcode=None): # This function only updates a value if it is not None. # Falsy values go through in the normal way. # To set things to None use the usual syntax: # Address.column_name = None if line1 is not None: self.line1 = line1 if line2 is not None: self.line2 = line2 if line3 is not None: self.line3 = line3 if postcode is not None: self.postcode = postcode def delete(self, session): session.delete(self) def to_dict(self): return {x: y for x, y in self.__dict__.items() if not x.startswith("_sa")} def get_proxy_cls(self): # AddressProxy is useful when you want to persist data # independent of the sqlalchemy session. It's just a namedtuple # that has very low memory/cpu footprint compared the regular # orm class instances. keys = self.to_dict().keys() name = "AddressProxy" return namedtuple(name, keys) def to_proxy(self): # Proxy-ing is useful when you want to persist data # independent of the sqlalchemy session. It's just a namedtuple # that has very low memory/cpu footprint compared the regular # orm class instances. cls = self._get_proxy_cls() return cls(**self.to_dict()) @classmethod def from_proxy(cls, proxy): return cls(**proxy._asdict()) def __hash__(self): return hash(str(self.id)) def __eq__(self, other): return (self.id == other.id) def __neq__(self, other): return not (self.id == other.id) def __str__(self): return "<Address: {id}>".format(id=self.id) def __unicode__(self): return "<Address: {id}>".format(id=self.id) def __repr__(self): return "<Address: {id}>".format(id=self.id) ``` ���������������������������������������������python-readme-renderer-46.0/tests/test_clean.py�����������������������������������������������������0000664�0000000�0000000�00000002503�15244322466�0021670�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from readme_renderer.clean import clean def test_invalid_link(): assert clean( '<a href="http://exam](ple.com">foo</a>' ) == '<a rel="nofollow">foo</a>' def test_custom_tags_are_respected(): assert clean( "<p>plain text</p><br><strong>bold text</strong>", tags={"br"}, ) == "plain text<br>bold text" def test_custom_attributes_are_respected(): assert clean( '<img src="https://example.com/image.png" alt="image" width="100">', attributes={"img": {"alt"}}, ) == '<img alt="image">' def test_active_input_controls_are_disabled(): # Every input is forced disabled, so nothing interactive survives even # though the type is preserved. assert clean( '<input type="submit">' '<input type="text">' '<input type="checkbox" checked>' '<input type="checkbox">' ) == ( '<input type="submit" disabled="">' '<input type="text" disabled="">' '<input type="checkbox" checked="" disabled="">' '<input type="checkbox" disabled="">' ) def test_disabled_checkbox_inputs_are_preserved(): assert clean( '<input type="checkbox" disabled><input type="checkbox" checked disabled>' ) == ( '<input type="checkbox" disabled="">' '<input type="checkbox" checked="" disabled="">' ) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/test_cli.py�������������������������������������������������������0000664�0000000�0000000�00000004420�15244322466�0021355�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pathlib import tempfile from unittest import mock import pytest from readme_renderer.__main__ import main @pytest.fixture(params=["test_CommonMark_001.md", "test_rst_003.rst", "test_GFM_001.md", "test_txt_001.txt"]) def input_file(request): path = pathlib.Path("tests/fixtures", request.param) # Skip markdown tests if the comrak optional dependency is not installed. if path.suffix == ".md": pytest.importorskip("comrak") return path @pytest.mark.parametrize("output_file", [False, True]) def test_cli_input_file(input_file, output_file): with mock.patch("builtins.print") as print_: if output_file: with tempfile.TemporaryDirectory() as tmpdir: output = pathlib.Path(tmpdir) / "output.html" main(["-o", str(output), str(input_file)]) with output.open() as fp: result = fp.read() else: main([str(input_file)]) print_.assert_called_once() (result,), kwargs = print_.call_args with input_file.with_suffix(".html").open() as fp: expected = fp.read() assert result.strip() == expected.strip() if output_file: assert kwargs["file"].name == str(output) def test_cli_invalid_format(): with mock.patch("pathlib.Path.open"), \ pytest.raises(ValueError, match="invalid README format: invalid"): main(["no-file.invalid"]) def test_cli_explicit_format(input_file, tmp_path): fmt = input_file.suffix.lstrip(".") temp_input = tmp_path / "invalid.invalid" temp_input.write_text(input_file.read_text()) with mock.patch("builtins.print") as print_: main(["-f", fmt, str(temp_input)]) (result,), _ = print_.call_args with input_file.with_suffix(".html").open() as fp: assert result.strip() == fp.read().strip() @pytest.mark.parametrize("package, contains", [ ("readme_renderer", "Readme Renderer is a library that will safely render"), ("docutils", "Docutils is a modular system for processing documentation"), ]) def test_cli_package(package, contains): with mock.patch("builtins.print") as print_: main(["-p", package]) print_.assert_called_once() (result,), _ = print_.call_args assert contains in result ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/test_markdown.py��������������������������������������������������0000664�0000000�0000000�00000003064�15244322466�0022433�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import contextlib from pathlib import Path import pytest from readme_renderer.markdown import render, variants def expect_extra_warning() -> contextlib.nullcontext | pytest.WarningsRecorder: """Expect the missing-extra ``UserWarning`` only when it actually fires. ``render()`` warns that "Markdown renderers are not available" only when the optional ``md`` extra is not installed. When the extra is present the same calls run silently, so an unconditional ``pytest.warns`` would fail there. Returning ``pytest.warns`` only on the ``noextra`` platform keeps expected warnings out of the test summary on both, and asserts the warning when it is genuinely expected. """ if variants: return contextlib.nullcontext() return pytest.warns( UserWarning, match="Markdown renderers are not available" ) @pytest.mark.parametrize( ("md_filename", "html_filename", "variant"), [ (pytest.param(fn, fn.with_suffix(".html"), variant, id=fn.name)) for variant in variants for fn in Path(__file__).parent.glob(f"fixtures/test_{variant}*.md") ], ) def test_md_fixtures(md_filename, html_filename, variant): # Get our Markup with open(md_filename, encoding='utf-8') as f: md_markup = f.read() # Get our expected with open(html_filename, encoding="utf-8") as f: expected = f.read() assert render(md_markup, variant=variant) == expected def test_missing_variant(): with expect_extra_warning(): assert render('Hello', variant="InvalidVariant") is None ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/test_noextra.py���������������������������������������������������0000664�0000000�0000000�00000001010�15244322466�0022256�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pytest from readme_renderer.markdown import render, variants @pytest.mark.skipif(variants, reason="Extra is installed") @pytest.mark.parametrize("variant", ('GFM', 'CommonMark')) def test_no_extra(variant): with pytest.warns(UserWarning) as warnings: assert render('Hello', variant=variant) is None assert len(warnings) == 1 assert warnings[0].message.args[0] == ( "Markdown renderers are not available. " "Install 'readme_renderer[md]' to enable Markdown rendering." ) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tests/test_rst.py�������������������������������������������������������0000664�0000000�0000000�00000006765�15244322466�0021434�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import io from pathlib import Path import pytest from readme_renderer.rst import render @pytest.mark.parametrize( ("rst_filename", "html_filename"), [ (pytest.param(fn, fn.with_suffix(".html"), id=fn.name)) for fn in Path(__file__).parent.glob("fixtures/test_*.rst") ], ) def test_rst_fixtures(rst_filename, html_filename): # Get our Markup with open(rst_filename, encoding='utf-8') as f: rst_markup = f.read() # Get our expected with open(html_filename, encoding="utf-8") as f: expected = f.read() out = render(rst_markup) if "<" in expected: assert out == expected else: assert out is None def test_rst_001(): assert render('Hello') == '<p>Hello</p>\n' def test_rst_002(): assert render('http://mymalicioussite.com/') == ( '<p><a href="http://mymalicioussite.com/" rel="nofollow">' 'http://mymalicioussite.com/</a></p>\n' ) def test_rst_raw(): warnings = io.StringIO() assert render(""" .. raw:: html <script>I am evil</script> """, stream=warnings) is None assert '"raw" directive disabled' in warnings.getvalue() def test_rst_empty_file(): warnings = io.StringIO() assert render("", stream=warnings) is None assert "No content rendered from RST source." in warnings.getvalue() def test_rst_header_only(): """A document consisting of only a top-level heading renders that heading, rather than being treated as empty.""" warnings = io.StringIO() rendered = render(""" Header ====== """, stream=warnings) assert rendered is not None assert warnings.getvalue() == "" def test_header_and_malformed_emits_docutils_warning_only(): warnings = io.StringIO() assert render(""" Header ====== ====== """, stream=warnings) is None assert len(warnings.getvalue().splitlines()) == 1 assert "No content rendered from RST source." not in warnings.getvalue() def test_own_readme(): """Render the project's README.rst from root.""" readme = Path(__file__).parent.parent / "README.rst" rendered = render(readme.read_text(encoding="utf-8")) assert rendered is not None def test_image_with_scale_and_url_does_not_abort_render(): """ Issue #304: an rST image with :scale: and a remote URL must not abort the render. docutils tries to read the image to compute scaled size; with file_insertion_enabled=False that emits a WARNING/2 which our halt_level=2 turns into a fatal SystemMessage. The image should render without scale-derived dimensions instead. """ warnings = io.StringIO() rendered = render( ".. image:: https://example.com/badge.svg\n" " :scale: 50%\n", stream=warnings, ) assert rendered is not None assert '<img' in rendered assert 'https://example.com/badge.svg' in rendered def test_image_with_scale_and_explicit_dimensions_renders(): """ Regression guard for the scale-with-full-dims path, which bypasses read_size_with_PIL entirely (image_size short-circuits when both width and height are present). Locks in "renders without crashing"; does not assert how :scale: is applied to the dimensions. """ warnings = io.StringIO() rendered = render( ".. image:: https://example.com/badge.png\n" " :width: 200px\n" " :height: 100px\n" " :scale: 50%\n", stream=warnings, ) assert rendered is not None assert '<img' in rendered assert 'https://example.com/badge.png' in rendered �����������python-readme-renderer-46.0/tests/test_txt.py�������������������������������������������������������0000664�0000000�0000000�00000001164�15244322466�0021427�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from pathlib import Path import pytest from readme_renderer.txt import render @pytest.mark.parametrize( ("txt_filename", "html_filename"), [ (pytest.param(fn, fn.with_suffix(".html"), id=fn.name)) for fn in Path(__file__).parent.glob("fixtures/test_*.txt") ], ) def test_txt_fixtures(txt_filename, html_filename): # Get our Markup with open(txt_filename, encoding='utf-8') as f: txt_markup = f.read() # Get our expected with open(html_filename, encoding="utf-8") as f: expected = f.read() out = render(txt_markup) assert out.strip() == expected.strip() ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������python-readme-renderer-46.0/tox.ini�����������������������������������������������������������������0000664�0000000�0000000�00000002672�15244322466�0017355�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[tox] envlist = py{310, 311, 312, 313, 314} pypy{311} pep8 ruff packaging noextra mypy isolated_build = True [testenv] package = wheel wheel_build_env = build_wheel deps = pytest pytest-cov pytest-icdiff commands = pytest -Wall --strict-markers --cov {posargs} extras = md [testenv:mypy] basepython = python3 deps = mypy types-bleach types-docutils types-Pygments commands = mypy readme_renderer [testenv:pep8] basepython = python3 skip_install = true deps = flake8 pep8-naming commands = flake8 readme_renderer tests [testenv:ruff] skip_install = true deps = ruff commands = ruff check [testenv:packaging] deps = check-manifest build twine commands = check-manifest python -m build python -m twine check dist/* [testenv:noextra] basepython = python3 extras = # Without the `md` extra, importing readme_renderer.markdown warns at # collection time. That warning can't be wrapped in pytest.warns, so append a # filter that silences just it (a later -W wins) while reusing the base command. commands = {[testenv]commands} -W "ignore:Markdown renderers are not available:UserWarning:readme_renderer.markdown" [testenv:resourcewarnings] description = run tests with resource warnings enabled, slower but useful to catch leaks setenv = PYTHONTRACEMALLOC=20 commands = pytest -Wall --strict-markers {posargs} [flake8] select = E,W,F,N max-line-length = 88 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������