pyx3270 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.
Files changed (37) hide show
  1. pyx3270-0.1.0/PKG-INFO +60 -0
  2. pyx3270-0.1.0/README.md +42 -0
  3. pyx3270-0.1.0/docs/gen_tree.py +393 -0
  4. pyx3270-0.1.0/pyproject.toml +122 -0
  5. pyx3270-0.1.0/pyx3270/__init__.py +20 -0
  6. pyx3270-0.1.0/pyx3270/__main__.py +4 -0
  7. pyx3270-0.1.0/pyx3270/bin/linux/s3270 +0 -0
  8. pyx3270-0.1.0/pyx3270/bin/linux/x3270 +0 -0
  9. pyx3270-0.1.0/pyx3270/bin/start.bin +0 -0
  10. pyx3270-0.1.0/pyx3270/bin/windows/wc3270.exe +0 -0
  11. pyx3270-0.1.0/pyx3270/bin/windows/ws3270.exe +0 -0
  12. pyx3270-0.1.0/pyx3270/cli.py +155 -0
  13. pyx3270-0.1.0/pyx3270/emulator.py +866 -0
  14. pyx3270-0.1.0/pyx3270/exceptions.py +22 -0
  15. pyx3270-0.1.0/pyx3270/iemulator.py +122 -0
  16. pyx3270-0.1.0/pyx3270/logging_config.py +55 -0
  17. pyx3270-0.1.0/pyx3270/offline.py +94 -0
  18. pyx3270-0.1.0/pyx3270/py.typed +3 -0
  19. pyx3270-0.1.0/pyx3270/server.py +437 -0
  20. pyx3270-0.1.0/pyx3270/state.py +3 -0
  21. pyx3270-0.1.0/pyx3270/tn3270.py +376 -0
  22. pyx3270-0.1.0/pyx3270/x3270_commands.py +183 -0
  23. pyx3270-0.1.0/pyx3270.egg-info/PKG-INFO +60 -0
  24. pyx3270-0.1.0/pyx3270.egg-info/SOURCES.txt +35 -0
  25. pyx3270-0.1.0/pyx3270.egg-info/dependency_links.txt +1 -0
  26. pyx3270-0.1.0/pyx3270.egg-info/entry_points.txt +2 -0
  27. pyx3270-0.1.0/pyx3270.egg-info/requires.txt +7 -0
  28. pyx3270-0.1.0/pyx3270.egg-info/top_level.txt +8 -0
  29. pyx3270-0.1.0/setup.cfg +4 -0
  30. pyx3270-0.1.0/site/gen_tree.py +393 -0
  31. pyx3270-0.1.0/tests/__init__.py +0 -0
  32. pyx3270-0.1.0/tests/conftest.py +242 -0
  33. pyx3270-0.1.0/tests/test_cli.py +111 -0
  34. pyx3270-0.1.0/tests/test_emulator.py +1962 -0
  35. pyx3270-0.1.0/tests/test_exceptions.py +42 -0
  36. pyx3270-0.1.0/tests/test_offline.py +190 -0
  37. pyx3270-0.1.0/tests/test_server.py +697 -0
pyx3270-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyx3270
3
+ Version: 0.1.0
4
+ Summary: Uma interface comum utilizada para automações de terminais 3270 da IBM.
5
+ Author-email: MatheusLPolidoro <mattpolidoro4@gmail.com>
6
+ Project-URL: Documentation, https://matheuslpolidoro.github.io/pyx3270/
7
+ Project-URL: Source Code, https://github.com/MatheusLPolidoro/pyx3270
8
+ Project-URL: Bug Tracker, https://github.com/MatheusLPolidoro/pyx3270/issues
9
+ Requires-Python: <=3.13,>=3.8
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: click==8.1.8
12
+ Requires-Dist: colorama==0.4.6
13
+ Requires-Dist: Pygments==2.19.1
14
+ Requires-Dist: rich==14.0.0
15
+ Requires-Dist: shellingham==1.5.4
16
+ Requires-Dist: typer==0.15.3
17
+ Requires-Dist: typing_extensions==4.13.2
18
+
19
+ # Pyx3270 — Automação para Mainframes com Python
20
+
21
+ <img src="https://raw.githubusercontent.com/matheusLPolidoro/pyx3270/master/docs/assets/logo.svg" width="180px">
22
+
23
+
24
+ ![PyPI - Version](https://img.shields.io/pypi/v/pyx3270)
25
+ ![Python](https://img.shields.io/badge/language-Python-blue?logo=python)
26
+ ![Cobertura de Testes](https://img.shields.io/badge/cobertura-97%25-brightgreen?logo=pytest)
27
+ [![Supported Python versions](https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058)](https://pypi.org/project/fastapi)
28
+
29
+ Pyx3270 é uma biblioteca Python voltada para interação com emuladores de [terminais 3270](https://www.ibm.com/docs/api/v1/content/zosbasics%2Fcom.ibm.zos.znetwork%2Fznetwork_261.htm?parsebody=true&lang=en) usados em sistemas mainframe.Com ela, você pode gravar sessões, reproduzi-las offline e automatizar processos complexos com simplicidade e controle.
30
+
31
+ ## Sobre o emulador:
32
+
33
+ ### [x3270 Wiki](https://x3270.miraheze.org/wiki/Main_Page)
34
+ Esta Wiki contém documentação para a família x3270 de emuladores de terminais IBM 3270.
35
+
36
+ ### [Licença](https://x3270.miraheze.org/wiki/X3270_license)
37
+ Aqui está o aviso oficial de direitos autorais para x3270, c3270, wc3270, s3270, tcl3270 e pr3287.
38
+
39
+ ## Explore os principais tópicos da biblioteca:
40
+
41
+ ## [O que é o Pyx3270?](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/sobre.md)
42
+ Entenda o contexto dos sistemas mainframe, o que são sessões 3270 e como o Pyx3270 resolve desafios comuns de automação.
43
+
44
+ ## [Primeiros passos](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/primeiros_passos.md)
45
+ Aprenda como instalar, configurar e começar a usar a biblioteca. Veja os principais módulos: Automação, Gravação e Reprodução.
46
+
47
+ ## [Tutorial](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/tutorial.md)
48
+ Siga um passo a passo prático para automatizar uma sessão real, gravar interações e reproduzi-las offline.
49
+
50
+ ## [Comandos Nativos](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/comandos.md)
51
+ Explore os comandos disponíveis para interagir com o terminal 3270 e como usá-los em scripts Python.
52
+
53
+ ## [Alterações](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/changelog.md)
54
+ Acompanhe as atualizações da biblioteca, correções de bugs e novas funcionalidades por versão.
55
+
56
+ ## [Estrutura](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/estrutura.md)
57
+ Explore a estrutura do projeto.
58
+
59
+ ## [Contribuindo](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/contribuindo.md)
60
+ Veja como colaborar com o projeto, enviar melhorias e participar da comunidade Pyx3270.
@@ -0,0 +1,42 @@
1
+ # Pyx3270 — Automação para Mainframes com Python
2
+
3
+ <img src="https://raw.githubusercontent.com/matheusLPolidoro/pyx3270/master/docs/assets/logo.svg" width="180px">
4
+
5
+
6
+ ![PyPI - Version](https://img.shields.io/pypi/v/pyx3270)
7
+ ![Python](https://img.shields.io/badge/language-Python-blue?logo=python)
8
+ ![Cobertura de Testes](https://img.shields.io/badge/cobertura-97%25-brightgreen?logo=pytest)
9
+ [![Supported Python versions](https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058)](https://pypi.org/project/fastapi)
10
+
11
+ Pyx3270 é uma biblioteca Python voltada para interação com emuladores de [terminais 3270](https://www.ibm.com/docs/api/v1/content/zosbasics%2Fcom.ibm.zos.znetwork%2Fznetwork_261.htm?parsebody=true&lang=en) usados em sistemas mainframe.Com ela, você pode gravar sessões, reproduzi-las offline e automatizar processos complexos com simplicidade e controle.
12
+
13
+ ## Sobre o emulador:
14
+
15
+ ### [x3270 Wiki](https://x3270.miraheze.org/wiki/Main_Page)
16
+ Esta Wiki contém documentação para a família x3270 de emuladores de terminais IBM 3270.
17
+
18
+ ### [Licença](https://x3270.miraheze.org/wiki/X3270_license)
19
+ Aqui está o aviso oficial de direitos autorais para x3270, c3270, wc3270, s3270, tcl3270 e pr3287.
20
+
21
+ ## Explore os principais tópicos da biblioteca:
22
+
23
+ ## [O que é o Pyx3270?](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/sobre.md)
24
+ Entenda o contexto dos sistemas mainframe, o que são sessões 3270 e como o Pyx3270 resolve desafios comuns de automação.
25
+
26
+ ## [Primeiros passos](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/primeiros_passos.md)
27
+ Aprenda como instalar, configurar e começar a usar a biblioteca. Veja os principais módulos: Automação, Gravação e Reprodução.
28
+
29
+ ## [Tutorial](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/tutorial.md)
30
+ Siga um passo a passo prático para automatizar uma sessão real, gravar interações e reproduzi-las offline.
31
+
32
+ ## [Comandos Nativos](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/comandos.md)
33
+ Explore os comandos disponíveis para interagir com o terminal 3270 e como usá-los em scripts Python.
34
+
35
+ ## [Alterações](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/changelog.md)
36
+ Acompanhe as atualizações da biblioteca, correções de bugs e novas funcionalidades por versão.
37
+
38
+ ## [Estrutura](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/estrutura.md)
39
+ Explore a estrutura do projeto.
40
+
41
+ ## [Contribuindo](https://github.com/matheusLPolidoro/pyx3270/blob/master/docs/contribuindo.md)
42
+ Veja como colaborar com o projeto, enviar melhorias e participar da comunidade Pyx3270.
@@ -0,0 +1,393 @@
1
+ import os
2
+
3
+ import mkdocs_gen_files
4
+
5
+ # --- Configurações ---
6
+ IGNORED_NAMES = {
7
+ 'venv',
8
+ 'htmlcov',
9
+ '__pycache__',
10
+ 'site',
11
+ 'docs',
12
+ 'mkdocs',
13
+ 'log',
14
+ 'dist',
15
+ '.egg',
16
+ }
17
+ IGNORED_EXTENSIONS = {'.log', '.git'}
18
+ SVG_PATH = './docs/assets/svgs'
19
+
20
+
21
+ # --- Carregar SVGs ---
22
+ def load_svg_icons(path):
23
+ icons = {}
24
+ for filename in os.listdir(path):
25
+ if filename.endswith('.svg'):
26
+ name = os.path.splitext(filename)[0]
27
+ with open(
28
+ os.path.join(path, filename), 'r', encoding='utf-8'
29
+ ) as f:
30
+ icons[name] = f.read()
31
+ return icons
32
+
33
+
34
+ ICONS = load_svg_icons(SVG_PATH)
35
+ ICON_FOLDER = ICONS.get('folder', '')
36
+ ICON_FILE = ICONS.get('file', '')
37
+ CARET = '<span class="caret">▶</span>'
38
+
39
+
40
+ def get_icon_for_extension(ext):
41
+ extension_map = {
42
+ '.typed': 'pytyped',
43
+ '.py': 'python',
44
+ '.js': 'javascript',
45
+ '.html': 'html-5',
46
+ '.css': 'css-3',
47
+ '.md': 'markdown',
48
+ '.json': 'json',
49
+ '.yml': 'yaml',
50
+ '.yaml': 'yaml',
51
+ '.sh': 'bash',
52
+ '.txt': 'file-text',
53
+ '.c': 'c',
54
+ '.cpp': 'cpp',
55
+ '.java': 'java',
56
+ '.go': 'gopher',
57
+ '.php': 'php',
58
+ '.rb': 'ruby',
59
+ '.ts': 'typescript',
60
+ '.tsx': 'react',
61
+ '.jsx': 'react',
62
+ '.vue': 'vue',
63
+ '.r': 'r-lang',
64
+ '.swift': 'swift',
65
+ '.kt': 'kotlin',
66
+ '.kts': 'kotlin',
67
+ '.cs': 'csharp',
68
+ '.fs': 'fsharp',
69
+ '.dart': 'dart',
70
+ '.erl': 'erlang',
71
+ '.ex': 'elixir',
72
+ '.exs': 'elixir',
73
+ '.eex': 'elixir',
74
+ '.leex': 'elixir',
75
+ '.h': 'c',
76
+ '.hpp': 'cpp',
77
+ '.m': 'objective-c',
78
+ '.mm': 'objective-c',
79
+ '.pl': 'perl',
80
+ '.pm': 'perl',
81
+ '.t': 'perl',
82
+ '.rs': 'rust',
83
+ '.scala': 'scala',
84
+ '.sbt': 'sbt',
85
+ '.sc': 'scala',
86
+ '.sql': 'mysql',
87
+ '.xml': 'xml',
88
+ '.xaml': 'xaml',
89
+ '.svg': 'svg',
90
+ '.png': 'file-image',
91
+ '.jpg': 'file-image',
92
+ '.jpeg': 'file-image',
93
+ '.gif': 'file-image',
94
+ '.bmp': 'file-image',
95
+ '.tiff': 'file-image',
96
+ '.ico': 'file-image',
97
+ '.webp': 'file-image',
98
+ '.pdf': 'file-pdf',
99
+ '.doc': 'file-word',
100
+ '.docx': 'file-word',
101
+ '.xls': 'file-excel',
102
+ '.xlsx': 'file-excel',
103
+ '.ppt': 'file-powerpoint',
104
+ '.pptx': 'file-powerpoint',
105
+ '.zip': 'file-zip',
106
+ '.tar': 'file-zip',
107
+ '.gz': 'file-zip',
108
+ '.bz2': 'file-zip',
109
+ '.rar': 'file-zip',
110
+ '.7z': 'file-zip',
111
+ '.log': 'file-text',
112
+ '.ini': 'file-text',
113
+ '.cfg': 'file-text',
114
+ '.conf': 'file-text',
115
+ '.env': 'file-text',
116
+ '.toml': 'file-text',
117
+ '.csproj': 'visual-studio',
118
+ '.sln': 'visual-studio',
119
+ '.vb': 'visual-studio',
120
+ '.vbs': 'visual-studio',
121
+ '.cmd': 'terminal',
122
+ '.bat': 'terminal',
123
+ '.ps1': 'terminal',
124
+ '.psm1': 'terminal',
125
+ '.psd1': 'terminal',
126
+ '.ps1xml': 'terminal',
127
+ '.psc1': 'terminal',
128
+ '.pssc': 'terminal',
129
+ '.vhd': 'virtual-machine',
130
+ '.vhdx': 'virtual-machine',
131
+ '.vmdk': 'virtual-machine',
132
+ '.vdi': 'virtual-machine',
133
+ '.ova': 'virtual-machine',
134
+ '.ovf': 'virtual-machine',
135
+ '.pcap': 'wireshark',
136
+ '.pcapng': 'wireshark',
137
+ '.saz': 'fiddler',
138
+ '.har': 'fiddler',
139
+ '.crx': 'chrome',
140
+ '.xpi': 'firefox',
141
+ '.safariextz': 'safari',
142
+ '.opx': 'opera',
143
+ '.crdownload': 'chrome',
144
+ '.part': 'firefox',
145
+ '.download': 'safari',
146
+ '.dmg': 'apple',
147
+ '.app': 'apple',
148
+ '.ipa': 'apple',
149
+ '.apk': 'android',
150
+ '.xapk': 'android',
151
+ '.apkm': 'android',
152
+ '.apks': 'android',
153
+ '.aab': 'android',
154
+ '.exe': 'microsoft-windows',
155
+ '.msi': 'microsoft-windows',
156
+ '.dll': 'microsoft-windows',
157
+ '.sys': 'microsoft-windows',
158
+ '.deb': 'debian',
159
+ '.rpm': 'redhat',
160
+ '.jar': 'java',
161
+ '.war': 'java',
162
+ '.ear': 'java',
163
+ '.class': 'java',
164
+ '.jsp': 'java',
165
+ '.jspx': 'java',
166
+ '.asp': 'iis',
167
+ '.aspx': 'iis',
168
+ '.ascx': 'iis',
169
+ '.ashx': 'iis',
170
+ '.asmx': 'iis',
171
+ '.axd': 'iis',
172
+ '.webinfo': 'iis',
173
+ '.config': 'iis',
174
+ '.sitemap': 'iis',
175
+ '.master': 'iis',
176
+ '.skin': 'iis',
177
+ '.browser': 'iis',
178
+ '.slk': 'excel',
179
+ '.xla': 'excel',
180
+ '.xlam': 'excel',
181
+ '.xlt': 'excel',
182
+ '.xltm': 'excel',
183
+ '.xltx': 'excel',
184
+ '.xlw': 'excel',
185
+ '.csv': 'excel',
186
+ '.prn': 'excel',
187
+ '.dif': 'excel',
188
+ '.dsn': 'excel',
189
+ '.dqy': 'excel',
190
+ '.rqy': 'excel',
191
+ '.oqy': 'excel',
192
+ '.pot': 'powerpoint',
193
+ '.potm': 'powerpoint',
194
+ '.potx': 'powerpoint',
195
+ '.ppa': 'powerpoint',
196
+ '.ppam': 'powerpoint',
197
+ '.pps': 'powerpoint',
198
+ '.ppsm': 'powerpoint',
199
+ '.ppsx': 'powerpoint',
200
+ '.sldm': 'powerpoint',
201
+ '.sldx': 'powerpoint',
202
+ '.thmx': 'powerpoint',
203
+ '.dot': 'word',
204
+ '.dotm': 'word',
205
+ '.dotx': 'word',
206
+ '.wbk': 'word',
207
+ '.wiz': 'word',
208
+ '.rtf': 'word',
209
+ '.odt': 'word',
210
+ '.ott': 'word',
211
+ '.fodt': 'word',
212
+ '.uot': 'word',
213
+ '.eml': 'email',
214
+ '.msg': 'email',
215
+ '.mbox': 'email',
216
+ '.mbx': 'email',
217
+ '.emlx': 'email',
218
+ '.vcf': 'vcard',
219
+ '.vcard': 'vcard',
220
+ '.ics': 'calendar',
221
+ '.ical': 'calendar',
222
+ '.ifb': 'calendar',
223
+ '.icalendar': 'calendar',
224
+ '.torrent': 'bittorrent',
225
+ '.rss': 'rss',
226
+ '.gem': 'rubygems',
227
+ '.gemspec': 'rubygems',
228
+ '.lock': 'lock',
229
+ '.pem': 'key',
230
+ '.key': 'key',
231
+ '.crt': 'key',
232
+ '.cer': 'key',
233
+ '.der': 'key',
234
+ '.pfx': 'key',
235
+ '.p12': 'key',
236
+ '.p7b': 'key',
237
+ '.p7c': 'key',
238
+ '.p7s': 'key',
239
+ '.crl': 'key',
240
+ '.csr': 'key',
241
+ '.pub': 'key',
242
+ '.asc': 'key',
243
+ '.gpg': 'key',
244
+ '.sig': 'key',
245
+ '.pgp': 'key',
246
+ '.license': 'license',
247
+ '.lic': 'license',
248
+ '.readme': 'readme',
249
+ '.authors': 'authors',
250
+ '.changelog': 'changelog',
251
+ '.contributing': 'contributing',
252
+ '.code_of_conduct': 'code-of-conduct',
253
+ '.github': 'github-icon',
254
+ '.gitignore': 'git',
255
+ '.gitattributes': 'git',
256
+ '.gitmodules': 'git',
257
+ '.gitkeep': 'git',
258
+ '.gitlab-ci.yml': 'gitlab',
259
+ '.travis.yml': 'travis-ci',
260
+ '.jenkinsfile': 'jenkins',
261
+ '.drone.yml': 'drone',
262
+ '.codefresh.yml': 'codefresh',
263
+ '.wercker.yml': 'wercker',
264
+ '.shippable.yml': 'shippable',
265
+ '.coveralls.yml': 'coveralls',
266
+ '.codeclimate.yml': 'codeclimate',
267
+ '.hound.yml': 'houndci',
268
+ '.styleci.yml': 'styleci',
269
+ '.scrutinizer.yml': 'scrutinizer',
270
+ '.codecov.yml': 'codecov',
271
+ '.sol': 'solidity',
272
+ '.vy': 'vyper',
273
+ '.ligo': 'ligo',
274
+ '.rel': 'reasonml',
275
+ '.re': 'reasonml',
276
+ '.ml': 'ocaml',
277
+ '.mli': 'ocaml',
278
+ '.clj': 'clojure',
279
+ '.cljc': 'clojure',
280
+ '.edn': 'clojure',
281
+ '.elm': 'elm',
282
+ '.hrl': 'erlang',
283
+ '.es': 'erlang',
284
+ '.escript': 'erlang',
285
+ '.hs': 'haskell',
286
+ '.lhs': 'haskell',
287
+ '.hx': 'haxe',
288
+ '.hxml': 'haxe',
289
+ '.lisp': 'lisp',
290
+ '.lsp': 'lisp',
291
+ '.cl': 'lisp',
292
+ '.fasl': 'lisp',
293
+ '.nim': 'nim',
294
+ '.nimble': 'nim',
295
+ '.nims': 'nim',
296
+ '.android-icon': 'android-icon',
297
+ '.android': 'android-icon',
298
+ '.angular-icon': 'angular-icon',
299
+ '.angular': 'angular-icon',
300
+ '.backbone-icon': 'backbone-icon',
301
+ '.backbone': 'backbone-icon',
302
+ '.bash': 'bash',
303
+ '.bem-2': 'bem-2',
304
+ '.bem': 'bem-2',
305
+ '.browserify-icon': 'browserify-icon',
306
+ '.browserify': 'browserify-icon',
307
+ '.centos-icon': 'centos-icon',
308
+ '.centos': 'centos-icon',
309
+ '.chrome': 'chrome',
310
+ '.clojure': 'clojure',
311
+ '.codepen-icon': 'codepen-icon',
312
+ '.codepen': 'codepen-icon',
313
+ '.coreos-icon': 'coreos-icon',
314
+ '.coreos': 'coreos-icon',
315
+ '.css-3': 'css-3',
316
+ '.css-3_official': 'css-3_official',
317
+ '.dribbble-icon': 'dribbble-icon',
318
+ '.dribbble': 'dribbble-icon',
319
+ '.ember': 'ember',
320
+ '.erlang': 'erlang',
321
+ '.flickr': 'flickr-icon',
322
+ '.git': 'git-icon',
323
+ '.instagram': 'instagram-icon',
324
+ '.javascript': 'javascript',
325
+ '.kotlin': 'kotlin',
326
+ '.magneto': 'magneto',
327
+ '.markdown': 'markdown',
328
+ '.meteor': 'meteor-icon',
329
+ '.mysql': 'mysql',
330
+ '.nodejs': 'nodejs-icon',
331
+ '.npm': 'npm-2',
332
+ '.processwire': 'processwire-icon',
333
+ '.python': 'python',
334
+ '.react': 'react',
335
+ '.ruby': 'ruby',
336
+ '.rubygems': 'rubygems',
337
+ '.rust': 'rust',
338
+ '.tumblr': 'tumblr-icon',
339
+ '.vimeo': 'vimeo-icon',
340
+ '.wordpress': 'wordpress-icon',
341
+ }
342
+ icon_name = extension_map.get(ext, 'any')
343
+ return ICONS.get(icon_name, ICON_FILE)
344
+
345
+
346
+ def generate_tree_html(path='.', level=0, max_level=3):
347
+ if level > max_level:
348
+ return ''
349
+ try:
350
+ entries = sorted(os.listdir(path))
351
+ except FileNotFoundError:
352
+ return ''
353
+
354
+ entries = [
355
+ e
356
+ for e in entries
357
+ if not e.startswith('.')
358
+ and not any(ext in e for ext in IGNORED_NAMES)
359
+ and not any(e.lower().endswith(ext) for ext in IGNORED_EXTENSIONS)
360
+ ]
361
+ if not entries:
362
+ return ''
363
+
364
+ html = '<ul class="file-tree">\n'
365
+ for entry in entries:
366
+ full_path = os.path.join(path, entry)
367
+ if os.path.isdir(full_path):
368
+ html += (
369
+ f'<li class="folder">'
370
+ f'<div class="folder-header">{CARET}<span class="folder-icon">'
371
+ f'{ICON_FOLDER}</span><span class="folder">{entry}</span>'
372
+ f'</div>{generate_tree_html(full_path, level + 1, max_level)}'
373
+ f'</li>\n'
374
+ )
375
+ else:
376
+ ext = os.path.splitext(entry)[1].lower()
377
+ icon = get_icon_for_extension(ext)
378
+ html += (
379
+ f'<li><span class="icon">{icon}</span>'
380
+ f'<span class="file">{entry}</span></li>\n'
381
+ )
382
+ html += '</ul>\n'
383
+ return html
384
+
385
+
386
+ def main():
387
+ html_tree = generate_tree_html('.')
388
+ html_tree = f'<div class="tree-container">\n{html_tree}\n</div>'
389
+ with mkdocs_gen_files.open('estrutura.md', 'w+', encoding='utf-8') as f:
390
+ f.write(html_tree)
391
+
392
+
393
+ main()
@@ -0,0 +1,122 @@
1
+ [project]
2
+ name = "pyx3270"
3
+ version = "0.1.0"
4
+ description = "Uma interface comum utilizada para automações de terminais 3270 da IBM."
5
+ authors = [{name = "MatheusLPolidoro", email = "mattpolidoro4@gmail.com"}]
6
+ readme = "README.md"
7
+ requires-python = ">=3.8,<=3.13"
8
+
9
+ dependencies = [
10
+ "click==8.1.8",
11
+ "colorama==0.4.6",
12
+ "Pygments==2.19.1",
13
+ "rich==14.0.0",
14
+ "shellingham==1.5.4",
15
+ "typer==0.15.3",
16
+ "typing_extensions==4.13.2",
17
+ ]
18
+
19
+ [project.scripts]
20
+ pyx3270 = "pyx3270.__main__:app"
21
+
22
+ [project.urls]
23
+ "Documentation" = "https://matheuslpolidoro.github.io/pyx3270/"
24
+ "Source Code" = "https://github.com/MatheusLPolidoro/pyx3270"
25
+ "Bug Tracker" = "https://github.com/MatheusLPolidoro/pyx3270/issues"
26
+
27
+ [tool.ruff]
28
+ line-length = 79
29
+
30
+ [tool.ruff.lint]
31
+ preview = true
32
+ select = ['I', 'F', 'E', 'W', 'PL', 'PT']
33
+
34
+ [tool.ruff.format]
35
+ preview = true
36
+ quote-style = 'single'
37
+
38
+ [tool.taskipy.tasks]
39
+ fix = "ruff check . --fix"
40
+ format = "ruff format ."
41
+ test = "python -m pytest . -s -x --cov=pyx3270 -vv"
42
+ post_test = "python -m coverage html"
43
+
44
+ [tool.pytest.ini_options]
45
+ filterwarnings = [
46
+ "ignore::DeprecationWarning",
47
+ "ignore::UserWarning",
48
+ "ignore:function ham\\(\\) is deprecated:DeprecationWarning"
49
+ ]
50
+
51
+ [tool.ruff.lint.per-file-ignores]
52
+ "pyx3270/x3270_commands.py" = ["PLR0904"]
53
+
54
+ [tool.setuptools.packages.find]
55
+ where = ["."]
56
+
57
+ [tool.setuptools.package-data]
58
+ pyx3270 = ["bin/**/*", "py.typed"]
59
+
60
+ [build-system]
61
+ requires = ["setuptools>=61.0,<70"]
62
+ build-backend = "setuptools.build_meta"
63
+
64
+ [tool.towncrier]
65
+ encoding = "utf-8-sig"
66
+ package = "pyx3270"
67
+ package_dir = "."
68
+ filename = "CHANGELOG.md"
69
+ directory = "chanlogs.d"
70
+ underlines = ["=", "-", "~"]
71
+ title_format = "Versão {version} ({project_date})"
72
+ issue_format = "[#{issue}](https://github.com/MatheusLPolidoro/pyx3270/issues/{issue})"
73
+
74
+ [[tool.towncrier.type]]
75
+ directory = "breaking"
76
+ name = ":warning: MUDANÇAS QUEBRADAS"
77
+ showcontent = true
78
+
79
+ [[tool.towncrier.type]]
80
+ directory = "feature"
81
+ name = ":zap: NOVAS FUNCIONALIDADES"
82
+ showcontent = true
83
+
84
+ [[tool.towncrier.type]]
85
+ directory = "enhancement"
86
+ name = ":rocket: OTIMIZAÇÕES"
87
+ showcontent = true
88
+
89
+ [[tool.towncrier.type]]
90
+ directory = "fix"
91
+ name = ":bug: CORREÇÕES"
92
+ showcontent = true
93
+
94
+ [[tool.towncrier.type]]
95
+ directory = "deprecation"
96
+ name = ":wastebasket: OBSOLETOS"
97
+ showcontent = true
98
+
99
+ [[tool.towncrier.type]]
100
+ directory = "security"
101
+ name = ":shield: SEGURANÇA"
102
+ showcontent = true
103
+
104
+ [[tool.towncrier.type]]
105
+ directory = "docs"
106
+ name = ":open_file_folder: DOCUMENTAÇÃO"
107
+ showcontent = true
108
+
109
+ [[tool.towncrier.type]]
110
+ directory = "tests"
111
+ name = ":test_tube: TESTES"
112
+ showcontent = true
113
+
114
+ [[tool.towncrier.type]]
115
+ directory = "infra"
116
+ name = ":classical_building: INFRAESTRUTURA"
117
+ showcontent = true
118
+
119
+ [[tool.towncrier.type]]
120
+ directory = "chore"
121
+ name = ":broom: LIMPEZA"
122
+ showcontent = true
@@ -0,0 +1,20 @@
1
+ # ██████╗ ██╗ ██╗██╗ ██╗██████╗ ██████╗ ███████╗ ██████╗
2
+ # ██╔══██╗╚██╗ ██╔╝╚██╗██╔╝╚════██╗╚════██╗╚════██║██╔═████╗
3
+ # ██████╔╝ ╚████╔╝ ╚███╔╝ █████╔╝ █████╔╝ ██╔╝██║██╔██║
4
+ # ██╔═══╝ ╚██╔╝ ██╔██╗ ╚═══██╗██╔═══╝ ██╔╝ ████╔╝██║
5
+ # ██║ ██║ ██╔╝ ██╗██████╔╝███████╗ ██║ ╚██████╔╝
6
+ # ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═════╝ ╚══════╝ ╚═╝ ╚═════╝
7
+ """
8
+ PYX3270
9
+ ~~~~~~~~~~~~~~~
10
+ Emulador de terminal 3270
11
+
12
+ """
13
+
14
+ from pyx3270.cli import record, replay
15
+ from pyx3270.emulator import X3270
16
+ from pyx3270.offline import PyX3270Manager
17
+
18
+ __author__ = 'MatheusLPolidoro'
19
+ __version__ = '0.1.0'
20
+ __all__ = ['X3270', 'replay', 'record', 'PyX3270Manager']
@@ -0,0 +1,4 @@
1
+ from pyx3270.cli import app
2
+
3
+ if __name__ == '__main__':
4
+ app()
Binary file
Binary file
Binary file