Follow

How to Package an Edition

packaged edition is an edition that has all of its resources (HTMLCSS, JS, etc) bundled up in a zip file. Packaging can remarkably improve download speed and is required for the edition to appear on the Newsstand.

Since the edition is self-contained, the user can access it both online and offline.

The packaging process is guided by the edition's public and hidden ATOM Feeds, which contain a list of the edition's articles with each of their respective manifests. The hidden ATOM feed contains elements that will not be included in the app's Table of Contents.You can see an edition's feed by going to Editions and clicking on the edition's 'ATOM Feed' link on the right-hand side.

To package an edition, click on the 'package' link:

 

The Process

When a user clicks on the 'package' link a new page comes up illustrating the steps taking place and showing any errors that might occur.

Here are the main steps:

1. Downloading Public and Hidden ATOM Feeds

The server makes a request to itself to get the ATOM Feed. Then we parse it and extract the list of manifests referenced.

2. Downloading Manifests

We go through the manifests and create a unique set of the files included.

 

3. Downloading Static Files

We fetch each of the files from the created list. Colouring is based on size, errors or other factors such as slowness.

4. Downloading HTML Pages

We look back to the ATOM feed again and get the list of HTML pages.

 

5. Packaging files 

Creating ZIP for public assets
We get the static files in step 3 and zip them.


Creating ZIP for secure html
We get the HTML pages in set 4 and zip them.
When we unzip these two in the same place the resulting structure is the complete edition content.


Creating Package XML
This XML is basically just for the application to know where to download the necessary parts from and how big they are.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk