mailfmt 0.1.0__tar.gz → 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,29 @@
1
+ Metadata-Version: 2.4
2
+ Name: mailfmt
3
+ Version: 1.0.1
4
+ Summary: Heuristic plain text email formatter.
5
+ Project-URL: Repository, https://git.sr.ht/~ficd/mailfmt
6
+ Author-email: Daniel Fichtinger <daniel@ficd.ca>
7
+ License-Expression: ISC
8
+ License-File: LICENSE
9
+ Keywords: cli,email,formatter
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+
1
13
  <h1>Mail Format</h1>
2
14
 
3
15
  `mailfmt` is a simple plain text email formatter. It's designed to ensure
4
16
  consistent paragraph spacing while preserving markdown syntax, email headers,
5
17
  sign-offs, and signature blocks.
6
18
 
7
- By default, this script accepts its input on `stdin` and prints to `stdout`.
19
+ By default, the command accepts its input on `stdin` and prints to `stdout`.
8
20
  This makes it well suited for use as a formatter with a text editor like Kakoune
9
- or Helix. It has no dependencies besides the standard Python interpreter, and
10
- was written and tested against Python 3.13.3.
21
+ or Helix.
11
22
 
12
23
  <!--toc:start-->
13
24
 
14
25
  - [Features](#features)
26
+ - [Installation](#installation)
15
27
  - [Usage](#usage)
16
28
  - [Output Example](#output-example)
17
29
  - [Markdown Safety](#markdown-safety)
@@ -37,6 +49,28 @@ was written and tested against Python 3.13.3.
37
49
  - Use case: piping the output to `pandoc` to write a `text/html` message. See
38
50
  [Markdown Safety](#markdown-safety).
39
51
 
52
+ ## Installation
53
+
54
+ `mailfmt` is intended for use as a standaole tool. The package is available on
55
+ PyPI as `mailfmt`. I recommend using [uv](https://github.com/astral-sh/uv) or
56
+ `pipx` to install it so the `mailfmt` command is available on your path:
57
+
58
+ ```sh
59
+ uv tool install mailfmt
60
+ ```
61
+
62
+ Verify that the installation was successful:
63
+
64
+ ```sh
65
+ mailfmt --help
66
+ ```
67
+
68
+ The tool doesn't currently have any dependencies. Therefore, you can just
69
+ download and execute the
70
+ [mailfmt](https://git.sr.ht/~ficd/mailfmt/tree/main/item/mailfmt.py) script
71
+ directly. However, dependencies may be introduced later, so I recommend
72
+ installing with a Python package manager.
73
+
40
74
  ## Usage
41
75
 
42
76
  ```
@@ -1,26 +1,17 @@
1
- Metadata-Version: 2.4
2
- Name: mailfmt
3
- Version: 0.1.0
4
- Summary: Plain text email formatter
5
- Author-email: Daniel Fichtinger <daniel@ficd.ca>
6
- License-File: LICENSE
7
- Requires-Python: >=3.11
8
- Description-Content-Type: text/markdown
9
-
10
1
  <h1>Mail Format</h1>
11
2
 
12
3
  `mailfmt` is a simple plain text email formatter. It's designed to ensure
13
4
  consistent paragraph spacing while preserving markdown syntax, email headers,
14
5
  sign-offs, and signature blocks.
15
6
 
16
- By default, this script accepts its input on `stdin` and prints to `stdout`.
7
+ By default, the command accepts its input on `stdin` and prints to `stdout`.
17
8
  This makes it well suited for use as a formatter with a text editor like Kakoune
18
- or Helix. It has no dependencies besides the standard Python interpreter, and
19
- was written and tested against Python 3.13.3.
9
+ or Helix.
20
10
 
21
11
  <!--toc:start-->
22
12
 
23
13
  - [Features](#features)
14
+ - [Installation](#installation)
24
15
  - [Usage](#usage)
25
16
  - [Output Example](#output-example)
26
17
  - [Markdown Safety](#markdown-safety)
@@ -46,6 +37,28 @@ was written and tested against Python 3.13.3.
46
37
  - Use case: piping the output to `pandoc` to write a `text/html` message. See
47
38
  [Markdown Safety](#markdown-safety).
48
39
 
40
+ ## Installation
41
+
42
+ `mailfmt` is intended for use as a standaole tool. The package is available on
43
+ PyPI as `mailfmt`. I recommend using [uv](https://github.com/astral-sh/uv) or
44
+ `pipx` to install it so the `mailfmt` command is available on your path:
45
+
46
+ ```sh
47
+ uv tool install mailfmt
48
+ ```
49
+
50
+ Verify that the installation was successful:
51
+
52
+ ```sh
53
+ mailfmt --help
54
+ ```
55
+
56
+ The tool doesn't currently have any dependencies. Therefore, you can just
57
+ download and execute the
58
+ [mailfmt](https://git.sr.ht/~ficd/mailfmt/tree/main/item/mailfmt.py) script
59
+ directly. However, dependencies may be introduced later, so I recommend
60
+ installing with a Python package manager.
61
+
49
62
  ## Usage
50
63
 
51
64
  ```
mailfmt-1.0.1/justfile ADDED
@@ -0,0 +1,21 @@
1
+ clean:
2
+ #!/bin/sh
3
+ if [ ! -d "dist" ] && [ ! -d "__pycache__" ]; then
4
+ echo "Nothing to clean."
5
+ exit 0
6
+ fi
7
+ if [ -d "dist" ]; then
8
+ echo "Removing dist/"
9
+ rm -r dist/
10
+ fi
11
+ if [ -d "__pycache__" ]; then
12
+ echo "Removing __pycache__/"
13
+ rm -r "__pycache__"
14
+ fi
15
+ publish:
16
+ #!/bin/sh
17
+ just clean
18
+ uv build
19
+ export UV_PUBLISH_TOKEN="$(pass show pypi)"
20
+ uv publish
21
+
@@ -84,11 +84,12 @@ def main() -> None:
84
84
  return False
85
85
 
86
86
  parser = argparse.ArgumentParser(
87
- description='Formatter for plain text email.\n"--no-*" options are NOT passed by default.',
87
+ description="Heuristic formatter for plain text email. Preserves markup, signoffs, and signature blocks.",
88
88
  epilog="""
89
- Author : Daniel Fichtinger
90
- License: ISC
91
- Contact: daniel@ficd.ca
89
+ Author : Daniel Fichtinger
90
+ Repository: https://git.sr.ht/~ficd/mailfmt
91
+ License : ISC
92
+ Contact : daniel@ficd.ca
92
93
  """,
93
94
  formatter_class=argparse.RawDescriptionHelpFormatter,
94
95
  )
@@ -1,13 +1,19 @@
1
1
  [project]
2
2
  name = "mailfmt"
3
- version = "0.1.0"
4
- description = "Plain text email formatter"
3
+ version = "1.0.1"
4
+ description = "Heuristic plain text email formatter."
5
5
  readme = "README.md"
6
6
  authors = [
7
7
  { name = "Daniel Fichtinger", email = "daniel@ficd.ca" }
8
8
  ]
9
9
  requires-python = ">=3.11"
10
10
  dependencies = []
11
+ license = "ISC"
12
+ license-files = ["LICENSE"]
13
+ keywords = ["email", "formatter", "cli"]
14
+
15
+ [project.urls]
16
+ Repository = "https://git.sr.ht/~ficd/mailfmt"
11
17
 
12
18
  [project.scripts]
13
19
  mailfmt = "mailfmt:main"
@@ -4,5 +4,5 @@ requires-python = ">=3.11"
4
4
 
5
5
  [[package]]
6
6
  name = "mailfmt"
7
- version = "0.1.0"
7
+ version = "1.0.1"
8
8
  source = { editable = "." }
File without changes
File without changes
File without changes