flowmark 0.2.0__tar.gz → 0.2.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.
- {flowmark-0.2.0 → flowmark-0.2.1}/PKG-INFO +20 -2
- {flowmark-0.2.0 → flowmark-0.2.1}/README.md +19 -1
- {flowmark-0.2.0 → flowmark-0.2.1}/pyproject.toml +1 -1
- {flowmark-0.2.0 → flowmark-0.2.1}/src/flowmark/cli.py +19 -9
- {flowmark-0.2.0 → flowmark-0.2.1}/LICENSE +0 -0
- {flowmark-0.2.0 → flowmark-0.2.1}/src/flowmark/__init__.py +0 -0
- {flowmark-0.2.0 → flowmark-0.2.1}/src/flowmark/line_wrappers.py +0 -0
- {flowmark-0.2.0 → flowmark-0.2.1}/src/flowmark/markdown_filling.py +0 -0
- {flowmark-0.2.0 → flowmark-0.2.1}/src/flowmark/sentence_split_regex.py +0 -0
- {flowmark-0.2.0 → flowmark-0.2.1}/src/flowmark/text_filling.py +0 -0
- {flowmark-0.2.0 → flowmark-0.2.1}/src/flowmark/text_wrapping.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: flowmark
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Better line wrapping and formatting for plaintext and Markdown
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Joshua Levy
|
|
@@ -54,7 +54,7 @@ command line usage and VSCode/Cursor auto-formatting in the future.
|
|
|
54
54
|
|
|
55
55
|
## Installation
|
|
56
56
|
|
|
57
|
-
The simplest way to use the tool is to use pipx:
|
|
57
|
+
The simplest way to use the tool is to use [pipx](https://github.com/pypa/pipx):
|
|
58
58
|
|
|
59
59
|
```shell
|
|
60
60
|
pipx install flowmark
|
|
@@ -62,6 +62,24 @@ pipx install flowmark
|
|
|
62
62
|
|
|
63
63
|
To use as a library, use pip or poetry to install `flowmark`.
|
|
64
64
|
|
|
65
|
+
## Use in VSCode/Cursor
|
|
66
|
+
|
|
67
|
+
You can use Flowmark to auto-format Markdown on save in VSCode or Cursor. Install
|
|
68
|
+
the "Run on Save" (`emeraldwalk.runonsave`) extension. Then add to your `settings.json`:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
"emeraldwalk.runonsave": {
|
|
72
|
+
"commands": [
|
|
73
|
+
{
|
|
74
|
+
"match": "\\.md$",
|
|
75
|
+
"cmd": "flowmark --auto ${file}"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The `--auto` option is just the same as `--inplace --nobackup --sentences`.
|
|
82
|
+
|
|
65
83
|
## Usage
|
|
66
84
|
|
|
67
85
|
Flowmark can be used as a library or as a CLI.
|
|
@@ -35,7 +35,7 @@ command line usage and VSCode/Cursor auto-formatting in the future.
|
|
|
35
35
|
|
|
36
36
|
## Installation
|
|
37
37
|
|
|
38
|
-
The simplest way to use the tool is to use pipx:
|
|
38
|
+
The simplest way to use the tool is to use [pipx](https://github.com/pypa/pipx):
|
|
39
39
|
|
|
40
40
|
```shell
|
|
41
41
|
pipx install flowmark
|
|
@@ -43,6 +43,24 @@ pipx install flowmark
|
|
|
43
43
|
|
|
44
44
|
To use as a library, use pip or poetry to install `flowmark`.
|
|
45
45
|
|
|
46
|
+
## Use in VSCode/Cursor
|
|
47
|
+
|
|
48
|
+
You can use Flowmark to auto-format Markdown on save in VSCode or Cursor. Install
|
|
49
|
+
the "Run on Save" (`emeraldwalk.runonsave`) extension. Then add to your `settings.json`:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
"emeraldwalk.runonsave": {
|
|
53
|
+
"commands": [
|
|
54
|
+
{
|
|
55
|
+
"match": "\\.md$",
|
|
56
|
+
"cmd": "flowmark --auto ${file}"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The `--auto` option is just the same as `--inplace --nobackup --sentences`.
|
|
63
|
+
|
|
46
64
|
## Usage
|
|
47
65
|
|
|
48
66
|
Flowmark can be used as a library or as a CLI.
|
|
@@ -93,7 +93,7 @@ def _parse_args(args: Optional[List[str]] = None) -> Options:
|
|
|
93
93
|
"-s",
|
|
94
94
|
"--sentences",
|
|
95
95
|
action="store_true",
|
|
96
|
-
default=
|
|
96
|
+
default=False,
|
|
97
97
|
help="Enable sentence-based line breaks (only applies to Markdown mode)",
|
|
98
98
|
)
|
|
99
99
|
parser.add_argument(
|
|
@@ -104,16 +104,26 @@ def _parse_args(args: Optional[List[str]] = None) -> Options:
|
|
|
104
104
|
action="store_true",
|
|
105
105
|
help="Do not make a backup of the original file when using --inplace",
|
|
106
106
|
)
|
|
107
|
-
|
|
107
|
+
parser.add_argument(
|
|
108
|
+
"--auto",
|
|
109
|
+
action="store_true",
|
|
110
|
+
help="Same as `--inplace --nobackup --sentences`, as a convenience for auto-formatting files",
|
|
111
|
+
)
|
|
112
|
+
opts = parser.parse_args(args)
|
|
113
|
+
|
|
114
|
+
if opts.auto:
|
|
115
|
+
opts.inplace = True
|
|
116
|
+
opts.nobackup = True
|
|
117
|
+
opts.sentences = True
|
|
108
118
|
|
|
109
119
|
return Options(
|
|
110
|
-
file=
|
|
111
|
-
output=
|
|
112
|
-
width=
|
|
113
|
-
plaintext=
|
|
114
|
-
sentences=
|
|
115
|
-
inplace=
|
|
116
|
-
nobackup=
|
|
120
|
+
file=opts.file,
|
|
121
|
+
output=opts.output,
|
|
122
|
+
width=opts.width,
|
|
123
|
+
plaintext=opts.plaintext,
|
|
124
|
+
sentences=opts.sentences,
|
|
125
|
+
inplace=opts.inplace,
|
|
126
|
+
nobackup=opts.nobackup,
|
|
117
127
|
)
|
|
118
128
|
|
|
119
129
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|