Repub (.epub) importer overview
Learn about what's needed to set up a customer with a repub workflow
Table of Contents
Repub (.epub) is another format we can use for HTML conversions and Enhanced PDF. The Repub format gives us more metadata and more inline information. It is a format provided by Google, but is used by our partner XCago to provide a richer experience.
The main difference between Repub and NITF (the previous XCago format) is that Repub allows for more inline classes and styling. Because of this, this format does not map into the header group meta fields in Express but places all article content into the body.
We are in the process of upgrade ALL of our XCago Enhanced PDF customers from NITF to Repub.
Known issues with repub
Editorial process isn't the best
This is because all content is imported into the body. the classes used to indicate headline, summary and author etc are are only visible to user if editor is set to ‘text mode’ which means if content is updated or deleted (either intentionally or by accident) it's difficult to know which class has been removed without viewing the revisions and ultimately an basic understanding of HTML classes is needed to add it back in.
One solution for this, is to apply custom editor styling that better previews what the content will look like. This means if a class has been removed accidentally, you'll see the effects of that in the editor before any changes are saved. In addition to this, we can add custom typography options to the WYSIWYG editor e.g headline, summary, byline etc with the same repub classes. This means if a class has been removed, the editor can reapply.
See The Week US example for reference.
Only minimal skin supports the default repub styles
CSS to support these new repub classes only exists on the Minimal Skin for now (on Express). The theme will bring the styling in line with what the skin would normally look like if you were using the header group fields.
Even though there are no default styles applied to other Express skins, this does not restrict the ability to upload .epub editions.
Previous custom CSS will not automatically apply to repub articles
If any custom CSS has been applied to a customers app content previously, it will likely need a front-end developer to reapply the styles to the repub/xcago classes.
Checking the original .epub file
Sometimes we need to check the original .epub file that X-CAGO provide us. You can refer to the `repub_body_original` found in the custom fields to see the original mark up that gets injected in our body. This should show you original content before any manipulation happens on our side. Alternatively, you can look inside the .epub files (see below).
If you need to look at publication order/page order, it may be necessary to unzip the .epub to look at the xml files directly. To do this, you'll need to download the .epub from S3 (support and some devs have access) and then in your terminal use the command `unzip file.epub` (replacing file.epub with your actual file path and name) to unzip the file in your current directory (so remember to place this into a good location on your computer before you unzip). This then creates folders which consist of XML files amongst other TOC ordering that create the .epub.
The .epub file isn't getting ingested by our CMS
We all strive to ensure our editions/newspapers are uploaded promptly. In the event of a delay, there are several steps you can take before reaching out to X-CAGO for assistance in resolving the issue with .epub files:
- Firstly, check for the missing edition in the DIST and review the feed history to verify if it was updated but failed to upload. If it's not found there,
- Proceed to check the CMS to see if the edition is listed as 'draft' or 'pending'. If it's not located there either,
- Navigate to the S3> repub importer bucket and select the specific client folder bucket for inspection.
- Download the 'filename_feed.zip' and extract it on your local computer.
- Open the unzipped file and review the 'filename_feed.pdf' to confirm the total number of pages.
- Examine the individual PDF pages within the PDF folder to ensure they match the total pages indicated in 'filename_feed.pdf'.
- If inconsistencies are detected, kindly CC xco044@x-cago.com on the email support ticket raised by the client and request a reimport of the .epub files.