Skip to content

Move 'blurb export' to blurb._export #57

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

Merged
merged 2 commits into from
Aug 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/blurb/_export.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import os
import shutil

from blurb._cli import subcommand


@subcommand
def export() -> None:
"""Removes blurb data files, for building release tarballs/installers."""
os.chdir('Misc')
shutil.rmtree('NEWS.d', ignore_errors=True)
14 changes: 2 additions & 12 deletions src/blurb/blurb.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@
import itertools
import os
import re
import shutil
import sys
import textwrap
import time

from blurb._cli import main, subcommand
from blurb._git import git_add_files, flush_git_add_files
from blurb._template import (
next_filename_unsanitize_sections, sanitize_section,
sanitize_section_legacy, sections, unsanitize_section,
Expand Down Expand Up @@ -474,14 +471,7 @@ def error(*a):
sys.exit("Error: " + s)


@subcommand
def export():
"""
Removes blurb data files, for building release tarballs/installers.
"""
os.chdir("Misc")
shutil.rmtree("NEWS.d", ignore_errors=True)


if __name__ == '__main__':
from blurb._cli import main

main()