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

Excludes mit Wildcards in Pfad #85

Open
murieletrentini opened this issue Oct 12, 2017 · 3 comments
Open

Excludes mit Wildcards in Pfad #85

murieletrentini opened this issue Oct 12, 2017 · 3 comments
Labels

Comments

@murieletrentini
Copy link
Contributor

Wäre schön, wenn man ganze Formate excluden könnte
z.B.

exclude: - 'PPT/*.pptx'

@Excape Excape added the feature label Oct 12, 2017
@Excape
Copy link
Contributor

Excape commented Oct 12, 2017

Momentan können wildcards ohne Pfadangabe verwendet werden, also z.B. *.pptx.

Allerdings geht die Kombination von Pfaden und wildcards nicht: folder/*.pptx

def exclude_path(self, path, excludes):
filename = os.path.split(path)[1]
for exclude in excludes:
if exclude.startswith('/'):
if path.startswith(exclude[1:]):
return True
elif '/' in exclude:
if exclude in path:
return True
elif fnmatch.fnmatch(filename, exclude):
return True
return False

@murieletrentini
Copy link
Contributor Author

cool. merci

@Excape
Copy link
Contributor

Excape commented Oct 12, 2017

Ich lasse das Issue mal offen. Wäre schön, wenn die Wildcards mit den Pfaden kombiniert werden können

@Excape Excape reopened this Oct 12, 2017
@Excape Excape changed the title exlude von Dateiformaten Excludes mit Wildcards in Pfad Oct 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants