{"id":20549468,"url":"https://github.com/amruthlp12/madlibs-generator","last_synced_at":"2025-06-25T21:35:49.890Z","repository":{"id":243251354,"uuid":"811890929","full_name":"AmruthLP12/Madlibs-Generator","owner":"AmruthLP12","description":"Mad Libs Generator  A fun and interactive Python project that allows users to create personalized stories by filling in placeholders with their own words. Customize your own stories by modifying the template and generate unique outputs each time!","archived":false,"fork":false,"pushed_at":"2024-06-07T16:29:25.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T05:33:10.779Z","etag":null,"topics":["customizable-templates","fun-project","game","game-development","interactive-game","mad-libs-generator","personalized-stories","placeholders-text","python","python-project","python-script","python3","single-player-game","solo-project","sologamedev","user-input-story"],"latest_commit_sha":null,"homepage":"https://github.com/AmruthGowda91200/Madlibs-Generator","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmruthLP12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-06-07T14:12:10.000Z","updated_at":"2024-06-07T16:36:45.000Z","dependencies_parsed_at":"2024-06-07T16:36:21.655Z","dependency_job_id":null,"html_url":"https://github.com/AmruthLP12/Madlibs-Generator","commit_stats":null,"previous_names":["amruthgowda91200/madlibs-generator","amruthlp12/madlibs-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AmruthLP12/Madlibs-Generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmruthLP12%2FMadlibs-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmruthLP12%2FMadlibs-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmruthLP12%2FMadlibs-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmruthLP12%2FMadlibs-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmruthLP12","download_url":"https://codeload.github.com/AmruthLP12/Madlibs-Generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmruthLP12%2FMadlibs-Generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261958061,"owners_count":23236391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["customizable-templates","fun-project","game","game-development","interactive-game","mad-libs-generator","personalized-stories","placeholders-text","python","python-project","python-script","python3","single-player-game","solo-project","sologamedev","user-input-story"],"created_at":"2024-11-16T02:18:06.666Z","updated_at":"2025-06-25T21:35:49.864Z","avatar_url":"https://github.com/AmruthLP12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Mad Libs Generator\n\nThe Mad Libs Generator is a fun Python project that allows users to create personalized stories by filling in placeholders with their own words. The script reads a template story with placeholders from a file and prompts the user for inputs to replace these placeholders, resulting in a unique story each time.\n\n\n\n## Table of Contents\n\nFeatures  \nRequirements  \nInstallation  \nUsage  \nExample Outputs   \nHow It Works  \nCustomization  \nContributing  \nLicense  \n## Features \n* Reads story templates with placeholders from a file.  \n* Prompts users for various words to fill in the placeholders.  \n* Replaces placeholders with user inputs to create a customized story.  \n* Supports a variety of placeholder types such as \u003cnoun\u003e, \u003cadjective\u003e, \u003cplace\u003e, etc.  \n* Outputs the final story with the user's inputs.\n## Requirements\n\n* Python 3.x  \n* A text file containing the story template (e.g., `story.txt`)\n## Installation\n\n1. Clone the Repository:\n```bash\n  git clone https://github.com/AmruthGowda91200/mad-libs-generator.git\n```\n\n2. Navigate to the Project Directory:\n    ```bash\n    cd mad-libs-generator\n    ```\n\n3. Ensure Python 3.x is Installed:\n\n    ```bash\n    python3 --version\n    ```\n## Usage\n\n1. Create a Story Template:\n\n* Create a file named story.txt in the project directory.\n* Add a story with placeholders in the following format:\n\n```txt\nIn the land of \u003cplace\u003e, a \u003cadjective\u003e \u003cnoun\u003e named \u003cname\u003e decided to explore the \u003cadjective\u003e \u003cfantasy_place\u003e. With a \u003cadjective\u003e \u003cobject\u003e and a \u003cadjective\u003e \u003cnoun\u003e, \u003cname\u003e ventured into the \u003cadjective\u003e forest.\n\n```\n\n2. Run the Script:\n\n```bash\npython3 madlibs_generator.py\n\n```\n\n3. Follow the Prompts:\n\n* The script will prompt you to enter words for each placeholder.\n* Type in your responses and press Enter.\n\n4. View the Customized Story:\n\n* After entering all required words, the script will display the completed story.\n\n\nExample Command:\n\n```bash\npython3 madlibs_generator.py\n\n```\n\nExample Prompt:\n\n```bash\nEnter a word for \u003cplace\u003e: Wonderland\nEnter a word for \u003cadjective\u003e: magical\nEnter a word for \u003cnoun\u003e: explorer\nEnter a word for \u003cname\u003e: Alice\n...\n\n```\n\nExample Story Output:\n\n``` bash \nIn the land of Wonderland, a magical explorer named Alice decided to explore the magical Enchanted Forest. With a magical map and a magical backpack, Alice ventured into the magical forest.\n...\n\n```\n\n\n## How It Works\n\nThe script reads the content of `story.txt`, identifies placeholders within `\u003c` and `\u003e`, prompts the user for words corresponding to these placeholders, and replaces them in the story to generate a customized output. Here’s a step-by-step breakdown:\n\n1. Reading the Story:\n\n```python \nwith open(\"story.txt\", \"r\") as f:\n    story = f.read()\n```\n\n2. Finding Placeholders:\n\n* It scans the story for words within \u003c and \u003e.\n* Extracts and stores unique placeholders in a set.\n3. Prompting User:\n\n* Asks the user to input words for each placeholder.\n* Stores these inputs in a dictionary.\n4. Replacing Placeholders:\n\n* Replaces each placeholder in the story with the corresponding user input.\n* Outputs the final customized story.\n## Customization\n\nYou can customize the Mad Libs generator by:\n\n* Changing the Story Template: Edit `story.txt` with different placeholders and story content.\n* Adding More Placeholders: Include a variety of placeholders such as `\u003cverb\u003e`, `\u003ccolor\u003e`, etc.\n* Modifying the Script: Adjust the code to handle new types of placeholders or additional features.\n## Contributing\n\nContributions are welcome! To contribute:\n\n1. Fork the repository.\n2. Create a new branch (git checkout -b feature-branch).\n3. Make your changes and commit (git commit -m 'Add feature').\n4. Push to the branch (git push origin feature-branch).\n5. Open a Pull Request.\n\n\n\n\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\nThis project is licensed under the MIT License. See the `LICENSE` file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famruthlp12%2Fmadlibs-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famruthlp12%2Fmadlibs-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famruthlp12%2Fmadlibs-generator/lists"}