Importing Content
Purple Importer
Plain PDF View
PDF view with read mode and text to speech
PDF view with read mode and text to speech
Structured data import to HUB only. No PDF view
- Import CSV file with metadata information (price, publication date, issue name etc.)
- An sFTP server connected to Purple (provided by Purple)
For establishing the enhanced workflow with Xcago, the following additional assets/information are required:
- Publication list with various details to be filled in (pages, publication dates etc.)
- PubCode, delivered by XCago
- sFTP Software (Filezilla, Cyberduck or any other FTP Tool)
- Login credentials (provided by Sprylab)
As a Purple User you can upload a CSV file containing metadata and file references for the issues you wish to import. The Purple Importer constantly checks (every few minutes) to see if a new CSV file has been uploaded or if existing ones have been updated. A CSV file can be placed anywhere in the directory and the Importer will find it.
Introduction to CSV
- CSV (Comma-separated Values) is a file format that uses special characters as a delimiter between values.
- Each line of the file is a data record and each record consists of one or more fields, separated by commas.
- A CSV file typically stores tabular data (numbers and text) in plain text, in which case each line will have the same number of fields.
CSV requirements for Purple
- Each line of the CSV file must specify exactly one issue.
- Use only semicolon (;) as a delimiter. Do not use any other delimiter.
- Use only UTF-8 when saving the CSV files.
- Do not use additional delimiters such as comma, tab etc.
- The CSV file has to end with ".csv".
- The columns can be used to specify metadata (e.g. issue or publication name) and to reference files (e.g. input files or covers).
Example structure of a Purple import CSV file
Example import CSV file view in a text editor
Column name | Description |
issue name* | The issue name in Purple Manager (mandatory) |
publication* | Publication name in Purple Manager (mandatory) |
publication date* | Mandatory date that will be set as publication date in the issue (date or date&time, see publication date formats below) |
unpublish date | Optional date that is set as the date an issue will be unpublished at (date or date&time, see publication date formats below) |
folder* | Relative path to an input file |
team | The Purple Manager team |
issue alias | The issue alias in the Purple Manager |
issue description | The description of the issue in the Purple Manager |
issue number | The issue number in Purple Manager |
android product | The Android product id in Purple Manager |
ios product | The iOS product id in Purple Manager |
web product | The web product id in Purple Manager |
cover | Relative path to a cover file |
custom[xyz] | Can be used to specify custom property "xyz" in Purple Manager. Each custom property requires a separate column. |
access | Set issue access in Purple Manager (see below). |
preview pages | Specify individual pages used for preview. Can be a list of individual pages and/or ranges (i.e. "1,4-6,12") |
(* mandatory)
The issue name is used as the unique identifier for the publication and therefore has to be unique within a publication.
Allowed publication date formats:
Explanation of symbols:
References to files (input files or covers) need to be relative to the CSV file.
.└── upload├── MagazineX.csv├── cover│ └── coverA.png└── input.zip |
folder;publication name;issue name;...input.zip;...;...cover/coverA.png;... |
A file can be referenced from more than one line in the CSV file. However, the Purple Importer requires a unique one-to-one relationship between a CSV line and a file reference. In order to support multiple references to the same file, the Importer does some preparation work while collecting the output data from sFTP. The importer breaks the many to one relationship between the csv lines and each file reference by creating a unique copy of the file for each individual csv line. This is done by appending a unique (within the scope of the csv file), repeatable string to the file name. When this is done, the original file is deleted. This is necessary for the importer to work properly. These copies are visible on the sFTP and should not be touched.
The following date formats are allowed:
- yyyy-MM-dd HH:mm:ss
- yyyy-MM-dd
- dd.M.yyyy HH:mm:ss
- dd.M.yyyy
- dd/MM/yyyy HH:mm:ss
- dd/MM/yyyy
Year abbreviation by two digits (f.e. “18” for “2018”) is also supported for every date format.
- If a cover is specified in the CSV, it will be always preferred over a cover that the transformer might extract from the input.
- Cover must be of file type “jpg/jpeg” or “png”
By extending the “file” column name you can restrict input files to specific platforms and devices.
iOS, android
phone, tablet
- Input will be accessible across all platforms and devices, including web: "file"
- Input will be accessible for android tables only: "file android tablet"
- Input will be accessible on phone for all platforms: "file phone"
- Input will be accessible on ios for all devices: "file ios"
The issue access can be specified per issue in the CSV, or globally in the users config.yml-file (only very limited persons have access to that file)
Possible values:
- free
- paid
- locked (sets the access to entitlement only)
If no explicit value for "access" is given the default mechanism is used to determine if an issue is paid or free content. The default mechanism sets the issue as paid content when any product id (iOS, Android) is set.