pymorsed 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.
pymorsed-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shaurya Prakash Verma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,245 @@
1
+ Metadata-Version: 2.4
2
+ Name: pymorsed
3
+ Version: 0.1.0
4
+ Summary: Encode, decode, generate, and analyze Morse code audio signals in Python.
5
+ Author-email: Shaurya Prakash Verma <shauryapv@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ShauryaPrakashVerma/pymorsed
8
+ Project-URL: Repository, https://github.com/ShauryaPrakashVerma/pymorsed
9
+ Project-URL: Documentation, https://shauryaprakashverma.github.io/pymorsed/
10
+ Project-URL: Issues, https://github.com/ShauryaPrakashVerma/pymorsed/issues
11
+ Keywords: morse,morse-code,audio,signal-processing,encoder,decoder
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: numpy
18
+ Requires-Dist: sounddevice
19
+ Requires-Dist: soundfile
20
+ Requires-Dist: matplotlib
21
+ Dynamic: license-file
22
+
23
+ # pymorsed
24
+
25
+ A Python library for encoding, decoding, generating, and analyzing Morse code audio signals.
26
+
27
+ ## Features
28
+
29
+ * Convert text to Morse code
30
+ * Convert Morse code to text
31
+ * Multi-language support
32
+
33
+ * English
34
+ * Russian
35
+ * Generate Morse code audio signals
36
+ * Decode Morse code from WAV audio files
37
+ * Visualize Morse code waveforms
38
+ * JSON-based language mappings
39
+ * Fully tested with automated CI pipeline
40
+
41
+
42
+
43
+
44
+ <br>
45
+
46
+ # Documentation
47
+
48
+ Full documentation is available at : https://shauryaprakashverma.github.io/pymorsed/
49
+
50
+ <br>
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install pymorsed
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Quick Start
61
+
62
+ ### Encode Text
63
+
64
+ ```python
65
+ from pymorsed import encode
66
+
67
+ morse = encode("HELLO WORLD")
68
+ print(morse)
69
+ ```
70
+
71
+ Output:
72
+
73
+ ```text
74
+ .... . .-.. .-.. --- / .-- --- .-. .-.. -..
75
+ ```
76
+
77
+ ---
78
+
79
+ ### Decode Morse Code
80
+
81
+ ```python
82
+ from pymorsed import decode
83
+
84
+ text = decode(".... . .-.. .-.. --- / .-- --- .-. .-.. -..")
85
+ print(text)
86
+ ```
87
+
88
+ Output:
89
+
90
+ ```text
91
+ HELLO WORLD
92
+ ```
93
+
94
+ ---
95
+
96
+ ### Generate Morse Audio
97
+
98
+ ```python
99
+ from pymorsed import encode
100
+ from pymorsed.audio_encoder import morse_to_audio
101
+
102
+ morse = encode("SOS")
103
+ audio = morse_to_audio(morse)
104
+ ```
105
+
106
+ ---
107
+
108
+ ### Save Audio to File
109
+
110
+ ```python
111
+ from pymorsed.audio_encoder import (
112
+ morse_to_audio,
113
+ save_audio
114
+ )
115
+
116
+ audio = morse_to_audio("... --- ...")
117
+
118
+ save_audio(
119
+ audio,
120
+ "sos.wav",
121
+ 44100
122
+ )
123
+ ```
124
+
125
+ ---
126
+
127
+ ### Decode Audio File
128
+
129
+ ```python
130
+ from pymorsed.audio_decoder import decode_from_file
131
+
132
+ text = decode_from_file("sos.wav")
133
+
134
+ print(text)
135
+ ```
136
+
137
+ Output:
138
+
139
+ ```text
140
+ SOS
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Morse Code Conventions
146
+
147
+ pymorsed follows standard Morse code formatting:
148
+
149
+ | Symbol | Meaning |
150
+ | ----------- | ---------------- |
151
+ | `.` | Dot |
152
+ | `-` | Dash |
153
+ | Space (` `) | Letter separator |
154
+ | `/` | Word separator |
155
+
156
+ Example:
157
+
158
+ ```text
159
+ HELLO WORLD
160
+ ```
161
+
162
+ becomes:
163
+
164
+ ```text
165
+ .... . .-.. .-.. --- / .-- --- .-. .-.. -..
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Supported Languages
171
+
172
+ | Language | Code |
173
+ | -------- | --------- |
174
+ | English | `english` |
175
+ | Russian | `russian` |
176
+
177
+ Additional language mappings may be added in future releases.
178
+
179
+ ---
180
+
181
+ ## Example Imports
182
+
183
+ ### Root Package Imports
184
+
185
+ ```python
186
+ from pymorsed import encode
187
+ from pymorsed import decode
188
+ ```
189
+
190
+ ### Module Imports
191
+
192
+ ```python
193
+ from pymorsed.encoder import encode
194
+ from pymorsed.decoder import decode
195
+
196
+ from pymorsed.audio_encoder import (
197
+ morse_to_audio,
198
+ play_audio,
199
+ save_audio,
200
+ plot_waveform
201
+ )
202
+
203
+ from pymorsed.audio_decoder import decode_from_file
204
+ ```
205
+
206
+ <br>
207
+
208
+
209
+ # Development
210
+
211
+ Clone the repository:
212
+
213
+ ```bash
214
+ git clone https://github.com/ShauryaPrakashVerma/pymorsed.git
215
+ cd pymorsed
216
+ ```
217
+
218
+ Install dependencies:
219
+
220
+ ```bash
221
+ pip install -e .
222
+ ```
223
+
224
+ Run tests:
225
+
226
+ ```bash
227
+ pytest
228
+ ```
229
+
230
+ Run tests with coverage:
231
+
232
+ ```bash
233
+ pytest --cov=pymorsed
234
+ ```
235
+
236
+ <br>
237
+
238
+ # License
239
+
240
+ This project is licensed under the MIT License.
241
+
242
+ See the LICENSE file for details.
243
+
244
+ <br>
245
+
@@ -0,0 +1,223 @@
1
+ # pymorsed
2
+
3
+ A Python library for encoding, decoding, generating, and analyzing Morse code audio signals.
4
+
5
+ ## Features
6
+
7
+ * Convert text to Morse code
8
+ * Convert Morse code to text
9
+ * Multi-language support
10
+
11
+ * English
12
+ * Russian
13
+ * Generate Morse code audio signals
14
+ * Decode Morse code from WAV audio files
15
+ * Visualize Morse code waveforms
16
+ * JSON-based language mappings
17
+ * Fully tested with automated CI pipeline
18
+
19
+
20
+
21
+
22
+ <br>
23
+
24
+ # Documentation
25
+
26
+ Full documentation is available at : https://shauryaprakashverma.github.io/pymorsed/
27
+
28
+ <br>
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install pymorsed
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Quick Start
39
+
40
+ ### Encode Text
41
+
42
+ ```python
43
+ from pymorsed import encode
44
+
45
+ morse = encode("HELLO WORLD")
46
+ print(morse)
47
+ ```
48
+
49
+ Output:
50
+
51
+ ```text
52
+ .... . .-.. .-.. --- / .-- --- .-. .-.. -..
53
+ ```
54
+
55
+ ---
56
+
57
+ ### Decode Morse Code
58
+
59
+ ```python
60
+ from pymorsed import decode
61
+
62
+ text = decode(".... . .-.. .-.. --- / .-- --- .-. .-.. -..")
63
+ print(text)
64
+ ```
65
+
66
+ Output:
67
+
68
+ ```text
69
+ HELLO WORLD
70
+ ```
71
+
72
+ ---
73
+
74
+ ### Generate Morse Audio
75
+
76
+ ```python
77
+ from pymorsed import encode
78
+ from pymorsed.audio_encoder import morse_to_audio
79
+
80
+ morse = encode("SOS")
81
+ audio = morse_to_audio(morse)
82
+ ```
83
+
84
+ ---
85
+
86
+ ### Save Audio to File
87
+
88
+ ```python
89
+ from pymorsed.audio_encoder import (
90
+ morse_to_audio,
91
+ save_audio
92
+ )
93
+
94
+ audio = morse_to_audio("... --- ...")
95
+
96
+ save_audio(
97
+ audio,
98
+ "sos.wav",
99
+ 44100
100
+ )
101
+ ```
102
+
103
+ ---
104
+
105
+ ### Decode Audio File
106
+
107
+ ```python
108
+ from pymorsed.audio_decoder import decode_from_file
109
+
110
+ text = decode_from_file("sos.wav")
111
+
112
+ print(text)
113
+ ```
114
+
115
+ Output:
116
+
117
+ ```text
118
+ SOS
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Morse Code Conventions
124
+
125
+ pymorsed follows standard Morse code formatting:
126
+
127
+ | Symbol | Meaning |
128
+ | ----------- | ---------------- |
129
+ | `.` | Dot |
130
+ | `-` | Dash |
131
+ | Space (` `) | Letter separator |
132
+ | `/` | Word separator |
133
+
134
+ Example:
135
+
136
+ ```text
137
+ HELLO WORLD
138
+ ```
139
+
140
+ becomes:
141
+
142
+ ```text
143
+ .... . .-.. .-.. --- / .-- --- .-. .-.. -..
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Supported Languages
149
+
150
+ | Language | Code |
151
+ | -------- | --------- |
152
+ | English | `english` |
153
+ | Russian | `russian` |
154
+
155
+ Additional language mappings may be added in future releases.
156
+
157
+ ---
158
+
159
+ ## Example Imports
160
+
161
+ ### Root Package Imports
162
+
163
+ ```python
164
+ from pymorsed import encode
165
+ from pymorsed import decode
166
+ ```
167
+
168
+ ### Module Imports
169
+
170
+ ```python
171
+ from pymorsed.encoder import encode
172
+ from pymorsed.decoder import decode
173
+
174
+ from pymorsed.audio_encoder import (
175
+ morse_to_audio,
176
+ play_audio,
177
+ save_audio,
178
+ plot_waveform
179
+ )
180
+
181
+ from pymorsed.audio_decoder import decode_from_file
182
+ ```
183
+
184
+ <br>
185
+
186
+
187
+ # Development
188
+
189
+ Clone the repository:
190
+
191
+ ```bash
192
+ git clone https://github.com/ShauryaPrakashVerma/pymorsed.git
193
+ cd pymorsed
194
+ ```
195
+
196
+ Install dependencies:
197
+
198
+ ```bash
199
+ pip install -e .
200
+ ```
201
+
202
+ Run tests:
203
+
204
+ ```bash
205
+ pytest
206
+ ```
207
+
208
+ Run tests with coverage:
209
+
210
+ ```bash
211
+ pytest --cov=pymorsed
212
+ ```
213
+
214
+ <br>
215
+
216
+ # License
217
+
218
+ This project is licensed under the MIT License.
219
+
220
+ See the LICENSE file for details.
221
+
222
+ <br>
223
+
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pymorsed"
7
+ version = "0.1.0"
8
+ description = "Encode, decode, generate, and analyze Morse code audio signals in Python."
9
+ authors = [{ name = "Shaurya Prakash Verma", email = "shauryapv@gmail.com"}]
10
+ readme = "README.md"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ requires-python = ">=3.8"
14
+ dependencies = [
15
+ "numpy",
16
+ "sounddevice",
17
+ "soundfile",
18
+ "matplotlib",
19
+ ]
20
+
21
+ keywords = [
22
+ "morse",
23
+ "morse-code",
24
+ "audio",
25
+ "signal-processing",
26
+ "encoder",
27
+ "decoder"
28
+ ]
29
+
30
+ classifiers = [
31
+ "Programming Language :: Python :: 3",
32
+ "Operating System :: OS Independent",
33
+ ]
34
+
35
+ [tool.setuptools]
36
+ package-dir = {"" = "src"}
37
+
38
+ [tool.setuptools.packages.find]
39
+ where = ["src"]
40
+
41
+ [tool.setuptools.package-data]
42
+ "pymorsed" = ["data/*.json"]
43
+
44
+ [project.urls]
45
+ Homepage = "https://github.com/ShauryaPrakashVerma/pymorsed"
46
+ Repository = "https://github.com/ShauryaPrakashVerma/pymorsed"
47
+ Documentation = "https://shauryaprakashverma.github.io/pymorsed/"
48
+ Issues = "https://github.com/ShauryaPrakashVerma/pymorsed/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,6 @@
1
+ from .encoder import encode
2
+ from .decoder import decode
3
+
4
+ from .audio_encoder import morse_to_audio
5
+
6
+