Compare commits
3 commits
9c6ae12284
...
1aa4455de0
Author | SHA1 | Date | |
---|---|---|---|
1aa4455de0 | |||
c2d2780e4a | |||
f490e10f1f |
4 changed files with 39 additions and 8 deletions
20
.forgejo/workflows/publish.yml
Normal file
20
.forgejo/workflows/publish.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: based-alpine
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: setup cache
|
||||||
|
id: uv-cache
|
||||||
|
uses: https://git.ficd.sh/ficd/uv-cache@v1
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
uv sync
|
||||||
|
uv build
|
||||||
|
- name: publish
|
||||||
|
run: |
|
||||||
|
uv publish --token ${{ secrets.PYPI_TOKEN }}
|
||||||
|
|
21
mailfmt.py
21
mailfmt.py
|
@ -11,10 +11,11 @@
|
||||||
# Author: Daniel Fichtinger
|
# Author: Daniel Fichtinger
|
||||||
# License: ISC
|
# License: ISC
|
||||||
|
|
||||||
import textwrap
|
|
||||||
import sys
|
|
||||||
import re
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
import textwrap
|
||||||
|
from importlib.metadata import version
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
|
@ -87,12 +88,19 @@ def main() -> None:
|
||||||
description="Heuristic formatter for plain text email. Preserves markup, signoffs, and signature blocks.",
|
description="Heuristic formatter for plain text email. Preserves markup, signoffs, and signature blocks.",
|
||||||
epilog="""
|
epilog="""
|
||||||
Author : Daniel Fichtinger
|
Author : Daniel Fichtinger
|
||||||
Repository: https://git.sr.ht/~ficd/mailfmt
|
Repository: https://git.ficd.sh/ficd/mailfmt
|
||||||
License : ISC
|
License : ISC
|
||||||
Contact : daniel@ficd.ca
|
Contact : daniel@ficd.sh
|
||||||
""",
|
""",
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-v",
|
||||||
|
"--version",
|
||||||
|
required=False,
|
||||||
|
help="Print version info and exit.",
|
||||||
|
action="store_true",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-w",
|
"-w",
|
||||||
"--width",
|
"--width",
|
||||||
|
@ -162,6 +170,9 @@ Contact : daniel@ficd.ca
|
||||||
help="Output file. (default: %(default)s)",
|
help="Output file. (default: %(default)s)",
|
||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
if args.version:
|
||||||
|
print(version("mailfmt"))
|
||||||
|
exit(0)
|
||||||
width = args.width
|
width = args.width
|
||||||
should_check_signoff = args.no_signoff
|
should_check_signoff = args.no_signoff
|
||||||
should_check_signature = args.no_signature
|
should_check_signature = args.no_signature
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
[project]
|
[project]
|
||||||
name = "mailfmt"
|
name = "mailfmt"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
description = "Heuristic plain text email formatter."
|
description = "Heuristic plain text email formatter."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Daniel Fichtinger", email = "daniel@ficd.ca" }
|
{ name = "Daniel Fichtinger", email = "daniel@ficd.sh" }
|
||||||
]
|
]
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
2
uv.lock
generated
2
uv.lock
generated
|
@ -4,5 +4,5 @@ requires-python = ">=3.11"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mailfmt"
|
name = "mailfmt"
|
||||||
version = "1.0.1"
|
version = "1.0.3"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue