{"id":21978131,"url":"https://github.com/codeterrayt/webcodeoptimizer","last_synced_at":"2025-03-23T00:27:35.618Z","repository":{"id":221999039,"uuid":"755985703","full_name":"codeterrayt/WebCodeOptimizer","owner":"codeterrayt","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-04T13:07:18.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T03:43:49.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/codeterrayt.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-02-11T16:56:50.000Z","updated_at":"2024-12-11T13:02:53.000Z","dependencies_parsed_at":"2024-09-05T15:11:08.008Z","dependency_job_id":null,"html_url":"https://github.com/codeterrayt/WebCodeOptimizer","commit_stats":null,"previous_names":["codeterrayt/webcodeoptimizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FWebCodeOptimizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FWebCodeOptimizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FWebCodeOptimizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeterrayt%2FWebCodeOptimizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeterrayt","download_url":"https://codeload.github.com/codeterrayt/WebCodeOptimizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245040220,"owners_count":20551297,"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":[],"created_at":"2024-11-29T16:18:04.849Z","updated_at":"2025-03-23T00:27:35.583Z","avatar_url":"https://github.com/codeterrayt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**WebCodeOptimizer**\n==================\n\n**WebCodeOptimizer** is a tool designed to optimize web code by compressing HTML, CSS, and JavaScript files and removing unused images from your project. The optimization process ensures that your code remains error-free and bug-free while improving performance by reducing file sizes and eliminating unnecessary resources.\n\n\n\n## Features\n\n- **HTML, CSS, and JavaScript Optimization**: Compresses your web files to reduce their size without affecting functionality.\n- **Image Management**: Automatically detects and removes images that are not used in your project.\n- **Error-Free Optimization**: Ensures that the optimization process does not introduce any errors or bugs into your project.\n\n## Installation Guide\n\nFollow these steps to install and set up the WebCodeOptimizer:\n\n### 1. Clone the Repository\n\nFirst, clone the repository to your local machine:\n\n```bash\ngit clone https://github.com/codeterrayt/WebCodeOptimizer.git\ncd WebCodeOptimizer\n```\n\n\n**Installation Guide**\n------------------------\nTo install WebCodeOptimizer, follow these steps:\n\n1. Create a virtual environment (venv) for your project.\n```bash\npython -m venv venv\n```\n3. Activate the venv.\n```bash\nvenv\\Scripts\\activate\n```\n \n5. Install the required modules using `requirements.txt`.\n```bash\npip install -r requirements.txt\n```\n\n**Usage**\n---------\n\n### Creating an Instance\n\nCreate an instance of the `ProjectOptimizer` class, passing two paths as arguments:\n```python\nproj = ProjectOptimizer(r\"./code/\", r\"./optimized/\")\n```\nThe first path is for the main code, and the second path is where to create the optimized code folder.\n\n### Optimizing the Code\n\n1. Clone the project folder:\n```python\nproj.CreateClone()\n```\n2. Find all HTML, CSS, JS, and image files in the project:\n```python\nproj.FindAllHTML()\nproj.FindAllJS()\nproj.FindAllCSS()\nproj.FindImagesInProjectHTML()\n```\n3. Remove unused images:\n```python\nproj.RemoveUnUsedImages()\n```\n4. Compress HTML, CSS, and JS files:\n```python\nproj.CompressHTML()\nproj.CompressJS()\nproj.CompressCSS()\n```\n\n**Methods**\n------------\n\n### `CreateClone()`\n\nClones the project folder.\n\n### `FindAllHTML()`, `FindAllJS()`, `FindAllCSS()`,\n\nFinds all HTML, CSS, and JS files in the project.\n\n### `FindImagesInProjectHTML()`\n\nFinds images referenced in HTML files in the project.\n\n### `RemoveUnUsedImages()`\n\nRemoves unused images from the project.\n\n### `CompressHTML()`, `CompressJS()`, `CompressCSS()`\n\nCompresses HTML, CSS, and JS files using various optimization techniques.\n\n## Contributing to WebCodeOptimizer\n\nWe welcome contributions to the WebCodeOptimizer project! Whether you're fixing bugs, adding new features, improving documentation, or helping out in any other way, your input is greatly appreciated.\n\n**License**\n---------\n\nWebCodeOptimizer is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeterrayt%2Fwebcodeoptimizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeterrayt%2Fwebcodeoptimizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeterrayt%2Fwebcodeoptimizer/lists"}