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

feature: ZimMount #348

Closed
wants to merge 5 commits into from
Closed

feature: ZimMount #348

wants to merge 5 commits into from

Conversation

lyc8503
Copy link
Collaborator

@lyc8503 lyc8503 commented May 16, 2023

Current progress:

  • Options to mount Zim files via command line interface
  • List files

Not working:

  • Tests / CI are failing
  • [ ]

For kiwix/overview#79

@mgautierfr mgautierfr self-requested a review May 16, 2023 13:27
Copy link
Collaborator

@mgautierfr mgautierfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This first version seems good (well, it is a first version :) )

While we are here, I want to mention a important thing:

A zim file can contains this four entries:

  • foo
  • foo/
  • foo/index.hmtl
  • foo/bar.html.

So we have two entries in the zim files that are also directory on the filesystem. We have to handle that correctly (ignore them ? Map them to something else ?) and not crash or hide children.

For now, we would create a foo node with a index.
Then we would create , index.html and bar.html nodes in foo node.
But as the foo node has a index, it will be shown as a file on filesystem and other entries will be hidden.

I think this issue is the real challenge here. All the others are pretty technical.

src/meson.build Outdated Show resolved Hide resolved
src/zimmount/zimmount.cpp Show resolved Hide resolved
src/zimmount/zimmount.cpp Outdated Show resolved Hide resolved
src/zimmount/zimmount.h Outdated Show resolved Hide resolved
src/zimmount/zimmount.h Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Patch coverage has no change and project coverage change: -27.44 ⚠️

Comparison is base (b352392) 27.43% compared to head (a88902c) 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #348       +/-   ##
==========================================
- Coverage   27.43%   0.00%   -27.44%     
==========================================
  Files          26      20        -6     
  Lines        2544    1683      -861     
  Branches     1389     926      -463     
==========================================
- Hits          698       0      -698     
- Misses       1333    1683      +350     
+ Partials      513       0      -513     

see 24 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lyc8503
Copy link
Collaborator Author

lyc8503 commented May 25, 2023

This first version seems good (well, it is a first version :) )

While we are here, I want to mention a important thing:

A zim file can contains this four entries:

  • foo
  • foo/
  • foo/index.hmtl
  • foo/bar.html.

So we have two entries in the zim files that are also directory on the filesystem. We have to handle that correctly (ignore them ? Map them to something else ?) and not crash or hide children.

For now, we would create a foo node with a index. Then we would create , index.html and bar.html nodes in foo node. But as the foo node has a index, it will be shown as a file on filesystem and other entries will be hidden.

I think this issue is the real challenge here. All the others are pretty technical.

I took a look at the implementation of zimdump, and to my understanding, it would dump the file foo to _exceptions/foo and create foo folder (and its children) in its original place in such case.

I think I could try to implement the same behavior in zimmount.

@kelson42 kelson42 closed this Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants