-
-
Notifications
You must be signed in to change notification settings - Fork 53
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 listing/titleOrdered/v0. #949
Open
mgautierfr
wants to merge
6
commits into
main
Choose a base branch
from
no_v0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This has few consequences on the creation process: - TitleListingHandle generate only the v1 title listing. - TitleListingHandle store the dirent only if it is a front article, so we can remove the "isFrontArticle" from the dirent. - We don't have to track titleListingHandle as a special handler and we don't need to store `m_titleListBlobOffset`. - We set title idx pos to 0 in the header. So reader part (fast check, getMimeListEndUpperLimit) has to adapt. - The tricky part is that we still need to create the handtlers dirents before setting the entry indexes. This is done through the `handler->getDirents()` call.
Reader part now checks the minor version before trying to read offset in header.
This seems not relevant right now as we have only one category but it will be when we'll have more.
PR openzim/zim-testing-suite#11 changes the zim file wikipedia_en_climate_change to a more recent version. However, no release of zim-testing-suite has been done and no adaptation on libzim side neither. It is time to do so. Especially as we will update our testing content.
PR [TOFIX] adds a new "nov0" test category, ie zim files without v0 title index. We have to adapt our tests to this.
mgautierfr
added a commit
to openzim/zim-testing-suite
that referenced
this pull request
Feb 5, 2025
Generated files are using the commands: ``` mkdir data/nov0 scripts/create_test_zimfiles --all src/small_zimfile_data/ data/nov0 zimrecreate data/withns/wikipedia_en_climate_change_mini_2024-06.zim data/nov0/wikipedia_en_climate_change_mini_2024-06.zim zimrecreate data/withns/wikibooks_be_all_nopic_2017-02.zim data/nov0/wikibooks_be_all_nopic_2017-02.zim zimsplit data/nov0/wikibooks_be_all_nopic_2017-02.zim --prefix data/nov0/wikibooks_be_all_nopic_2017-02_splitted.zim --size 51200 ``` `zimwriterfs`, `zimrecreate`, `zimsplit` are localy build using - commit b5127fc9 of libzim (commit in PR openzim/libzim#949) - commit 482a6708 of zimtools (head of PR openzim/zim-tools#452) Using non released version of libzim was necessary as we need test files to test the PR and without the PR merged, we cannot release a libzim generating such kind of files.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #800
This PR needs testing files from openzim/zim-testing-suite#13
(and a release of zim-testing-suite project to be correctly used here) and so, CI is failing (as expected).
The simpler for locally testing this PR is to copy https://github.com/openzim/zim-testing-suite/tree/no_v0/data/nov0 into you local zim-testing-suite v0.6.0 directory.