Skip to content

Commit 63e7126

Browse files
committed
add wildcard matching
1 parent f41068d commit 63e7126

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

astropylibrarian/cli/index.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import Awaitable, List, Optional
99

1010
import aiohttp
11+
import fnmatch
1112
import typer
1213

1314
from astropylibrarian.algolia.client import AlgoliaIndex
@@ -126,6 +127,9 @@ async def run_index_tutorial_site(
126127
relative_path = str(PosixPath(html_path.relative_to(site_dir)))
127128
if relative_path in ignore_paths:
128129
continue
130+
# allow wildcard matching with ignore_paths
131+
if fnmatch.fnmatch(relative_path, ignore_paths):
132+
continue
129133
page_url = f"{root_url}/{relative_path}"
130134
tasks.append(
131135
index_tutorial_from_path(

0 commit comments

Comments
 (0)