You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
meta:
id: originfile-extension: opjapplication: Originendian: bedoc: > https://github.com/jgonera/openopj/blob/master/docs/opj_format.markdownseq:
- id: signaturetype: signature
- id: headertype: header
- id: data_listtype: data_list
- id: window_listtype: window_list
- id: parameters_sectiontype: parameters_section
- id: note_listtype: note_list
- id: project_treetype: project_tree
- id: attachment_listtype: attachment_listtypes:
cpya_ver:
seq:
- id: majortype: strzterminator: "."
- id: minortype: strzterminator: ""signature:
seq:
- id: sig_seqcontent: "CPYA "
- id: cpya_vertype: cpya_ver
- id: build_numbertype: strzterminator: "#"
- id: line_terminatorcontents: "\n"header_data_block:
seq:
- id: unknownsize: 27
- id: versiontype: f8
- id: unknown1size: 4data_section:
seq:
- id: headersize: 27
- id: contenttype: f8
- id: null_blocktype: null_blockdata_header_flags:
seq:
- id: unkn0type: b4
- id: integerstype: b1
- id: unkn1type: b2
- id: text_and_numerictype: b1
- id: unkn2type: b8text_or_numeric:
doc: "In case of Text values, the value is a null-terminated string. The bytes after the null are garbage or earlier contents of the value and can be disregarded."seq:
- id: unkn0type: u8doc: "If the first byte is equal 0, the value is a double, if it's 1, the value is a string."
- id: unkn1contents: [0]doc: " The second prefix byte seems to be always 0."
- id: valuetype:
switch-on: unkn0cases:
0: f81: strzdata_header:
seq:
- id: unknown0size: 22
- id: flagstype: data_header_flags
- id: data_type2type: u1
- id: total_rowstype: u4
- id: first_rowtype: u4
- id: last_rowtype: u4
- id: unknown1size: 24
- id: value_sizetype: u1
- id: unknown2type: u1
- id: data_type_utype: u1
- id: unknown3size: 24
- id: data_nametype: strzsize: 25doc: "Data name, for worksheets it's \"WORKSHEET_COLUMN\". Column is at most 18 chars long, remaining characters are used for \"_\", terminating null byte and worksheet name which may be truncated if too long."
- id: data_type3type: u2doc: "According to [importOPJ][] the bytes starting at 0x0071 (start of this field) didn't exist before Origin 5.0."
- id: unknown4type: u8doc: "Always zeros?"instances:
rows:
doc: > The data content block consists of consecutive values (e.g. consecutive rows in a worksheet column). The number of rows is `totalRows`. `firstRow` indicates the first non-empty row (0 is the first row) and `lastRow` indicates the last non-empty row. It should be enough to parse the values up to `lastRow` and skip the remaining ones. The format of the value seems to depend on `valueSize` and `dataType`: According to [liborigin][] `dataTypeU = 8` means that an integer value is unsigned (this is not verified). `valueSize = 1` seems to be rare or non-existent, at least in Origin 7.0552.size: value_sizerepeat: exprrepeat-expr: total_rowstype:
switch-on: value_sizecases:
1: u12: u24: u4#or f48: f8#valueSize > 8: Text#valueSize > 8 and dataType & 0x100: text_or_numericwindow_section_header:
doc: > As of now, the description of window list and its subsections is incomplete and merely serves as an indication of how to skip to the parameters section. window_section contains a header block and a layer list.seq:
- id: unknown0size: 2doc: "Unknown, always zero?"
- id: nametype: strzsize: 25
- id: unknown2size: ndoc: "See importOPJ for details"### Parameters sectionparameters_section_header:
doc: > This section does not contain blocks. Instead it contains an arbitrary number of parameter elements. window_section contains a header block and a layer list. The last parameter element is followed by a 0 byte and a line feed (`00 0A`), i.e. if you encounter a parameter name equal to "\0", there are no more parameter elements. The section ends with a null block (or possibly it's another section which is usually empty).seq:
- id: namesize: ntype: str
- id: lf0contents: "\n"
- id: valuetype: f8
- id: lf1contents: "\n"
The text was updated successfully, but these errors were encountered:
Hi, unfortunately I am not familiar with the OPJ format. However, I am quite interested in helping you build such a parser, since the liborigin2 library often causes severe memory leaks which lead to filling of RAM and eventual crash of the application after several minutes of unusable workplace.
The author of liborigin2 also does not look like willing to collaborate too much, stating that "e-mails from persons "planning to work" will be ignored" on their website http://soft.proindependent.com/liborigin2/, and the last update of the website is nearly six years old. So I think there is a real need for a up-to-date OPJ parser.
Hi. I was searching GH for documentation on origin file format to write its description in machine-readable way to generate a parser and found
in your markdown readme. Are you familiar with origin format well enough to either give me an overview of it (the pieces missing from https://github.com/jgonera/openopj/blob/master/docs/opj_format.markdown) or fill the gaps in my code?
The text was updated successfully, but these errors were encountered: