{"id":21581425,"url":"https://github.com/marckassay/endofline","last_synced_at":"2025-06-25T06:39:57.862Z","repository":{"id":146406302,"uuid":"100151759","full_name":"marckassay/EndOfLine","owner":"marckassay","description":"EndOfLine is a PowerShell module that automates conversion of end-of-line (EOL) characters in files.","archived":false,"fork":false,"pushed_at":"2022-03-14T22:08:59.000Z","size":51,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T22:51:35.063Z","etag":null,"topics":["automation","convert","eol","line","linux","normalize","powershell","unix","windows"],"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/marckassay.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":"2017-08-13T03:35:58.000Z","updated_at":"2024-08-03T12:51:48.000Z","dependencies_parsed_at":"2024-07-14T10:32:19.682Z","dependency_job_id":null,"html_url":"https://github.com/marckassay/EndOfLine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marckassay/EndOfLine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FEndOfLine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FEndOfLine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FEndOfLine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FEndOfLine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marckassay","download_url":"https://codeload.github.com/marckassay/EndOfLine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FEndOfLine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261821604,"owners_count":23214943,"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":["automation","convert","eol","line","linux","normalize","powershell","unix","windows"],"created_at":"2024-11-24T14:12:29.069Z","updated_at":"2025-06-25T06:39:57.852Z","avatar_url":"https://github.com/marckassay.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EndOfLine\n\nObjective of this module is conversion of end-of-line (EOL) characters in UTF-8 files: CRLF to LF or LF to CRLF\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/marckassay/EndOfLine/blob/master/LICENSE) [![PS Gallery](https://img.shields.io/badge/install-PS%20Gallery-blue.svg)](https://www.powershellgallery.com/packages/EndOfLine/)\n\n## Features\n\n* Imports `.gitignore` file for exclusion of files and directories, if there is a file.  You can use `SkipIgnoreFile` switch to prevent importing that file.  And you can switch `Exclude` to add additional items to be excluded.\n* Simulate what will happen via `WhatIf` switch\n* Outputs a report on all files.  The `Verbose` switch can be used too.\n\n## Caveat\n\n* Please use the `WhatIf` switch parameter to perform a 'dry-run' on what files will be modified.\n* Files are expected to be encoded in UTF-8.  If encoded in anything else it will not be modified.\n\n## Instructions\n\nTo install, run the following command in PowerShell.\n\n```powershell\n$ Install-Module EndOfLine\n```\n\nThis module imports 'Encoding' by [Chris Kuech](https://github.com/chriskuech).\n\n[![PS Gallery](https://img.shields.io/badge/Encoding-PS%20Gallery-blue.svg)](https://www.powershellgallery.com/packages/Encoding)\n\n## Usage\n\n### ConvertTo-LF\n\n```powershell\nConvertTo-LF [-Path] \u003cString[]\u003e [[-Exclude] \u003cString[]\u003e]\n[-SkipIgnoreFile] [-ExportReportData] [-WhatIf] [\u003cCommonParameters\u003e]\n```\n\nConverts CRLF to LF characters.\nThis function will recursively read all files within the `Path` unless excluded by `.gitignore` file.  If a file is not excluded it is read to see if the current EOL character is the same as requested.  If so it will not modify the file.  And if the file is encoded other then UTF-8, it will not be modified.\n\nExample using the `WhatIf`, and `Verbose` switch.\n\n```powershell\n$ ConvertTo-LF -Path C:\\repos\\AiT -WhatIf -Verbose\n```\n\nFor this example, if you agree when prompted files will be modified without import of `.gitignore` file.\n\n```powershell\n$ ConvertTo-LF -Path C:\\repos\\AiT -SkipIgnoreFile\n```\n\nIf omitting `gitignore` file, it would be good to exclude modules too.\n\n```powershell\n$ ConvertTo-LF -Path C:\\repos\\AiT -Exclude .\\node_modules\\, .\\out\\ -SkipIgnoreFile\n```\n\nIf you agree when prompted, files will be modified with import of `.gitignore` file if found.\n\n```powershell\n$ ConvertTo-LF -Path C:\\repos\\AiT\n```\n\n### ConvertTo-CRLF\n\n```powershell\nConvertTo-CRLF [-Path] \u003cString[]\u003e [[-Exclude] \u003cString[]\u003e] \n[-SkipIgnoreFile] [-ExportReportData] [-WhatIf] [\u003cCommonParameters\u003e]\n```\n\nConverts LF to CRLF characters.\nBesides the characters that will be replaced, all things that apply in `ConvertTo-LF` apply to this function too.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarckassay%2Fendofline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarckassay%2Fendofline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarckassay%2Fendofline/lists"}