echo-words 0.0.1__py3-none-any.whl
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.
- echo_words/__about__.py +1 -0
- echo_words/__init__.py +9 -0
- echo_words/main.py +33 -0
- echo_words-0.0.1.dist-info/METADATA +81 -0
- echo_words-0.0.1.dist-info/RECORD +8 -0
- echo_words-0.0.1.dist-info/WHEEL +4 -0
- echo_words-0.0.1.dist-info/entry_points.txt +2 -0
- echo_words-0.0.1.dist-info/licenses/LICENSE +20 -0
echo_words/__about__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.1"
|
echo_words/__init__.py
ADDED
echo_words/main.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""echo-words."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
import rich_click as click
|
|
6
|
+
|
|
7
|
+
from echo_words import __version__
|
|
8
|
+
|
|
9
|
+
click.rich_click.USE_MARKDOWN = True
|
|
10
|
+
OUTPUT_FILE_DEFAULT = "output"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@click.command()
|
|
14
|
+
@click.version_option(version=__version__, prog_name="echo-words")
|
|
15
|
+
@click.argument("input_file", type=click.Path(exists=True))
|
|
16
|
+
@click.argument("output_file", type=click.Path(), required=False)
|
|
17
|
+
@click.option("--force", is_flag=True, help="Overwrite the output file if it exists.")
|
|
18
|
+
def echo_words(input_file: str, output_file: str, force: bool) -> None:
|
|
19
|
+
"""
|
|
20
|
+
`INPUT_FILE` to `OUTPUT_FILE`.
|
|
21
|
+
"""
|
|
22
|
+
output_path = (
|
|
23
|
+
Path(output_file) if output_file else Path(input_file).parent / f"{OUTPUT_FILE_DEFAULT}.txt"
|
|
24
|
+
)
|
|
25
|
+
if output_path.exists() and not force:
|
|
26
|
+
click.echo(f"Output file {output_path} already exists. Use --force to overwrite.")
|
|
27
|
+
raise click.Abort()
|
|
28
|
+
|
|
29
|
+
click.echo(f"File saved to {output_path}")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__": # pragma: no cover
|
|
33
|
+
echo_words() # pylint: disable=no-value-for-parameter
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: echo-words
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Turns words into rich linguistic insights and automatically adds them to your spaced repetition system.
|
|
5
|
+
Project-URL: Homepage, https://andgineer.github.io/echo-words/
|
|
6
|
+
Project-URL: Documentation, https://andgineer.github.io/echo-words/
|
|
7
|
+
Author-email: Andrey Sorokin <andrey@sorokin.engineer>
|
|
8
|
+
License: Copyright (c) 2026 Andrey Sorokin (andrey@sorokin.engineer)
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
+
this software and associated documentation files (the “Software”), to deal in
|
|
12
|
+
the Software without restriction, including without limitation the rights to use,
|
|
13
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
14
|
+
Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
+
subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
|
21
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
22
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
23
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
24
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
25
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
26
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
27
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Keywords: one,two
|
|
30
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
31
|
+
Classifier: Operating System :: OS Independent
|
|
32
|
+
Classifier: Programming Language :: Python :: 3
|
|
33
|
+
Requires-Python: >=3.12
|
|
34
|
+
Requires-Dist: click>=8.2.0
|
|
35
|
+
Requires-Dist: rich-click>=1.8.8
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
[](https://github.com/andgineer/echo-words/actions)
|
|
39
|
+
[](https://htmlpreview.github.io/?https://github.com/andgineer/echo-words/blob/python-coverage-comment-action-data/htmlcov/index.html)
|
|
40
|
+
# echo-words
|
|
41
|
+
|
|
42
|
+
Turns words into rich linguistic insights and automatically adds them to your spaced repetition system.
|
|
43
|
+
|
|
44
|
+
# Documentation
|
|
45
|
+
|
|
46
|
+
[Echo Words](https://andgineer.github.io/echo-words/)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# Developers
|
|
51
|
+
|
|
52
|
+
Do not forget to run `. ./activate.sh`.
|
|
53
|
+
|
|
54
|
+
For work it need [uv](https://github.com/astral-sh/uv) installed.
|
|
55
|
+
|
|
56
|
+
Use [pre-commit](https://pre-commit.com/#install) hooks for code quality:
|
|
57
|
+
|
|
58
|
+
pre-commit install
|
|
59
|
+
|
|
60
|
+
## Allure test report
|
|
61
|
+
|
|
62
|
+
* [Allure report](https://andgineer.github.io/echo-words/builds/tests/)
|
|
63
|
+
|
|
64
|
+
# Scripts
|
|
65
|
+
Install [invoke](https://docs.pyinvoke.org/en/stable/) preferably with [uv tool](https://docs.astral.sh/uv/):
|
|
66
|
+
|
|
67
|
+
uv tool install invoke
|
|
68
|
+
|
|
69
|
+
For a list of available scripts run:
|
|
70
|
+
|
|
71
|
+
invoke --list
|
|
72
|
+
|
|
73
|
+
For more information about a script run:
|
|
74
|
+
|
|
75
|
+
invoke <script> --help
|
|
76
|
+
|
|
77
|
+
## Coverage report
|
|
78
|
+
* [Codecov](https://app.codecov.io/gh/andgineer/echo-words/tree/main/src%2Fecho_words)
|
|
79
|
+
* [Coveralls](https://coveralls.io/github/andgineer/echo-words)
|
|
80
|
+
|
|
81
|
+
> Created with cookiecutter using [template](https://github.com/andgineer/cookiecutter-python-package)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
echo_words/__about__.py,sha256=sXLh7g3KC4QCFxcZGBTpG2scR7hmmBsMjq6LqRptkRg,22
|
|
2
|
+
echo_words/__init__.py,sha256=xmbukzvvyevTrGyzsUFYnBUGWydEXXPIT2Ce5XoeNYo,245
|
|
3
|
+
echo_words/main.py,sha256=_sAF1tlXvxnVNI24-1mumpcanQkyvpd_FHYHPhMWB4g,1044
|
|
4
|
+
echo_words-0.0.1.dist-info/METADATA,sha256=dQ9NYw0iIQBCXv3BABvNi2HMSr00A1EzegQQKyfTJUI,3357
|
|
5
|
+
echo_words-0.0.1.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
6
|
+
echo_words-0.0.1.dist-info/entry_points.txt,sha256=tH2n_LIU_BVDQ0vsvitg-OA5KgzLrSXn6CoIHjXrtFA,58
|
|
7
|
+
echo_words-0.0.1.dist-info/licenses/LICENSE,sha256=CrbPl97iXSebTX8ZptPQ4qaodksrPewoUoDz8rwaapc,1092
|
|
8
|
+
echo_words-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2026 Andrey Sorokin (andrey@sorokin.engineer)
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the “Software”), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to use,
|
|
6
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
7
|
+
Software, and to permit persons to whom the Software is furnished to do so,
|
|
8
|
+
subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
|
14
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
15
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
16
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
18
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
19
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
20
|
+
OTHER DEALINGS IN THE SOFTWARE.
|