Preparing to transfer README from rst to markdown.

This commit is contained in:
Franco Masotti 2022-05-07 18:40:04 +02:00
parent b9208e64a0
commit cf26b10d1a
Signed by: frnmst
GPG Key ID: 24116ED85666780A
7 changed files with 22 additions and 10 deletions

2
.gitignore vendored
View File

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

View File

@ -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/*']

View File

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

View File

@ -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

View File

@ -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

0
README.md Normal file
View File

View File

@ -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'],
},