jodie 0.1.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.
jodie-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.4
2
+ Name: jodie
3
+ Version: 0.1.0
4
+ Summary: Jodie lets you add contacts to Contacts.app on macOS from command line
5
+ Author-email: austin <tips@cia.lol>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/austinogilvie/jodie
8
+ Project-URL: Repository, https://github.com/austinogilvie/jodie
9
+ Project-URL: Issues, https://github.com/austinogilvie/jodie/issues
10
+ Keywords: macOS,Contacts.app,Contact management,Contacts,command line tool,CLI
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Communications :: Email :: Address Book
22
+ Classifier: Topic :: Utilities
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+ Requires-Dist: docopt~=0.6.2
26
+ Requires-Dist: nameparser==1.1.3
27
+ Requires-Dist: tomli>=2.0; python_version < "3.11"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7.0; extra == "dev"
30
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
31
+
32
+ # Jodie
33
+
34
+ A command line tool to quickly save new contacts to Contacts.app on macOS.
35
+
36
+ Named for [Jodie Foster](https://en.wikipedia.org/wiki/Jodie_Foster) for her stellar performance in [Contact](https://en.wikipedia.org/wiki/Contact_(1997_American_film)).
37
+
38
+ ![Jodie Foster in Contact](jodie-foster-contact.gif)
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ git clone git@github.com:austinogilvie/jodie.git
44
+ cd jodie
45
+ pip install .
46
+ ```
47
+
48
+ After installation, both `jodie` and `jodie-cli` commands are available.
49
+
50
+ ## Quick Start
51
+
52
+ ```bash
53
+ # Smart parsing (default) - jodie figures out what's what
54
+ jodie new "John Doe" john@acme.com "Acme Inc" "CEO"
55
+
56
+ # Preview before saving
57
+ jodie new "John Doe" john@acme.com --dry-run
58
+
59
+ # Parse from clipboard (copy an email signature first)
60
+ jodie new --paste
61
+
62
+ # Parse from stdin
63
+ echo "John Doe <john@acme.com>" | jodie new --stdin
64
+ ```
65
+
66
+ ## Usage
67
+
68
+ ```
69
+ jodie - Manage macOS Contacts.app from command line!
70
+
71
+ Usage:
72
+ jodie new TEXT... [options]
73
+ jodie new [options]
74
+ jodie new --paste [options]
75
+ jodie new --stdin [options]
76
+ jodie new --explicit EMAIL NAME [COMPANY] [TITLE]
77
+
78
+ Arguments:
79
+ TEXT Text for jodie to parse intelligently (default mode).
80
+ EMAIL Email address (used with --explicit).
81
+ NAME Full name (used with --explicit).
82
+ COMPANY Company name (used with --explicit).
83
+ TITLE Job title (used with --explicit).
84
+
85
+ Options:
86
+ --explicit Use strict positional parsing.
87
+ --paste Read input from clipboard (pbpaste).
88
+ --stdin Read input from stdin (pipe/heredoc).
89
+ -D --dry-run Preview parsed fields without saving.
90
+
91
+ -E EMAIL --email=EMAIL Email address.
92
+ -F FIRST --first=FIRST First name.
93
+ -L LAST --last=LAST Last name.
94
+ -U NAME --full-name=NAME Full name (or use --name).
95
+ -P PHONE --phone=PHONE Phone number.
96
+ -T TITLE --title=TITLE Job title.
97
+ -C COMPANY --company=COMPANY Company name.
98
+ -W URL --websites=URL Comma-separated website URLs.
99
+ --linkedin=URL LinkedIn URL (auto-labeled).
100
+
101
+ -H --help Show this screen.
102
+ -V --version Show version.
103
+ ```
104
+
105
+ ## Examples
106
+
107
+ ### Smart Parsing (Default)
108
+
109
+ Just pass the information in any order - jodie figures it out:
110
+
111
+ ```bash
112
+ jodie new "John Doe" john@acme.com "Acme Inc" "CEO" "https://linkedin.com/in/johndoe"
113
+ ```
114
+
115
+ ### Preview with --dry-run
116
+
117
+ See what jodie parsed before saving:
118
+
119
+ ```bash
120
+ jodie new "John Doe" john@acme.com "Acme Inc" --dry-run
121
+ ```
122
+
123
+ Output:
124
+ ```
125
+ ┌─────────────────────────────────────────────────────────┐
126
+ │ Contact Preview │
127
+ ├──────────────┬──────────────────────┬───────────────────┤
128
+ │ Field │ Value │ Source │
129
+ ├──────────────┼──────────────────────┼───────────────────┤
130
+ │ First Name │ John │ parsed (100%) │
131
+ │ Last Name │ Doe │ parsed (100%) │
132
+ │ Email │ john@acme.com │ parsed (100%) │
133
+ │ Company │ Acme Inc │ parsed (100%) │
134
+ └──────────────┴──────────────────────┴───────────────────┘
135
+
136
+ Run without --dry-run to save this contact.
137
+ ```
138
+
139
+ ### Parse Email Signatures from Clipboard
140
+
141
+ Copy an email signature to your clipboard, then:
142
+
143
+ ```bash
144
+ jodie new --paste --dry-run
145
+ ```
146
+
147
+ Jodie handles common signature formats:
148
+ - Strips pronouns (he/him, she/her, they/them)
149
+ - Splits on bullet separators (•, |, —)
150
+ - Filters out reply headers and forwarded message noise
151
+ - Infers company from email domain
152
+
153
+ ### Parse from Stdin
154
+
155
+ Pipe text directly:
156
+
157
+ ```bash
158
+ echo "Jane Smith <jane@startup.io> | CEO | Startup Inc" | jodie new --stdin
159
+ ```
160
+
161
+ Or use a heredoc:
162
+
163
+ ```bash
164
+ jodie new --stdin << 'EOF'
165
+ Jane Smith
166
+ CEO, Startup Inc
167
+ jane@startup.io
168
+ 415-555-1234
169
+ https://linkedin.com/in/janesmith
170
+ EOF
171
+ ```
172
+
173
+ ### Explicit Flags
174
+
175
+ For full control, use explicit flags:
176
+
177
+ ```bash
178
+ jodie new \
179
+ --first "John" \
180
+ --last "Doe" \
181
+ --email "john@acme.com" \
182
+ --phone "+1 555 555 5555" \
183
+ --title "CEO" \
184
+ --company "Acme Inc" \
185
+ --linkedin "https://linkedin.com/in/johndoe" \
186
+ --websites "https://acme.com,https://github.com/johndoe"
187
+ ```
188
+
189
+ ### Strict Positional Mode
190
+
191
+ If you prefer explicit ordering (email first, then name, company, title):
192
+
193
+ ```bash
194
+ jodie new --explicit john@acme.com "John Doe" "Acme Inc" "CEO"
195
+ ```
196
+
197
+ Note: `--explicit` mode doesn't support `--dry-run`. Use smart parsing with `--dry-run` to preview first.
198
+
199
+ ## Flag Aliases
200
+
201
+ For convenience, these aliases are supported:
202
+
203
+ | Primary | Aliases |
204
+ |---------|---------|
205
+ | `--first` | `--first-name`, `--firstname` |
206
+ | `--last` | `--last-name`, `--lastname` |
207
+ | `--full-name` | `--name` |
208
+ | `--websites` | `--website` |
209
+
210
+ ## Known Limitations
211
+
212
+ - **Notes field**: Currently disabled due to macOS entitlement requirements. Will be re-enabled in a future update.
213
+
214
+ ## License
215
+
216
+ MIT
jodie-0.1.0/README.md ADDED
@@ -0,0 +1,185 @@
1
+ # Jodie
2
+
3
+ A command line tool to quickly save new contacts to Contacts.app on macOS.
4
+
5
+ Named for [Jodie Foster](https://en.wikipedia.org/wiki/Jodie_Foster) for her stellar performance in [Contact](https://en.wikipedia.org/wiki/Contact_(1997_American_film)).
6
+
7
+ ![Jodie Foster in Contact](jodie-foster-contact.gif)
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ git clone git@github.com:austinogilvie/jodie.git
13
+ cd jodie
14
+ pip install .
15
+ ```
16
+
17
+ After installation, both `jodie` and `jodie-cli` commands are available.
18
+
19
+ ## Quick Start
20
+
21
+ ```bash
22
+ # Smart parsing (default) - jodie figures out what's what
23
+ jodie new "John Doe" john@acme.com "Acme Inc" "CEO"
24
+
25
+ # Preview before saving
26
+ jodie new "John Doe" john@acme.com --dry-run
27
+
28
+ # Parse from clipboard (copy an email signature first)
29
+ jodie new --paste
30
+
31
+ # Parse from stdin
32
+ echo "John Doe <john@acme.com>" | jodie new --stdin
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ ```
38
+ jodie - Manage macOS Contacts.app from command line!
39
+
40
+ Usage:
41
+ jodie new TEXT... [options]
42
+ jodie new [options]
43
+ jodie new --paste [options]
44
+ jodie new --stdin [options]
45
+ jodie new --explicit EMAIL NAME [COMPANY] [TITLE]
46
+
47
+ Arguments:
48
+ TEXT Text for jodie to parse intelligently (default mode).
49
+ EMAIL Email address (used with --explicit).
50
+ NAME Full name (used with --explicit).
51
+ COMPANY Company name (used with --explicit).
52
+ TITLE Job title (used with --explicit).
53
+
54
+ Options:
55
+ --explicit Use strict positional parsing.
56
+ --paste Read input from clipboard (pbpaste).
57
+ --stdin Read input from stdin (pipe/heredoc).
58
+ -D --dry-run Preview parsed fields without saving.
59
+
60
+ -E EMAIL --email=EMAIL Email address.
61
+ -F FIRST --first=FIRST First name.
62
+ -L LAST --last=LAST Last name.
63
+ -U NAME --full-name=NAME Full name (or use --name).
64
+ -P PHONE --phone=PHONE Phone number.
65
+ -T TITLE --title=TITLE Job title.
66
+ -C COMPANY --company=COMPANY Company name.
67
+ -W URL --websites=URL Comma-separated website URLs.
68
+ --linkedin=URL LinkedIn URL (auto-labeled).
69
+
70
+ -H --help Show this screen.
71
+ -V --version Show version.
72
+ ```
73
+
74
+ ## Examples
75
+
76
+ ### Smart Parsing (Default)
77
+
78
+ Just pass the information in any order - jodie figures it out:
79
+
80
+ ```bash
81
+ jodie new "John Doe" john@acme.com "Acme Inc" "CEO" "https://linkedin.com/in/johndoe"
82
+ ```
83
+
84
+ ### Preview with --dry-run
85
+
86
+ See what jodie parsed before saving:
87
+
88
+ ```bash
89
+ jodie new "John Doe" john@acme.com "Acme Inc" --dry-run
90
+ ```
91
+
92
+ Output:
93
+ ```
94
+ ┌─────────────────────────────────────────────────────────┐
95
+ │ Contact Preview │
96
+ ├──────────────┬──────────────────────┬───────────────────┤
97
+ │ Field │ Value │ Source │
98
+ ├──────────────┼──────────────────────┼───────────────────┤
99
+ │ First Name │ John │ parsed (100%) │
100
+ │ Last Name │ Doe │ parsed (100%) │
101
+ │ Email │ john@acme.com │ parsed (100%) │
102
+ │ Company │ Acme Inc │ parsed (100%) │
103
+ └──────────────┴──────────────────────┴───────────────────┘
104
+
105
+ Run without --dry-run to save this contact.
106
+ ```
107
+
108
+ ### Parse Email Signatures from Clipboard
109
+
110
+ Copy an email signature to your clipboard, then:
111
+
112
+ ```bash
113
+ jodie new --paste --dry-run
114
+ ```
115
+
116
+ Jodie handles common signature formats:
117
+ - Strips pronouns (he/him, she/her, they/them)
118
+ - Splits on bullet separators (•, |, —)
119
+ - Filters out reply headers and forwarded message noise
120
+ - Infers company from email domain
121
+
122
+ ### Parse from Stdin
123
+
124
+ Pipe text directly:
125
+
126
+ ```bash
127
+ echo "Jane Smith <jane@startup.io> | CEO | Startup Inc" | jodie new --stdin
128
+ ```
129
+
130
+ Or use a heredoc:
131
+
132
+ ```bash
133
+ jodie new --stdin << 'EOF'
134
+ Jane Smith
135
+ CEO, Startup Inc
136
+ jane@startup.io
137
+ 415-555-1234
138
+ https://linkedin.com/in/janesmith
139
+ EOF
140
+ ```
141
+
142
+ ### Explicit Flags
143
+
144
+ For full control, use explicit flags:
145
+
146
+ ```bash
147
+ jodie new \
148
+ --first "John" \
149
+ --last "Doe" \
150
+ --email "john@acme.com" \
151
+ --phone "+1 555 555 5555" \
152
+ --title "CEO" \
153
+ --company "Acme Inc" \
154
+ --linkedin "https://linkedin.com/in/johndoe" \
155
+ --websites "https://acme.com,https://github.com/johndoe"
156
+ ```
157
+
158
+ ### Strict Positional Mode
159
+
160
+ If you prefer explicit ordering (email first, then name, company, title):
161
+
162
+ ```bash
163
+ jodie new --explicit john@acme.com "John Doe" "Acme Inc" "CEO"
164
+ ```
165
+
166
+ Note: `--explicit` mode doesn't support `--dry-run`. Use smart parsing with `--dry-run` to preview first.
167
+
168
+ ## Flag Aliases
169
+
170
+ For convenience, these aliases are supported:
171
+
172
+ | Primary | Aliases |
173
+ |---------|---------|
174
+ | `--first` | `--first-name`, `--firstname` |
175
+ | `--last` | `--last-name`, `--lastname` |
176
+ | `--full-name` | `--name` |
177
+ | `--websites` | `--website` |
178
+
179
+ ## Known Limitations
180
+
181
+ - **Notes field**: Currently disabled due to macOS entitlement requirements. Will be re-enabled in a future update.
182
+
183
+ ## License
184
+
185
+ MIT
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env python3
2
+ # jodie/__init__.py
3
+
4
+ from jodie import contact, parsers
5
+ from jodie.cli.__doc__ import __version__, __description__, __url__, __doc__
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env python3
2
+ # jodie/cli/__doc__.py
3
+ """jodie - Manage macOS Contacts.app from command line!
4
+
5
+ Usage:
6
+ jodie new TEXT... [options]
7
+ jodie new [options]
8
+ jodie new --auto TEXT... [options]
9
+ jodie new --paste [options]
10
+ jodie new --stdin [options]
11
+ jodie new --explicit EMAIL NAME [COMPANY] [TITLE] [NOTE...]
12
+ jodie parse [options] TEXT
13
+
14
+ Arguments:
15
+ TEXT Text for jodie to parse intelligently (default mode).
16
+ EMAIL Email address (used with --explicit).
17
+ NAME Full name (used with --explicit).
18
+ COMPANY Company name (used with --explicit).
19
+ TITLE Job title (used with --explicit).
20
+ NOTE Note text (used with --explicit).
21
+
22
+ Options:
23
+ --explicit Use strict positional parsing (EMAIL NAME COMPANY TITLE NOTE).
24
+ -A --auto Smart parsing mode (default, kept for backward compatibility).
25
+ -C COMPANY --company=COMPANY Company name.
26
+ -E EMAIL --email=EMAIL Email.
27
+ -F FIRST --first=FIRST First name.
28
+ --first-name=FIRST First name (alias for --first).
29
+ --firstname=FIRST First name (alias for --first).
30
+ -L LAST --last=LAST Last name.
31
+ --last-name=LAST Last name (alias for --last).
32
+ --lastname=LAST Last name (alias for --last).
33
+ -U NAME --full-name=NAME Full name.
34
+ --name=NAME Full name (alias for --full-name).
35
+ -N NOTE --note=NOTE Any text you want to save in the `Note` field in Contacts.app.
36
+ --notes=NOTE Note text (alias for --note).
37
+ -P PHONE --phone=PHONE Phone.
38
+ -T TITLE --title=TITLE Job title.
39
+ -X TEXT --text=TEXT Text for jodie to try her best to parse semi-intelligently if she can.
40
+ -W WEBSITES --websites=WEBSITES Comma-separated list of websites/URLs.
41
+ --website=WEBSITES Website URLs (alias for --websites).
42
+ --linkedin=URL LinkedIn profile URL (auto-labeled as LinkedIn).
43
+ -D --dry-run Preview parsed fields without saving.
44
+ -H --help Show this screen.
45
+ -V --version Show version.
46
+ --paste Read input from clipboard (pbpaste).
47
+ --stdin Read input from stdin (pipe/heredoc).
48
+
49
+ """
50
+
51
+ __version__ = '0.1.0'
52
+ __title__ = "jodie"
53
+ __license__ = "MIT"
54
+ __description__ = "Jodie lets you add contacts to Contacts.app on macOS from command line"
55
+ __keywords__ = "macOS Contacts.app Contact management Contacts command line tool CLI"
56
+ __author__ = "austin"
57
+ __email__ = "tips@cia.lol"
58
+ __url__ = "https://github.com/austinogilvie/jodie"
59
+
60
+
61
+ __all__ = ['__version__', '__description__', '__url__', '__doc__']
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env python3
2
+ # jodie/cli/__init__.py