Categories
Articles Development Software Development

Interoperable Document Format

Back in April 2020, when the Scrite project started, we used a JSON plain-text format for loading and saving Scrite documents.

Sometime around June 2020, we started using the binary JSON format for loading and saving Scrite documents, with backward compatibility to text based ones.

Later in July 2020, right around the time we announced Scriptalay, we upgraded the file format once again because we had to make space for storing attachments like images assigned to the title page, annotations etc. This format allowed us to store document meta data along with all attachments in a folder and then store a compressed version of the folder as a Scrite document. To open, we simply had to uncompress the Scrite document to get the folder back.

In the true spirit of open-source, we had always planned to port our document format to use the standard ZIP format (the same one WinZip uses). Several document editor applications like Microsoft Word, Excel, PowerPoint and even OpenOffice/Libre applications simply store their documents as a compressed ZIP folder with a custom extension.

As of 0.5.5 beta, we have moved away from our own custom file format to ZIP, while continuing to maintain backward compatibility with the previous formats. We continue to capture Scrite documents as compressed folders, albeit in ZIP file format. This was made possible because of QuaZip – another Qt based open-source library for compressing and uncompressing files and folders in ZIP format. The About-Box has been updated to reflect that.

Starting with 0.5.5, you can take any Scrite document – rename its extension as ZIP and uncompress the file using WinZip or any other archiving tool of your choice and “look inside” the document. This is especially useful if you want to take a Scrite document and integrate it with your own tools.

Version 0.5.5-Beta is still a few weeks, if not a month, away. But you can already download a nightly build and see this in action right away if you want.

One reply on “Interoperable Document Format”