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

Add support for alias (in addition to redirection) #148

Open
benoit74 opened this issue Mar 21, 2024 · 4 comments
Open

Add support for alias (in addition to redirection) #148

benoit74 opened this issue Mar 21, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@benoit74
Copy link
Collaborator

Just like we have add_redirect in zim/creator and add_redirects_to_zim in zim/filesystem, we should now add support for the "new" ZIM alias with add_alias in zim/creator and add_aliases_to_zim in zim/filesystem

@benoit74 benoit74 added the enhancement New feature or request label Mar 21, 2024
@benoit74 benoit74 self-assigned this Mar 21, 2024
@rgaudin
Copy link
Member

rgaudin commented Mar 22, 2024

I'd like us to implement this as zimwriterfs does (I don't think it's there yet) so this features keeps being a close-to-drop-in alternative (we should implement a drop-in zimwriterfs script at some point).
If we are to implement this first, maybe coordinate with @kelson42 so the input can be the same.

@benoit74 benoit74 added this to the 3.4.0 milestone Mar 25, 2024
@benoit74
Copy link
Collaborator Author

@kelson42 three questions:

  • do you have any plans to add support for aliases in zimwriterfs?
  • do you intend to use a different format that the one used for redirects? (libzim API seems identical)
  • shouldn't we add support for isFront hint in the TSV file for both redirect and alias? (covering all hints is pretty difficult but this one is pretty important is most scenarii)

@kelson42
Copy link
Contributor

  • do you have any plans to add support for aliases in zimwriterfs?

No, not even a ticket! :(

  • do you intend to use a different format that the one used for redirects? (libzim API seems identical)

I guess you refer to the --redirects option, but this is actually not the only way to create redirects in a ZIM. If you have an HTML file with an HTML redirect, then it will create a redirect as well.

I believe that checking the files (symlink, hardlinks, same files) would be the first approach to create aliases.

If there is a clear need to support a similar option like --redirects for aliases, then I guess we will have to implement it.

  • shouldn't we add support for isFront hint in the TSV file for both redirect and alias? (covering all hints is pretty difficult but this one is pretty important is most scenarii)

AFAIK (hope I'm right here) everything is Front for zimwriterfs... so not sure about the need, but here again if there is a need, we will have too.

@benoit74
Copy link
Collaborator Author

OK, then let's remove the milestone for now until the needs become clearer. I don't even remember when I found this need. Probably around Youtube or TED scrapers ... not sure.

@benoit74 benoit74 removed this from the 3.4.0 milestone Jun 11, 2024
@benoit74 benoit74 added this to the backlog milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants