{"id":28558417,"url":"https://github.com/be-lenka/feed-sifter","last_synced_at":"2025-06-10T08:08:49.996Z","repository":{"id":295824486,"uuid":"991117686","full_name":"be-lenka/feed-sifter","owner":"be-lenka","description":"Go from XML to CSV in an instant! Easily transform and reduce your XML feed to CSV, powered by PowerShell!","archived":false,"fork":false,"pushed_at":"2025-05-27T14:50:54.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-27T15:28:38.745Z","etag":null,"topics":["feed","google-feed","xml","xml-converter","xml-parser"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/be-lenka.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,"zenodo":null}},"created_at":"2025-05-27T06:40:52.000Z","updated_at":"2025-05-27T14:50:57.000Z","dependencies_parsed_at":"2025-05-27T15:29:34.688Z","dependency_job_id":"24442b7c-5ff5-4177-93d8-5e2e94aa146e","html_url":"https://github.com/be-lenka/feed-sifter","commit_stats":null,"previous_names":["be-lenka/feed-sifter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-lenka%2Ffeed-sifter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-lenka%2Ffeed-sifter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-lenka%2Ffeed-sifter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-lenka%2Ffeed-sifter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/be-lenka","download_url":"https://codeload.github.com/be-lenka/feed-sifter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-lenka%2Ffeed-sifter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259033839,"owners_count":22795771,"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":["feed","google-feed","xml","xml-converter","xml-parser"],"created_at":"2025-06-10T08:08:49.374Z","updated_at":"2025-06-10T08:08:49.981Z","avatar_url":"https://github.com/be-lenka.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🗂️ feed-sifter\n\n**feed-sifter** is a lightweight, cross-platform `PowerShell` script that converts structured `XML` product feeds into flat `CSV` files.  \nIt’s ideal for B2B/B2C product data processing, price list extraction, or automated data transformation tasks.\n\n---\n\n## 🚀 Features\n\n- ✅ Reads XML feeds from a remote **URL**\n- ✅ Extracts **nested fields** (like `selling_prices`) and **root fields**\n- ✅ Centralized configuration for feed structure\n- ✅ Outputs clean `UTF-8` encoded `CSV`\n- ✅ Runs on **Windows**, **macOS**, and **Linux** (via `PowerShell Core`)\n\n---\n\n## 📦 Requirements\n\nOn Windows, `PowerShell` should be installed by default. \n\n- Windows \n  - On Windows: Download from https://github.com/PowerShell/PowerShell\n\n- PowerShell Core (`pwsh`)\n  - On macOS/Linux: `brew install --cask powershell`\n\n---\n\n## 🔧 Usage\n### 🪟 Windows \n```powershell\n# For a CSV output\n.\\SiftFeedWHeader.ps1 -xmlUrl \"https://example.com/path/to/feed.xml\"\n# For a XML output\n.\\SiftFeedXml.ps1 -xmlUrl \"https://example.com/path/to/feed.xml\"\n```\n###  MacOS\n```bash\n# For a CSV output\npwsh ./SiftFeedWHeader.ps1 -xmlUrl \"https://example.com/path/to/feed.xml\"\n# For a XML output \npwsh ./SiftFeedXml.ps1 -xmlUrl \"https://example.com/path/to/feed.xml\"\n```\n\n### Parameters\n\n| Parameter | Description |\n|----------|-------------|\n| `-xmlUrl` | **(Required)** URL of the remote XML feed you want to process |\n\n---\n\n## 🧠 Feed Structure Configuration\n\nInside the script, you can easily configure the feed structure:\n\n```powershell\n$feedStructure = @{\n    # XML path to repeating items\n    rootPath = \"//item\"     \n    nestedRepeats = @{\n         # nested arrays\n        selling_prices = @(\"currency\", \"base_price\", \"discount_price\")         \n    }\n    # root-level fields\n    flatFields = @(\"ean\", \"availability\", \"availability_count\")         \n}\n```\n\nJust modify the `flatFields` or `nestedRepeats` arrays to match your `XML` feed layout.\n\n---\n\n## 📁 Output\n\nThe resulting `output.csv` file will be written to the script's current working directory.  \nIt contains headers and all mapped values from the `XML` feed.\n\nExample output:\n\n```csv\nean,availability,availability_count,currency,base_price,discount_price\n20000000025,in stock,14,CZK,2500,1999\n...\n```\n\n---\n\n## 💡 Tips\n\n- Works with `HTTPS` feeds and requires no authentication.\n- To change output file name or encoding, modify the `$outputPath` and `Set-Content`/`Add-Content` lines.\n- You can redirect output to a timestamped file for batch jobs.\n\n---\n\n## 🔐 Execution Policy Troubleshooting\n\nIf you're running the script and see an error like:\n\n```text\nFile cannot be loaded because running scripts is disabled on this system.\n```\n\nThis means PowerShell's **execution policy** is blocking script execution.\n\n### ✅ Temporary Fix (Safe for Local Use)\n\nRun this in your current terminal session **before executing the script**:\n\n```powershell\nSet-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass\n```\n\n---\n\n## 📜 License\n\nMIT — free to use, modify, and distribute.  \nFeel free to fork and contribute!\n\n---\n\n## ✨ Credits\n\nBuilt with 💙 by [BeLenka X Barebarics](https://github.com/be-lenka)\n\n\u003c!-- 🛒 Visit our stores [BeLenka](https://www.belenka.com)\nand [Barebarics](https://www.barebarics.com). --\u003e\n\nInspired by real-world XML product feed challenges.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbe-lenka%2Ffeed-sifter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbe-lenka%2Ffeed-sifter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbe-lenka%2Ffeed-sifter/lists"}