I know version control will not be coming to v.7.9.x, but I need a workaround so I can use it. I cannot move my system to v8.x due to the cost of rework and testing.
Does anyone either have an Ignition module or a jython/python script to handle expanding a .proj file into folders and files?
If not, does anyone know how to decode the sections in the .proj files?
For decoding the , I have the following so far but the header and footer remain encoded and there is not a consistent pattern or position to just remove them.
import zlib
import base64
string = '<bytes> from a .proj file'
decoded = base64.b64decode(string)
unzipped = zlib.decompress(decoded , 16 + zlib.MAX_WBITS)
current example output:
b'\x98)\x8f\xaaC\xf7JO\xb2\x8d\xca<H\x96\xaf\xc9\x00\x00\x00\x02\x00\x00\x01v\xf8\xc9@\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x00\x00\x00\x07\x00\x00\x03str\x00\x00\x00\x02\x00\x00\x107.9.6.2018012914\x00\x00\x00\x04\x00\x00\x079.9.6.0\x00\x00\x00\x01\x00\x00\x11framework.version\x00\x00\x00\x00\x00\x00\x07objects\x00\x00\x00\x03\x00\x00\x0cfpmi.version\x00\x00\x00\x08\x00\x05\xe7"""Module for configuring the ORM model for constants.\n\nWARNING: Due to recursion problem with everything importing this module,\nuser id is not automatically pulled in. Any updates to this table need\nto manually handle updating the user. Not a real problem, because updates\nto this table should never really by through app layer.\n"""\n\nimport datetime\n\nfrom shared.orm import *\n\n__all__ = [\n\t\'Constant\',\n]\n\n\ndef change_updated_and_updated_by(table, indices):\n\tif \'updated\' in table.cols.aliases:\n\t\ttable[indices, \'updated\'] = datetime.datetime.now()\n\n\nclass Constant(DatabaseTable):\n\tconnection_name = \'NDB\'\n\talias = \'constant\'\n\tname = \'Constant\'\n\tschema = \'aut_portal\'\n\t\n\tconstant_id = Col(\'ConstantId\')\n\tgroup = Col(\'Group\')\n\tsubgroup = Col(\'Subgroup\')\n\tcode = Col(\'Code\')\n\tvalue = Col(\'Value\')\n\tdesc = Col(\'Description\')\n\tunits = Col(\'Units\')\n\tdtype = Col(\'DataType\', \'varchar\')\n\tmax_length = Col(\'MaxLength\')\n\tcreated = Col(\'CreatedDateTime\', datetime.datetime.now, False)\n\tcreated_by = Col(\'CreatedByUserId\', None, False)\n\tupdated = Col(\'UpdatedDateTime\', datetime.datetime.now)\n\tupdated_by = Col(\'UpdatedByUserId\', None)\n\t\n\tafter_update = [change_updated_and_updated_by]\n\tunique_record_columns = [\n\t\t(\'group\', \'subgroup\', \'code\',),\n\t]\n\tdefault_order = [\n\t\t\'group\', \'subgroup\', \'code\'\n\t]\n\t\n\tdefault_insert_cache_columns = [\'constant_id\']\n\tdefault_insert_keys = [\'group\', \'subgroup\', \'code\']\n\t\n\tdefault_update_cache_columns = []\n\tdefault_update_keys = [\'constant_id\']\n\n\tdefault_delete_keys = [\'constant_id\']\n\x00\x00\x00\x05\x00\x00\ttimestamp\x00\x00\x00\x06\x00\x00\x1cTue Jan 12 17:48:27 EST 2021\x18\x00\x00\x00\x00\x03\x00\x00\x00\x01\x08\x00\x00\x00\x02\x00\x00\x00\x03\x08\x00\x00\x00\x04\x00\x00\x00\x05\x08\x00\x00\x00\x06\x00\x00\x00\x01 \x00\x00\x00\x07\x00\x00\x00\x04\x00\x00\x00\x08'