-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Expose methods for listing files #102
base: master
Are you sure you want to change the base?
Conversation
I don't understand |
I mostly implemented it because of the suggestion you made in #35 but maybe that got outdated over the years. I think projectionist has the advantage that projections only work in certain scope. Say for instance someone working on a project has defined projections for I agree that having to call the function three times is clunky though... It makes more sense to turn the argument into a list of projections. It could also be beneficial to add projection properties to the output, i.e. the |
I can only assume that I meant a single type, not a single projection key. I don't really understand your example. It sounds like you are saying you decide if PNG files make it into the archive based on whether someone defined a |
The example was fictional and I couldn't come up with a better idea.
Yeah, I've only been using I'll rename |
Remove function to list projections
d91e03d
to
961f3ff
Compare
Sorry, got sidetracked. I just amended the commit from before to include the mentioned changes. Documentation has been updated as well. |
Fix help coloring Fix duplicate helptag
|
Hey, thanks for the awesome plugin!
I picked up where #35 left off (new PR because I'm missing write access) and implemented your suggestion about exposing files for a single projection.
All-in-all, three functions are exposed for more or less granular listings of files:
list_project_files()
returns a dict containing files for the whole active projectlist_files_for_projection(projection)
returns a dict of files matching a single projection. The projection given as the argument has to be identical to a projection as defined in the config and only the first projection found is returned. I thought about passing a pattern as argument to match multiple projections but that's a bit too crazy imo.list_files_for_category(category)
returns a list of files of a single "category" (I stuck with the term that Expose a method to list commands and scoped files #35 used but it might make more sense to call it "type" now that I think about it - I can adjust that if you'd like)I added the third function because I imagine that a user might want to get a list of all his "test"s and do something with them.
If you agree with the changes so far I can add some help docs for them.