"""Read the ten saved HTML pages from the Scraping eBay project."""

import argparse
from pathlib import Path


def main():
    """Print a preview of each practice page supplied on the command line."""
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('--pages-dir', required=True, help='folder containing page-1.html through page-10.html')
    args = parser.parse_args()

    for number in range(1, 11):
        path = Path(args.pages_dir) / f'page-{number}.html'
        html = path.read_text(encoding='utf-8')
        print(path.name)
        print(html[:200])


if __name__ == '__main__':
    main()
