openzim / nautilus

Turns a collection of documents into a browsable ZIM file
GNU General Public License v3.0
19 stars 14 forks source link

Inputs (in particular the collection.json) should be checked #29

Closed kelson42 closed 2 months ago

kelson42 commented 2 years ago

See #28. After many iterations we have achieved to buidl a ZIM, but the ZIM is incorrect and we have no clue why.

The check should, at start, verify that everything is OK (and reports/stops otherwise):

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

rgaudin commented 2 months ago

This is mostly obsolete. JSON is the source of trust and entries are checked early. Only recent URL entries are not completely checked

kelson42 commented 2 months ago

@rgaudin I don't understand your last comment: do we check data in json are correct? If "yes, how? If "no", why this doesnot matter?

rgaudin commented 2 months ago

JSON entries are either a references to a file in the ZIP archive (if using one) or an arbitrary URL. If an URL, we check that the URL works (HTTP 200) ; if not, we check that it is indeed inside the ZIP.