旧文件架构 - 逆向工程
我目前正在将超过 20k 数据库表从 Corel Paradox 4.0 格式(基于 DOS,扩展名为 .db)转换为 SQL 数据库,我目前正在考虑使用轻型软件,而不是使用现成的软件像 Python(或 Ruby 或 PHP,但 Python 是理想的脚本语言,因为我正在处理 Windows 桌面设置——尽管如果需要,我可以启动一个 Linux VM 进行开发),以便我编写一组代码来简单地拉所有的目录中的.db 文件,只需单击一下即可输出一组.sql 数据库。
现在,虽然我知道 PHP 有一个专门处理 Paradox 文件的有限库,但当涉及到 Python、Ruby 和其他语言时,我就没那么幸运了。
我现在的问题是,在编写格式转换脚本时,如何定义要输入的文件的语法?例如,当涉及 .exe、.zip、.msi 等时,是否有发布供开发人员遵循的单一格式/语法,如果有,需要检查的最全面/可靠的来源是什么?
我目前有一份 Windows 版 Paradox 副本,可以用它来查看字段和表格,但这对我的脚本没有帮助,因为它只显示了高级概述。
非常感谢您提供任何信息,
I'm currently in the process of converting over 20k database tables from Corel Paradox 4.0 format (DOS Based, with a .db extension) to SQL databases, and rather than using off the shelf software, I'm currently looking into using a light scripting language like Python (or Ruby or PHP, but Python is ideal since I'm working on a Windows desktop setup -- although I could boot one of my Linux VM's for development if needed) for me to write a set of code to simply pull all the .db files in a directory and output a set of .sql databases in just one click.
Now while I know PHP has a limited library built to specifically handle Paradox files, when it comes to Python, Ruby, and other languages I haven't had much luck.
My question now is, when it comes to writing a script to convert formats, how do I go about defining the syntax of the file to be inputted? For example, when it comes to .exe, .zip, .msi, and so on, is there a single format/syntax published for developers to follow, and if so, what are the most comprehensive/solid sources to check?
I currently have a copy of Paradox for Windows which I can use to view the fields and tables, but that isn't helping me with my scripts as it only shows a high-level overview.
Thanks very much for any information,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您为什么不想使用现有的软件?例如,快速谷歌搜索得到了这个工具集(我没有要测试的Paradox数据库,但是看起来编译正确)。
Why do not you want to use already existing software? For example, a quick googling yielded this toolset (I do not have Paradox databases to test, but it seems to compile correctly).