struct-frame 0.0.13__py3-none-any.whl → 0.0.15__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.
Potentially problematic release.
This version of struct-frame might be problematic. Click here for more details.
- struct_frame/__init__.py +8 -0
- struct_frame/__main__.py +8 -0
- {struct-frame → struct_frame}/c_gen.py +1 -1
- struct-frame/__main__.py → struct_frame/generate.py +17 -14
- {struct-frame → struct_frame}/ts_gen.py +1 -1
- {struct_frame-0.0.13.dist-info → struct_frame-0.0.15.dist-info}/METADATA +2 -2
- struct_frame-0.0.15.dist-info/RECORD +18 -0
- struct-frame/__init__.py +0 -6
- struct_frame-0.0.13.dist-info/RECORD +0 -17
- {struct-frame → struct_frame}/base.py +0 -0
- {struct-frame → struct_frame}/boilerplate/c/struct_frame.h +0 -0
- {struct-frame → struct_frame}/boilerplate/c/struct_frame_gen.h +0 -0
- {struct-frame → struct_frame}/boilerplate/c/struct_frame_parser.h +0 -0
- {struct-frame → struct_frame}/boilerplate/c/struct_frame_types.h +0 -0
- {struct-frame → struct_frame}/boilerplate/ts/struct_frame.ts +0 -0
- {struct-frame → struct_frame}/boilerplate/ts/struct_frame_gen.ts +0 -0
- {struct-frame → struct_frame}/boilerplate/ts/struct_frame_parser.ts +0 -0
- {struct-frame → struct_frame}/boilerplate/ts/struct_frame_types.ts +0 -0
- {struct_frame-0.0.13.dist-info → struct_frame-0.0.15.dist-info}/WHEEL +0 -0
- {struct_frame-0.0.13.dist-info → struct_frame-0.0.15.dist-info}/licenses/LICENSE +0 -0
struct_frame/__init__.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from .base import version, NamingStyleC, CamelToSnakeCase, pascalCase
|
|
2
|
+
|
|
3
|
+
from .c_gen import FileCGen
|
|
4
|
+
from .ts_gen import FileTsGen
|
|
5
|
+
|
|
6
|
+
from .generate import main
|
|
7
|
+
|
|
8
|
+
__all__ = ["main", "FileCGen", "FileTsGen", "version", "NamingStyleC", "CamelToSnakeCase", "pascalCase"]
|
struct_frame/__main__.py
ADDED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
# kate: replace-tabs on; indent-width 4;
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from struct_frame import FileCGen
|
|
6
|
+
from struct_frame import FileTsGen
|
|
7
7
|
from proto_schema_parser.parser import Parser
|
|
8
8
|
from proto_schema_parser import ast
|
|
9
9
|
|
|
@@ -246,11 +246,13 @@ processed_file = []
|
|
|
246
246
|
required_file = []
|
|
247
247
|
|
|
248
248
|
parser = argparse.ArgumentParser(
|
|
249
|
-
prog='
|
|
250
|
-
description='
|
|
251
|
-
epilog='Text at the bottom of help')
|
|
249
|
+
prog='struct_frame',
|
|
250
|
+
description='Message serialization and header generation program')
|
|
252
251
|
|
|
253
|
-
parser.add_argument('filename')
|
|
252
|
+
parser.add_argument('filename')
|
|
253
|
+
parser.add_argument('--debug', action='store_true')
|
|
254
|
+
parser.add_argument('--c_path', nargs=1, type=str, default="c/")
|
|
255
|
+
parser.add_argument('--ts_path', nargs=1, type=str, default="ts/")
|
|
254
256
|
|
|
255
257
|
|
|
256
258
|
def parseFile(filename):
|
|
@@ -321,11 +323,10 @@ def generateTsFileStrings(path):
|
|
|
321
323
|
name = path + value.name + ".sf.ts"
|
|
322
324
|
data = ''.join(FileTsGen.generate(value))
|
|
323
325
|
out[name] = data
|
|
324
|
-
|
|
325
326
|
return out
|
|
326
327
|
|
|
327
|
-
|
|
328
328
|
import os
|
|
329
|
+
import shutil
|
|
329
330
|
|
|
330
331
|
def main():
|
|
331
332
|
args = parser.parse_args()
|
|
@@ -337,11 +338,8 @@ def main():
|
|
|
337
338
|
print(
|
|
338
339
|
f'Recursion Error. Messages most likely have a cyclical dependancy. Check Message: {recErrCurrentMessage} and Field: {recErrCurrentField}')
|
|
339
340
|
|
|
340
|
-
|
|
341
|
-
files
|
|
342
|
-
|
|
343
|
-
tspath ="ts/"
|
|
344
|
-
files.update(generateTsFileStrings(tspath))
|
|
341
|
+
files = generateCFileStrings(args.c_path[0])
|
|
342
|
+
files.update(generateTsFileStrings(args.ts_path[0]))
|
|
345
343
|
|
|
346
344
|
for filename, filedata in files.items():
|
|
347
345
|
dirname = os.path.dirname(filename)
|
|
@@ -351,7 +349,12 @@ def main():
|
|
|
351
349
|
with open(filename , 'w', encoding='utf-8') as f:
|
|
352
350
|
f.write(filedata)
|
|
353
351
|
|
|
354
|
-
|
|
352
|
+
dir_path = os.path.dirname(os.path.realpath(__file__))
|
|
353
|
+
shutil.copytree(os.path.join(dir_path,"boilerplate/c"), args.c_path[0], dirs_exist_ok=True)
|
|
354
|
+
shutil.copytree(os.path.join(dir_path,"boilerplate/ts"), args.ts_path[0], dirs_exist_ok=True)
|
|
355
|
+
|
|
356
|
+
if args.debug:
|
|
357
|
+
printPackages()
|
|
355
358
|
|
|
356
359
|
|
|
357
360
|
if __name__ == '__main__':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: struct-frame
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.15
|
|
4
4
|
Summary: A framework for serializing data with headers
|
|
5
5
|
Project-URL: Homepage, https://github.com/mylonics/struct-frame
|
|
6
6
|
Project-URL: Issues, https://github.com/mylonics/struct-frame/issues
|
|
@@ -33,4 +33,4 @@ py -m twine upload dist/*
|
|
|
33
33
|
py -m pip install --upgrade twine
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
run locally python .\src\
|
|
36
|
+
run locally python .\src\main.py
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
struct_frame/__init__.py,sha256=t_GBVV-CeYA4Yupfu-pH5922nisafAOZLsyyfrJtD0c,269
|
|
2
|
+
struct_frame/__main__.py,sha256=tIybnBeFHvwiwVhodVOSnxhne5AX_80mtXBx4rneSB4,143
|
|
3
|
+
struct_frame/base.py,sha256=Sx1hwOjpmbhArPldw4jYibvd7UMRtfkSO_P0lu9NqZA,2021
|
|
4
|
+
struct_frame/c_gen.py,sha256=MQ2wBL9O6zse4XA0WmFVsHes8UUjgXSj1vgjjWOcSI4,5825
|
|
5
|
+
struct_frame/generate.py,sha256=XBjI7mzCWAEd5Rb2d4jeHWi4rGWOqAv50pOCAS2XpSg,11373
|
|
6
|
+
struct_frame/ts_gen.py,sha256=b_mx5IwemcWB70082iHSGOAPzqcnnglXB-fEk4Q2uLM,6123
|
|
7
|
+
struct_frame/boilerplate/c/struct_frame.h,sha256=Y0V39aqXfR-eTSNe6f1hdc55GXHXBADBK2kbNrxCo-k,4909
|
|
8
|
+
struct_frame/boilerplate/c/struct_frame_gen.h,sha256=MdXFYOO6E7IN4DM5EaEMXXowZb4auv8UeyQBprkqx68,43
|
|
9
|
+
struct_frame/boilerplate/c/struct_frame_parser.h,sha256=A38zoqaAxh4cw4rG7zzF7FFQ9qnfqP2w41cpn2dO2CA,3052
|
|
10
|
+
struct_frame/boilerplate/c/struct_frame_types.h,sha256=e67BvA1kAg_OnjnktUv1fAtLB0nn7FzPVhIPaque5Ts,1740
|
|
11
|
+
struct_frame/boilerplate/ts/struct_frame.ts,sha256=botKdIKVP7Bi6BJdXfIZaGAmoATnuj54LxZxc4DAWqM,2252
|
|
12
|
+
struct_frame/boilerplate/ts/struct_frame_gen.ts,sha256=pz6QTIWDTIY0rMCFiGNgp3DcfO7cKsmXrx3rj3zgN_U,164
|
|
13
|
+
struct_frame/boilerplate/ts/struct_frame_parser.ts,sha256=6eTbafomqTsX3Fvfn82rxNQMxu4PwTaPug38xw4wrhE,3523
|
|
14
|
+
struct_frame/boilerplate/ts/struct_frame_types.ts,sha256=aBtxVI2lUJKGPTtJAOpbStpS2sXSKvd4XWCIsOnaMk8,2130
|
|
15
|
+
struct_frame-0.0.15.dist-info/METADATA,sha256=FvudPFXE0dSUvJCV8BilbX-7ZwUqPunuQBvT4CrgspM,828
|
|
16
|
+
struct_frame-0.0.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
17
|
+
struct_frame-0.0.15.dist-info/licenses/LICENSE,sha256=UjbLtGfcHCIqJg9UzEVGoNW8fyX4Ah9ZbsuAmJ_vhmk,1094
|
|
18
|
+
struct_frame-0.0.15.dist-info/RECORD,,
|
struct-frame/__init__.py
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
struct-frame/__init__.py,sha256=0BitNHuAcib58F4RVGBwuknvxYaQFyRCdB5zwortdKY,228
|
|
2
|
-
struct-frame/__main__.py,sha256=wlVdvVq42f6FW8gtmUVREhdX-UC5Q1rVtlcVwC5cwxs,10941
|
|
3
|
-
struct-frame/base.py,sha256=Sx1hwOjpmbhArPldw4jYibvd7UMRtfkSO_P0lu9NqZA,2021
|
|
4
|
-
struct-frame/c_gen.py,sha256=7DCO9INrPHAtpEeDDx_iqxja-5vEiev0LFnCpaMw2-I,5817
|
|
5
|
-
struct-frame/ts_gen.py,sha256=-RWjC1yAOc2pNE5YzIuTtUuSM4c0pbmMWGWr4rZTQ3I,6115
|
|
6
|
-
struct-frame/boilerplate/c/struct_frame.h,sha256=Y0V39aqXfR-eTSNe6f1hdc55GXHXBADBK2kbNrxCo-k,4909
|
|
7
|
-
struct-frame/boilerplate/c/struct_frame_gen.h,sha256=MdXFYOO6E7IN4DM5EaEMXXowZb4auv8UeyQBprkqx68,43
|
|
8
|
-
struct-frame/boilerplate/c/struct_frame_parser.h,sha256=A38zoqaAxh4cw4rG7zzF7FFQ9qnfqP2w41cpn2dO2CA,3052
|
|
9
|
-
struct-frame/boilerplate/c/struct_frame_types.h,sha256=e67BvA1kAg_OnjnktUv1fAtLB0nn7FzPVhIPaque5Ts,1740
|
|
10
|
-
struct-frame/boilerplate/ts/struct_frame.ts,sha256=botKdIKVP7Bi6BJdXfIZaGAmoATnuj54LxZxc4DAWqM,2252
|
|
11
|
-
struct-frame/boilerplate/ts/struct_frame_gen.ts,sha256=pz6QTIWDTIY0rMCFiGNgp3DcfO7cKsmXrx3rj3zgN_U,164
|
|
12
|
-
struct-frame/boilerplate/ts/struct_frame_parser.ts,sha256=6eTbafomqTsX3Fvfn82rxNQMxu4PwTaPug38xw4wrhE,3523
|
|
13
|
-
struct-frame/boilerplate/ts/struct_frame_types.ts,sha256=aBtxVI2lUJKGPTtJAOpbStpS2sXSKvd4XWCIsOnaMk8,2130
|
|
14
|
-
struct_frame-0.0.13.dist-info/METADATA,sha256=p1H3PDllB6U97mvVqWwlvpNivsgcwV6OeLhlIyOzkaA,833
|
|
15
|
-
struct_frame-0.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
16
|
-
struct_frame-0.0.13.dist-info/licenses/LICENSE,sha256=UjbLtGfcHCIqJg9UzEVGoNW8fyX4Ah9ZbsuAmJ_vhmk,1094
|
|
17
|
-
struct_frame-0.0.13.dist-info/RECORD,,
|
|
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
|
|
File without changes
|