Compare commits

..

2 Commits

Author SHA1 Message Date
AlexVonB
e249e58818 fix github action to work with tox 2022-08-28 21:39:26 +02:00
AlexVonB
2840653e29 switching to tox 2022-08-28 21:38:06 +02:00
5 changed files with 7 additions and 30 deletions

View File

@@ -175,7 +175,7 @@ change:
Command Line Interface
======================
=====================
Use ``markdownify example.html > example.md`` or pipe input from stdin
(``cat example.html | markdownify > example.md``).

View File

@@ -3,8 +3,7 @@
import argparse
import sys
from markdownify import markdownify, ATX, ATX_CLOSED, UNDERLINED, \
SPACES, BACKSLASH, ASTERISK, UNDERSCORE
from markdownify import markdownify
def main(argv=sys.argv[1:]):
@@ -29,23 +28,16 @@ def main(argv=sys.argv[1:]):
parser.add_argument('--default-title', action='store_false',
help="A boolean to enable setting the title of a link to its "
"href, if no title is given.")
parser.add_argument('--heading-style', default=UNDERLINED,
choices=(ATX, ATX_CLOSED, UNDERLINED),
parser.add_argument('--heading-style',
choices=('ATX', 'ATX_CLOSED', 'SETEXT', 'UNDERLINED'),
help="Defines how headings should be converted.")
parser.add_argument('-b', '--bullets', default='*+-',
help="A string of bullet styles to use; the bullet will "
"alternate based on nesting level.")
parser.add_argument('--strong-em-symbol', default=ASTERISK,
choices=(ASTERISK, UNDERSCORE),
help="Use * or _ to convert strong and italics text"),
parser.add_argument('--sub-symbol', default='',
help="Define the chars that surround '<sub>'.")
parser.add_argument('--sup-symbol', default='',
help="Define the chars that surround '<sup>'.")
parser.add_argument('--newline-style', default=SPACES,
choices=(SPACES, BACKSLASH),
help="Defines the style of <br> conversions: two spaces "
"or backslash at the and of the line thet should break.")
parser.add_argument('--code-language', default='',
help="Defines the language that should be assumed for all "
"'<pre>' sections.")

View File

@@ -9,7 +9,7 @@ read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
pkgmeta = {
'__title__': 'markdownify',
'__author__': 'Matthew Tretter',
'__version__': '0.11.6',
'__version__': '0.11.2',
}
read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()

View File

@@ -1,10 +0,0 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "python-shell";
buildInputs = with pkgs; [
python38
python38Packages.tox
python38Packages.setuptools
python38Packages.virtualenv
];
}

View File

@@ -2,14 +2,9 @@
envlist = py38
[testenv]
passenv = PYTHONPATH
deps =
pytest
flake8
restructuredtext_lint
Pygments
commands =
pytest
commands =
flake8 --ignore=E501,W503 markdownify tests
restructuredtext-lint README.rst
pytest