mail2task 0.1.0__tar.gz → 0.2.0__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.
- {mail2task-0.1.0 → mail2task-0.2.0}/PKG-INFO +19 -1
- {mail2task-0.1.0 → mail2task-0.2.0}/README.md +12 -0
- mail2task-0.2.0/pyproject.toml +40 -0
- mail2task-0.2.0/src/mail2task/cli.py +52 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task.egg-info/PKG-INFO +19 -1
- mail2task-0.1.0/pyproject.toml +0 -23
- mail2task-0.1.0/src/mail2task/cli.py +0 -25
- {mail2task-0.1.0 → mail2task-0.2.0}/setup.cfg +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task/__init__.py +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task/extractor.py +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task/parser.py +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task.egg-info/SOURCES.txt +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task.egg-info/dependency_links.txt +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task.egg-info/entry_points.txt +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task.egg-info/requires.txt +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/src/mail2task.egg-info/top_level.txt +0 -0
- {mail2task-0.1.0 → mail2task-0.2.0}/tests/test_extractor.py +0 -0
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mail2task
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Extract actionable tasks from emails using Python
|
|
5
5
|
Author: Eby J Kavungal
|
|
6
|
+
Project-URL: Homepage, https://github.com/EbyJK/mail2task
|
|
7
|
+
Project-URL: Repository, https://github.com/EbyJK/mail2task
|
|
8
|
+
Keywords: nlp,tasks,email,automation,productivity
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
6
12
|
Requires-Python: >=3.9
|
|
7
13
|
Description-Content-Type: text/markdown
|
|
8
14
|
Requires-Dist: dateparser
|
|
@@ -76,6 +82,18 @@ Output:
|
|
|
76
82
|
]
|
|
77
83
|
```
|
|
78
84
|
|
|
85
|
+
### Pretty Output
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
mail2task sample_email.txt --pretty
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Save Output
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
mail2task sample_email.txt --output tasks.json
|
|
95
|
+
```
|
|
96
|
+
|
|
79
97
|
---
|
|
80
98
|
|
|
81
99
|
## Example Use Cases
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mail2task"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Extract actionable tasks from emails using Python"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name="Eby J Kavungal" }
|
|
11
|
+
]
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
|
|
15
|
+
dependencies = [
|
|
16
|
+
"dateparser"
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
keywords = ["nlp", "tasks", "email", "automation", "productivity"]
|
|
20
|
+
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"License :: OSI Approved :: MIT License",
|
|
24
|
+
"Operating System :: OS Independent",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/EbyJK/mail2task"
|
|
31
|
+
Repository = "https://github.com/EbyJK/mail2task"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
[project.scripts]
|
|
35
|
+
mail2task = "mail2task.cli:main"
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.packages.find]
|
|
38
|
+
where = ["src"]
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import json
|
|
3
|
+
from .extractor import extract_tasks
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def main():
|
|
7
|
+
parser = argparse.ArgumentParser(
|
|
8
|
+
description="Extract actionable tasks from emails"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
parser.add_argument(
|
|
12
|
+
"file",
|
|
13
|
+
help="Path to the email text file"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
parser.add_argument(
|
|
17
|
+
"--pretty",
|
|
18
|
+
action="store_true",
|
|
19
|
+
help="Pretty print the output"
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
parser.add_argument(
|
|
23
|
+
"--output",
|
|
24
|
+
help="Save output to a JSON file"
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
args = parser.parse_args()
|
|
28
|
+
|
|
29
|
+
try:
|
|
30
|
+
with open(args.file, "r", encoding="utf-8") as f:
|
|
31
|
+
content = f.read()
|
|
32
|
+
|
|
33
|
+
tasks = extract_tasks(content)
|
|
34
|
+
|
|
35
|
+
if args.pretty:
|
|
36
|
+
result = json.dumps(tasks, indent=2)
|
|
37
|
+
else:
|
|
38
|
+
result = json.dumps(tasks)
|
|
39
|
+
|
|
40
|
+
print(result)
|
|
41
|
+
|
|
42
|
+
if args.output:
|
|
43
|
+
with open(args.output, "w", encoding="utf-8") as out_file:
|
|
44
|
+
out_file.write(result)
|
|
45
|
+
|
|
46
|
+
print(f"\nSaved output to {args.output}")
|
|
47
|
+
|
|
48
|
+
except FileNotFoundError:
|
|
49
|
+
print(f"File not found: {args.file}")
|
|
50
|
+
|
|
51
|
+
except Exception as e:
|
|
52
|
+
print(f"Error: {e}")
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mail2task
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Extract actionable tasks from emails using Python
|
|
5
5
|
Author: Eby J Kavungal
|
|
6
|
+
Project-URL: Homepage, https://github.com/EbyJK/mail2task
|
|
7
|
+
Project-URL: Repository, https://github.com/EbyJK/mail2task
|
|
8
|
+
Keywords: nlp,tasks,email,automation,productivity
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
6
12
|
Requires-Python: >=3.9
|
|
7
13
|
Description-Content-Type: text/markdown
|
|
8
14
|
Requires-Dist: dateparser
|
|
@@ -76,6 +82,18 @@ Output:
|
|
|
76
82
|
]
|
|
77
83
|
```
|
|
78
84
|
|
|
85
|
+
### Pretty Output
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
mail2task sample_email.txt --pretty
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Save Output
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
mail2task sample_email.txt --output tasks.json
|
|
95
|
+
```
|
|
96
|
+
|
|
79
97
|
---
|
|
80
98
|
|
|
81
99
|
## Example Use Cases
|
mail2task-0.1.0/pyproject.toml
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=61.0"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "mail2task"
|
|
7
|
-
version = "0.1.0"
|
|
8
|
-
description = "Extract actionable tasks from emails using Python"
|
|
9
|
-
authors = [
|
|
10
|
-
{ name="Eby J Kavungal" }
|
|
11
|
-
]
|
|
12
|
-
readme = "README.md"
|
|
13
|
-
requires-python = ">=3.9"
|
|
14
|
-
|
|
15
|
-
dependencies = [
|
|
16
|
-
"dateparser"
|
|
17
|
-
]
|
|
18
|
-
|
|
19
|
-
[project.scripts]
|
|
20
|
-
mail2task = "mail2task.cli:main"
|
|
21
|
-
|
|
22
|
-
[tool.setuptools.packages.find]
|
|
23
|
-
where = ["src"]
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
import json
|
|
3
|
-
from .extractor import extract_tasks
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def main():
|
|
7
|
-
if len(sys.argv) < 2:
|
|
8
|
-
print("Usage: mail2task <file>")
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
file_path = sys.argv[1]
|
|
12
|
-
|
|
13
|
-
try:
|
|
14
|
-
with open(file_path, "r", encoding="utf-8") as f:
|
|
15
|
-
content = f.read()
|
|
16
|
-
|
|
17
|
-
tasks = extract_tasks(content)
|
|
18
|
-
|
|
19
|
-
print(json.dumps(tasks, indent=2))
|
|
20
|
-
|
|
21
|
-
except FileNotFoundError:
|
|
22
|
-
print(f"File not found: {file_path}")
|
|
23
|
-
|
|
24
|
-
except Exception as e:
|
|
25
|
-
print(f"Error: {e}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|