Skip to content

Commit

Permalink
Index what folders each pack contains
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Aug 27, 2024
1 parent 1d7425c commit f6e8f91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions indexer/src/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class PackStats(BaseModel):
icons: int = 0
passport: List[str] = []
fonts: List[str] = []
folders: List[str] = []


class Pack(BaseModel):
Expand Down Expand Up @@ -282,6 +283,7 @@ def parse(self, packpath: str) -> Pack:
pack.stats.icons += icons
pack.stats.passport = sorted(passport.union(pack.stats.passport))
pack.stats.fonts = sorted(fonts.union(pack.stats.fonts))
pack.stats.folders.append(pack_entry.name)
else:
logging.warn(
f"Pack {pack_entry.name!r} in set {pack_set.name!r} is empty"
Expand Down

0 comments on commit f6e8f91

Please sign in to comment.