kienerj / pycdxml

Tools to automatically convert and proccess cdx and cdxml files in python
GNU General Public License v3.0
35 stars 5 forks source link

Guidance on converting .cdxml files to .cdx from the command line #35

Open jbacsa opened 6 months ago

jbacsa commented 6 months ago

Hi, I would like to simply convert a cdxml file to a cdx file from the command line in windows (C:\pycdxml\pycdxml-master\pycdxml). Is there a command line interface that I can use? Thanks John

kienerj commented 6 months ago

Hi John,

for now it is just a python library so no CLI interface exists. So you will have to create a python environment and write python code (see readme). The code needed is very simple:

from pycdxml import cdxml_converter
doc = cdxml_converter.read_cdxml('/path/to/structure.cdxml')
cdxml_converter.write_cdx_file(doc, '/path/to/structure.cdx')