<jupyter_start><jupyter_text>Build Package Command<jupyter_code>%load_ext literary.module
from pathlib import Path

from traitlets import List, Unicode, default

from ..core.package import PackageBuilder
from .app import LiteraryApp
class LiteraryBuildApp(LiteraryApp):
    description = "Build a pure-Python package from a set of Jupyter notebooks"
    aliases = {
        **LiteraryApp.aliases,
        "ignore": "PackageBuilder.ignore_patterns",
        "output": "PackageBuilder.generated_dir",
        "packages": "PackageBuilder.packages_dir",
    }
    flags = {
        "clear": (
            {"PackageBuilder": {"clear_generated": True}},
            "Clear generated directory before building.",
        )
    }

    def start(self):
        builder = PackageBuilder(parent=self)
        builder.build()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10201660735468565, 'fraction_numerical': 0.0, 'mean_word_length': 3.3282051282051284, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '109038', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 240, 'n_tokens_neox': 235, 'n_words': 58, 'path': 'src/literary/commands/build.ipynb', 'repo_name': 'agoose77/literary', 'size': '843'}