liblcf
liblcf copied to clipboard
add lcf2xml python build
Hello
I've made some modifications to enable the use of this library in Python. The build process remains unchanged, and only need to have Python installed.
I've wanted to use this library in a Firebase Python server environment, where file I/O is restricted. I think this may some helpful for someone.
import pylcf2xml
ldb = open('RPG_RT.ldb', 'rb').read()
xml = pylcf2xml.ldb2xml(ldb, encoding='949')
print(xml)
pybind11 docs say this is a good way:
find_package(Python 3.6 COMPONENTS Interpreter Development REQUIRED)
find_package(pybind11 CONFIG REQUIRED)
pybind11_add_module(example example.cpp)
No need to use a virtual environment, just use the system package.