You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking for a way to introduce more option so as to ignore some namespaces or sub namespaces. For example, to support regex might be a good approach. In my case, I have namespaces :A, :A:B, :A:C, :A:C:figures, I am trying to show all namespaces but ignore all pages in :A:C:figures, I try the following
<nspages a -textPages="Pages in namespace [:A:*]" -r -nbCol=2 -exclude:figures>
but it doesn't work. The pages under :A:C:figures still there
The text was updated successfully, but these errors were encountered:
@gturri , the requested feature could be easily implemented by re-using the code of -pregPagesOff option.
Currently -pregPagesOn and -pregPagesOff discard the whole file's namespace, which makes it impossible to exclude all pages from a given namespace. The relevant line is in isFileWanted() function in filePreparer.php:
Actually my main issue is that I'm not sure how this feature should be implemented to make sure it doesn't break existing behavior. For instance, the call to noNS makes it possible to filter pages based on their id, without being impacted by the namespace they're in. So, as you suggest, it would probably be a good idea to add another option. But since I wouldn't be a user of this feature myself, I'm having a hard time understanding which option should be added, and how it should behave exactly.
Since you seem to have quite a good understanding of it all, what about adding the flags you would find useful, and submitting a pull request?
(Adding a flag is quite easy. You may refer to ea747c9 for instance: it's just a matter of adding a default value in _getDefaultOptions, parsing its actual value in the handle method (both in syntax.php) and then making sure the option is passed all the way down to the place where it needs to be read)
I am looking for a way to introduce more option so as to ignore some namespaces or sub namespaces. For example, to support regex might be a good approach. In my case, I have namespaces :A, :A:B, :A:C, :A:C:figures, I am trying to show all namespaces but ignore all pages in :A:C:figures, I try the following
<nspages a -textPages="Pages in namespace [:A:*]" -r -nbCol=2 -exclude:figures>
but it doesn't work. The pages under :A:C:figures still there
The text was updated successfully, but these errors were encountered: