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

LongDescription incorrectly marked as mandatory #408

Closed
rgaudin opened this issue May 27, 2024 · 2 comments · Fixed by #411
Closed

LongDescription incorrectly marked as mandatory #408

rgaudin opened this issue May 27, 2024 · 2 comments · Fixed by #411
Assignees
Milestone

Comments

@rgaudin
Copy link
Member

rgaudin commented May 27, 2024

zimwriterfs usage:

Usage: zimwriterfs [mandatory arguments] [optional arguments] HTML_DIRECTORY ZIM_FILE

Purpose:
	Packing all files (HTML/JS/CSS/JPEG/WEBM/...) belonging to a directory in a ZIM file.

Mandatory arguments:
	-w, --welcome		path of default/main HTML page. The path must be relative to HTML_DIRECTORY.
	-I, --illustration	path of ZIM file illustration. The path must be relative to HTML_DIRECTORY and the image a 48x48 PNG.
	-l, --language		language code of the content in ISO639-3
	-t, --title		title of the ZIM file
	-d, --description	short description of the content
	-L, --longDescription	long description of the content
	-c, --creator		creator(s) of the content
	-p, --publisher		creator of the ZIM file itself

	HTML_DIRECTORY		path of the directory containing the HTML pages you want to put in the ZIM file.
	ZIM_FILE		path of the ZIM file you want to obtain.

Optional arguments:
	-v, --verbose		print processing details on STDOUT
	-h, --help		print this help
	-V, --version		print the version number
	-m, --clusterSize	number of bytes per ZIM cluster (default: 2048Kb)
	-J, --threads		count of threads to utilize (default: 4)
	-x, --inflateHtml	try to inflate HTML files before packing (*.html, *.htm, ...)
	-r, --redirects		path to a TSV file containing a list of redirects (url title target_url).
	-j, --withoutFTIndex	don't create and add a fulltext index of the content to the ZIM.
	-a, --tags		tags - semicolon separated
	-e, --source		content source URL
	-n, --name		custom (version independent) identifier for the content
	-o, --flavour		custom (version independent) content flavour
	-s, --scraper		name & version of tool used to produce HTML content
	--skip-libmagic-check	Accept to run even if magic file cannot be loaded (mimetypes in the zim file may be wrong).

Example:
	zimwriterfs --welcome=index.html --illustration=illustration.png --language=fra --title=foobar --description=mydescription \
		--creator=Wikipedia --publisher=Kiwix ./my_project_html_directory my_project.zim

Documentation:
	zimwriterfs source code: https://github.com/openzim/zim-tools
	ZIM format: https://openzim.org

LongDescription metadata is set via --longDescription which is marked as mandatory while it probably should not…
Actually, the flag is not checked for being used but if not set or set empty:

Metadata doesn't meet the following requirements:
    LongDescription shouldn't be shorter than Description

To me this is an incorrect interpretation of the spec which says “extended description of content” not alternative longer description. The fact that it should be longer than description is preposterous.

@rgaudin
Copy link
Member Author

rgaudin commented Jun 2, 2024

Last paragraph of the ticket has not been answered. You just fixed the erroneous check.
Either the check should not be there or the spec should be more precise about LongDescriotion in regard to Description

@kelson42
Copy link
Contributor

kelson42 commented Jun 2, 2024

Yes, we should probably more explicit in the spec

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

Successfully merging a pull request may close this issue.

2 participants