Answer the question
In order to leave comments, you need to log in
How to create your own file format or how to save 300 questions with options in one file?
You need to save 300-500 questions with 5 options in one file so that you can easily get random 25 questions with (mixed) options. It will not work in a text file - the test may contain pictures, formulas. How to be? A special program will be written to open the test. My task: to generate a test file from ms word, if necessary, in a new format. I know absolutely nothing about this. In what direction to move? What should you read about?
PS "Generator-site" will be written in php
Answer the question
In order to leave comments, you need to log in
I don’t see any problems with storing everything in a JSON file with binary data encoded in Base64 (it’s easier to store images this way; about formulas at the end). Parsing JSON in php (and indeed) is nowhere easier. Saving to a JSON file from *.doc/docx can be done with a Visual Basic macro script in half a day.
If you do not plan any distribution of this software and the environment is known in advance (for example, a testing system at a university with a certain version of MS Office =) ), then you can use the automation of MS Office applications. As far as I remember, on the same Delphi, it was quite easy to screw a custom GUI to an MS Office document if you had at least some experience with COM technology. In this case, it will be enough just to mark up the document correctly. With the web version, if necessary, you will have to turn to the .NET platform (although there is probably already a manual with sorters on this topic in MSDN).
And it is worth recalling: *.docx is nothing more than a renamed *.zip with files in xml format. I don’t know how images are stored there, but parsing an unpacked structure should not be a big deal using any programming language.
What are the formulas, I could not understand from the question. If the objects are *math* or whatever they are called in MS Office, then you need to look for a solution. For example, render beforehand =)). It seems that when it was imported from .docx into *.doc for Office 2003, it was so.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question