(self, items: list[Item])
| 981 | file.write_text("\n\n".join(parts).strip()) |
| 982 | |
| 983 | def write(self, items: list[Item]) -> None: |
| 984 | self.directory.mkdir(exist_ok=True, parents=True) |
| 985 | self.write_indexes() |
| 986 | |
| 987 | items.sort(key=lambda i: i.albumartist) |
| 988 | for artist, artist_items in groupby(items, key=lambda i: i.albumartist): |
| 989 | self.write_artist(artist.strip(), artist_items) |
| 990 | |
| 991 | d = self.directory |
| 992 | text = f""" |
| 993 | ReST files generated. to build, use one of: |
| 994 | sphinx-build -b html {d} {d / "html"} |
| 995 | sphinx-build -b epub {d} {d / "epub"} |
| 996 | sphinx-build -b latex {d} {d / "latex"} && make -C {d / "latex"} all-pdf |
| 997 | """ |
| 998 | ui.print_(textwrap.dedent(text)) |
| 999 | |
| 1000 | |
| 1001 | BACKEND_BY_NAME = { |
no test coverage detected