Browse Source

Preparing to transfer README from rst to markdown.

master
Franco Masotti 3 months ago
parent
commit
cf26b10d1a
Signed by: frnmst
GPG Key ID: 24116ED85666780A
  1. 2
      .gitignore
  2. 12
      .pre-commit-config.yaml
  3. 3
      CONTRIBUTING.md
  4. 4
      MANIFEST.in
  5. 4
      Makefile
  6. 0
      README.md
  7. 7
      setup.py

2
.gitignore vendored

@ -2,6 +2,8 @@ Pipfile.lock
*.md
*.MD
tests/benchmark-results
!README.md
!CONTRIBUTING.md
# Byte-compiled / optimized / DLL files
__pycache__/

12
.pre-commit-config.yaml

@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@ -28,7 +28,7 @@ repos:
additional_dependencies: [flake8-docstrings]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.1' # Use the sha / tag you want to point at
rev: '1.7.4' # Use the sha / tag you want to point at
hooks:
- id: bandit
args: ['--skip', 'B404,B506,B410,B603', '--level', 'LOW']
@ -50,8 +50,14 @@ repos:
- id: licheck
args: ['--configuration-file', '.allowed_licenses.yml']
- repo: https://codeberg.org/frnmst/md-toc
rev: '8.1.3' # or a specific git tag from md-toc
hooks:
- id: md-toc
args: [-p, 'cmark', '-l6'] # CLI options
- repo: https://github.com/mgedmin/check-manifest
rev: "0.47"
rev: "0.48"
hooks:
- id: check-manifest
args: ['--ignore','docs/*,docs/assets/*,docs/rules/*,docs/_static/*,docs/_static/css/*,Pipfile,Makefile,asciinema/*,*.yaml,*.yml,assets/*,md_toc/tests/*,packages/aur/*']

3
CONTRIBUTING.rst → CONTRIBUTING.md

@ -1,4 +1,3 @@
Contributing
============
# Contributing
See https://docs.franco.net.eu.org/md-toc/contributing.html

4
MANIFEST.in

@ -1,4 +1,4 @@
global-include LICENSE.txt
global-include README.rst
global-include CONTRIBUTING.rst
global-include README.md
global-include CONTRIBUTING.md
recursive-include md_toc/cmark *.py

4
Makefile

@ -68,7 +68,9 @@ upload:
pipenv run twine upload dist/*
clean:
rm -rf build dist *.egg-info tests/benchmark-results *.md
rm -rf build dist *.egg-info tests/benchmark-results
# Remove all markdown files except the readme.
find -regex ".*\.[mM][dD]" ! -name 'README.md' ! -name 'CONTRIBUTING.md' -type f -exec rm -f {} +
pipenv run $(MAKE) -C docs clean
.PHONY: default doc install uninstall install-dev uninstall-dev update test clean demo

7
setup.py

@ -22,14 +22,17 @@ r"""setup.py."""
from setuptools import find_packages, setup
with open('README.md', 'r', encoding='utf-8') as f:
readme = f.read()
setup(
name='md_toc',
version='8.1.3',
packages=find_packages(exclude=['*tests*']),
license='GPLv3+',
description='A utility that is able to generate a table of contents for a markdown file.',
long_description=open('README.rst').read(),
long_description_content_type='text/x-rst',
long_description=readme,
long_description_content_type='text/markdown',
package_data={
'': ['*.txt', '*.rst'],
},

Loading…
Cancel
Save