Prepare package for PyPI upload
This commit is contained in:
parent
9d5fff7dba
commit
6e717a277b
3 changed files with 32 additions and 7 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,3 +1,3 @@
|
||||||
index.html
|
build
|
||||||
test/
|
dist
|
||||||
venv/
|
**/*.egg-info
|
||||||
|
|
|
||||||
25
pyproject.toml
Normal file
25
pyproject.toml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
[project]
|
||||||
|
name = "wsdiff"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = [{name="jaseg", email="code@jaseg.de"}]
|
||||||
|
description = "wsdiff is a tool that produces a syntax-highlighted, self-contained, static HTML file that will show a colored, syntax-highlighted diff of two files or folders without external dependencies or javascript."
|
||||||
|
requires-python = ">=3.7"
|
||||||
|
readme = "README.md"
|
||||||
|
classifiers = [
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: MIT License",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
]
|
||||||
|
dependencies = ["pygments"]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
"Source" = "https://git.jaseg.de/wsdiff.git"
|
||||||
|
"Bug Tracker" = "https://github.com/jaseg/wsdiff/issues"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
wsdiff = "wsdiff:cli"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=61.0"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
|
@ -639,10 +639,8 @@ def html_diff_block(old, new, filename, lexer):
|
||||||
</div>''')
|
</div>''')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def cli():
|
||||||
description = "Given two source files or directories this application creates an html page that highlights the differences between the two."
|
parser = argparse.ArgumentParser(description="Given two source files or directories this application creates an html page that highlights the differences between the two.")
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description=description)
|
|
||||||
parser.add_argument('-b', '--open', action='store_true', help='Open output file in a browser')
|
parser.add_argument('-b', '--open', action='store_true', help='Open output file in a browser')
|
||||||
parser.add_argument('-s', '--syntax-css', help='Path to custom Pygments CSS file for code syntax highlighting')
|
parser.add_argument('-s', '--syntax-css', help='Path to custom Pygments CSS file for code syntax highlighting')
|
||||||
parser.add_argument('-l', '--lexer', help='Manually select pygments lexer (default: guess from filename, use -L to list available lexers.)')
|
parser.add_argument('-l', '--lexer', help='Manually select pygments lexer (default: guess from filename, use -L to list available lexers.)')
|
||||||
|
|
@ -740,3 +738,5 @@ if __name__ == "__main__":
|
||||||
if args.open:
|
if args.open:
|
||||||
webbrowser.open('file://' + str(Path(args.output.name).absolute()))
|
webbrowser.open('file://' + str(Path(args.output.name).absolute()))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
cli()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue