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 articleListToIgnore argument and support comma seperated lists fo… #1706

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

uriesk
Copy link
Collaborator

@uriesk uriesk commented Jan 3, 2023

…r it and articleList

Please review and tell me if allowing comma seperated lists like
--articleList Title1,Title2
is ok.
Thanks

@uriesk uriesk force-pushed the artclelistignore branch 2 times, most recently from 81df4a2 to cabcfe0 Compare January 3, 2023 13:33
@uriesk
Copy link
Collaborator Author

uriesk commented Jan 3, 2023

force-pushed cause my editor touched some file it shouldn't have

@kelson42 kelson42 self-requested a review January 4, 2023 10:29
@kelson42
Copy link
Collaborator

kelson42 commented Jan 4, 2023

@uriesk Thank you for your PR. At a first look it LGTM. I assume you don't have changed anything in the way --articleList works (from a user perspective)I will test is and have a look in detail. Please add or improve an existing automated test for this new feature. BTW CI seems to fail.

@uriesk
Copy link
Collaborator Author

uriesk commented Jan 4, 2023

I can't test --articleListLtoIgnore without actually making a zim of a whole wiki. If --articleList says X,Y,Z and --articleListToIgnore says Y, then Y is still going to be fetched.

Unless there is any other software that imports getArticlesByNS, everything behaves the same.

@kelson42
Copy link
Collaborator

kelson42 commented Jan 4, 2023

I would recommend that --articleListToIgnore always applies (even with --articleList). I understand the contradictory aspect of it (maybe you can issue a warning on the console), but otherwise it might clearly lead to misunderstandings. That will also allow you to test it easily.

@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Base: 69.01% // Head: 68.93% // Decreases project coverage by -0.08% ⚠️

Coverage data is based on head (1338a4d) compared to base (0394f2e).
Patch coverage: 73.33% of modified lines in pull request are covered.

❗ Current head 1338a4d differs from pull request most recent head 5c2eb92. Consider uploading reports for the commit 5c2eb92 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1706      +/-   ##
==========================================
- Coverage   69.01%   68.93%   -0.09%     
==========================================
  Files          26       26              
  Lines        2395     2414      +19     
  Branches      467      474       +7     
==========================================
+ Hits         1653     1664      +11     
- Misses        579      585       +6     
- Partials      163      165       +2     
Impacted Files Coverage Δ
src/parameterList.ts 100.00% <ø> (ø)
src/util/mw-api.ts 82.95% <14.28%> (-6.07%) ⬇️
src/mwoffliner.lib.ts 67.00% <81.25%> (+0.81%) ⬆️
src/Dump.ts 72.91% <100.00%> (+0.87%) ⬆️
src/util/redirects.ts 100.00% <100.00%> (ø)
src/util/misc.ts 79.18% <0.00%> (-0.21%) ⬇️
src/util/const.ts 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@uriesk uriesk force-pushed the artclelistignore branch 2 times, most recently from a56b06f to 8d678f5 Compare January 4, 2023 12:59
@uriesk
Copy link
Collaborator Author

uriesk commented Jan 4, 2023

@kelson42 did it how you recommended and added a test, should be done now

@uriesk
Copy link
Collaborator Author

uriesk commented Jan 4, 2023

ok, sorry, but now :)

Copy link
Collaborator

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

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

LGTM

@kelson42 kelson42 added this to the 1.12.0 milestone Jan 5, 2023
@kelson42
Copy link
Collaborator

kelson42 commented Jan 5, 2023

@uriesk Would you agree to close #1705 based on this PR?

Copy link
Contributor

@pavel-karatsiuba pavel-karatsiuba left a comment

Choose a reason for hiding this comment

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

LGTM

@kelson42 kelson42 merged commit fd4a812 into openzim:main Jan 5, 2023
@uriesk
Copy link
Collaborator Author

uriesk commented Jan 5, 2023

@uriesk Would you agree to close #1705 based on this PR?

yes

@kelson42
Copy link
Collaborator

kelson42 commented Jan 5, 2023

@uriesk We have the two Minecraft recipes here. I have just requested to regenerate them. If the ZIM are OK, we could then move them to the official repository. Thank you anyway very much for your help on this. I'm sure other Fandom wikis will appreciate to be scrapable with MWoffliner. I have also invited you to the repository, so you get the right to write and push directly branches/PR to our repository. This will help if you want to submit other patches.

@uriesk
Copy link
Collaborator Author

uriesk commented Jan 5, 2023

@uriesk We have the two Minecraft recipes here. I have just requested to regenerate them. If the ZIM are OK, we could then move them to the official repository. Thank you anyway very much for your help on this. I'm sure other Fandom wikis will appreciate to be scrapable with MWoffliner. I have also invited you to the repository, so you get the right to write and push directly branches/PR to our repository. This will help if you want to submit other patches.

thanks a lot

@uriesk uriesk deleted the artclelistignore branch January 5, 2023 18:05
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