Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove format definition from RC manifest #42

Open
da1nerd opened this issue Apr 27, 2017 · 3 comments
Open

Remove format definition from RC manifest #42

da1nerd opened this issue Apr 27, 2017 · 3 comments

Comments

@da1nerd
Copy link
Contributor

da1nerd commented Apr 27, 2017

Some Day

Rather than restricting an RC to a single format we can allow mixed content and simply rely on file extensions to determine how to use the contained files.
This will allow us to do things like combining tA images with the text for a single download and allow referencing the images with relative links which will work both offline and online.

@da1nerd
Copy link
Contributor Author

da1nerd commented Apr 28, 2017

On the other hand. It's very convenient to have the format available if the RC is indeed composed of a single format. We could make this field optional so we have the best of both worlds. If the field is empty we'll just assume this RC may contained mixed formats.

@jag3773 jag3773 changed the title Remove format definition form RC manifest Remove format definition from RC manifest May 17, 2017
@jag3773
Copy link
Contributor

jag3773 commented May 17, 2017

What if we turn format into an array instead?

@da1nerd
Copy link
Contributor Author

da1nerd commented May 17, 2017

That could potentially be fine, though there's another thing to consider.
In the api we are using the format like so:

"formats": [
	{
		"format": "application/zip; content=text/usfm",
		"modified": "2016-10-03",
		"size": 2171200,
		"url": "https://cdn.door43.org/en/ulb/v7/en-ulb-usfm.zip",
		"signature": "https://cdn.door43.org/en/ulb/v7/en-ulb-usfm.zip.sig"
	},
	{
		"format": "application/zip; type=audio content=audio/mp3 conformsto=rc0.2",
		"modified": "2016-10-03",
		"size": 2171200,
		"url": "https://cdn.door43.org/en/ulb/v7/en-ulb-rc-audio.zip",
		"signature": "https://cdn.door43.org/en/ulb/v7/en-ulb-rc-audio.zip.sig"
	}
]

e.g. application/zip; content=text/usfm. Allowing multiple formats to an RC makes this field problematic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants