{"id":50352655,"url":"https://github.com/zoumas/bookbot-py","last_synced_at":"2026-05-29T21:30:39.092Z","repository":{"id":352024989,"uuid":"1213483025","full_name":"zoumas/bookbot-py","owner":"zoumas","description":"Boot.dev's Build a Bookbot in Python","archived":false,"fork":false,"pushed_at":"2026-04-17T14:26:02.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-17T15:42:48.254Z","etag":null,"topics":["cli","python3","text-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoumas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-17T12:33:35.000Z","updated_at":"2026-04-17T14:28:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zoumas/bookbot-py","commit_stats":null,"previous_names":["zoumas/bookbot-py"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zoumas/bookbot-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fbookbot-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fbookbot-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fbookbot-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fbookbot-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoumas","download_url":"https://codeload.github.com/zoumas/bookbot-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoumas%2Fbookbot-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33672124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","python3","text-processing"],"created_at":"2026-05-29T21:30:37.884Z","updated_at":"2026-05-29T21:30:39.087Z","avatar_url":"https://github.com/zoumas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BookBot\n\nBookBot is a CLI program that reads a book (plain text file) and prints a statistical report of word and character usage.\n\nThis is a guided project from [Boot.dev](https://www.boot.dev).\n\n## Usage\n\n```sh\npython3 main.py \u003cpath_to_book\u003e\n```\n\n### Example\n\n```sh\npython3 main.py books/frankenstein.txt\n```\n\n```\n============ BOOKBOT ============\nAnalyzing book found at books/frankenstein.txt...\n----------- Word Count ----------\nFound 77986 total words\n--------- Character Count -------\ne: 46043\nt: 30365\na: 26743\no: 25225\ni: 24613\nn: 24367\n...\n============= END ===============\n```\n\nBooks are stored as `.txt` files in the `books/` directory (git-ignored).\n\n## Project Structure\n\n```\n├── main.py    # Entry point — reads the book, runs analysis, prints report\n├── stats.py   # Pure functions for word and character counting\n└── books/     # Plain text book files (not committed)\n```\n\n## What I Learned\n\n- **Reading files** — Opening and reading text files with Python's built-in `open()`.\n- **String manipulation** — Splitting text into words, lowercasing, and iterating over characters.\n- **Dictionaries** — Building frequency maps with `dict.get()` for default values.\n- **Sorting** — Sorting dictionary items by value using `sorted()` with a `key` lambda.\n- **Functions** — Breaking logic into small, reusable, well-typed functions across modules.\n- **CLI arguments** — Using `sys.argv` to accept file paths from the command line.\n- **Project structure** — Separating concerns across files and using `.gitignore` to keep data out of version control.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoumas%2Fbookbot-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoumas%2Fbookbot-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoumas%2Fbookbot-py/lists"}