{"id":24986979,"url":"https://github.com/hitthecodelabs/shopify-blog-automation-tool","last_synced_at":"2026-03-07T22:32:50.391Z","repository":{"id":213454506,"uuid":"734162854","full_name":"hitthecodelabs/Shopify-Blog-Automation-Tool","owner":"hitthecodelabs","description":"Flask app designed to automate and manage various aspects of blog and article creation in a Shopify store","archived":false,"fork":false,"pushed_at":"2024-02-09T12:15:18.000Z","size":126,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T19:27:56.559Z","etag":null,"topics":["api","bison","chatgpt","gemini-pro","generative-ai","gpt-35","gpt-4","llm","llms","openai","palm","python","shopify","unicorn"],"latest_commit_sha":null,"homepage":"","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/hitthecodelabs.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":"2023-12-21T02:51:22.000Z","updated_at":"2024-05-23T00:38:40.000Z","dependencies_parsed_at":"2024-02-08T06:26:52.371Z","dependency_job_id":"fb687ccd-142a-4da6-9204-3b5b8ea36068","html_url":"https://github.com/hitthecodelabs/Shopify-Blog-Automation-Tool","commit_stats":null,"previous_names":["hitthecodelabs/shopify-blog-automation-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hitthecodelabs/Shopify-Blog-Automation-Tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FShopify-Blog-Automation-Tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FShopify-Blog-Automation-Tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FShopify-Blog-Automation-Tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FShopify-Blog-Automation-Tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hitthecodelabs","download_url":"https://codeload.github.com/hitthecodelabs/Shopify-Blog-Automation-Tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hitthecodelabs%2FShopify-Blog-Automation-Tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30234674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","bison","chatgpt","gemini-pro","generative-ai","gpt-35","gpt-4","llm","llms","openai","palm","python","shopify","unicorn"],"created_at":"2025-02-04T11:35:06.347Z","updated_at":"2026-03-07T22:32:50.364Z","avatar_url":"https://github.com/hitthecodelabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shopify Blog Automation Tool\n\n## Description\nThe Shopify Blog Automation Tool is a comprehensive Flask app designed to streamline and automate the management of blogs and articles within Shopify stores. It harnesses the power of the Shopify Admin API, offering a robust set of functionalities to interact with various blog-related endpoints efficiently. This toolkit simplifies tasks such as article creation, update, deletion, and retrieval, along with validating and formatting content, thereby enhancing productivity and management ease..\n\nUseful References:\n- [Shopify API Documentation](https://shopify.dev/)\n- [API Rate Limits](https://shopify.dev/docs/api/admin-rest#rate_limits)\n\n## Features\n- **Advanced Article Management**: Comprehensive tools for creating, updating, deleting, and retrieving articles, along with dynamic validation and formatting.\n- **Efficient Token and Pricing Calculations**: Estimate the usage and cost associated with AI-generated content.\n- **Robust URL and Content Validation**: Ensure the integrity and correctness of URLs and content with advanced validation techniques.\n- **Bulk Article Retrieval and Management**: Retrieve and manage articles en masse with improved functionality, catering to both forward and backward directions relative to a specific date.\n\n## Installation\n\nClone the repository and navigate into the project directory:\n\n```bash\ngit clone https://github.com/hitthecodelabs/Shopify-Blog-Automation-Tool.git\ncd Shopify-Blog-Automation-Tool\n```\n\n## Usage\nBefore utilizing the scripts, ensure you possess the necessary Shopify API credentials and store details. Configure your environment with the appropriate store URL and access token.\n\nFunctions overview:\n\n- `generate_content(client, messages, model)`: Interacts with an OpenAI model to generate responses based on a series of messages.\n- `calculate_pricing(input_tokens, output_tokens, model_name)`: Estimates the cost of using an AI model based on the number of input and output tokens.\n- `validate_and_retry(client, messages, model, expected_keys)`: Validates the generated content based on expected structure and elements, with retry capability.\n- `make_product_link(text, url, product)`: Formats and converts a product name in text into a clickable HTML link.\n- `validate_store_url(url)`: Performs intense checks to ensure the store URL's correctness and security.\n- `create_or_replace_article_(admin_store_url, blog_id, access_token, ...)`: Creates a new article or replaces an existing one in a specified blog.\n- `get_all_articles_combined(store_url, access_token, blog_id, initial_max_date)`: Retrieves all unique articles by fetching in both forward and backward directions relative to a specified date.\n\nExample usage:\n\n```python\nfrom shopify_blog_manager import validate_store_url, create_article\n\nstore_url = validate_store_url(\"https://example.myshopify.com\")\naccess_token = \"your_access_token\"\n\n# Validate and create a new article\nblog_id = \"your_blog_id\"\ntitle = \"Innovative Strategies\"\nauthor = \"Jean Paul\"\ntags = \"Business, Innovation\"\ncontent = \"\u003cp\u003eDiscover groundbreaking business strategies.\u003c/p\u003e\"\n\ncreate_article(store_url, access_token, blog_id, title, author, tags, content)\n```\n\n## Contributing\nContributions are welcome! If you'd like to improve the Shopify Blog Automation Tool, please ensure your code adheres to the project's coding standards and includes tests for new features or bug fixes. Submit a pull request with your proposed changes.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhitthecodelabs%2Fshopify-blog-automation-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhitthecodelabs%2Fshopify-blog-automation-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhitthecodelabs%2Fshopify-blog-automation-tool/lists"}