{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/11"}],"enrichment":{"capability":"Alphabetizes lines in files based on indentation levels, triggered by a pragma comment, with optional case-insensitive sorting.","skillfed_tags":["code-formatter","pre-commit-hook"],"use_cases":["Alphabetize lists of names, imports, or configuration items in Python code by marking them with a pragma comment.","Enforce consistent ordering of dictionary keys or array elements in code reviews via pre-commit hooks.","Sort lines in any text file with consistent indentation, such as configuration files or data lists.","Maintain alphabetical order in multi-line function arguments or class definitions.","Automate line sorting in CI/CD pipelines to ensure reproducible, consistent code formatting."],"what_it_does":"sort-lines is a command-line tool that alphabetizes lines within a file based on their indentation level. You mark a section for sorting by adding a `# pragma: alphabetize` comment on the line above the block you want sorted; the tool then alphabetizes all subsequent lines at the same indentation level until it encounters a line with different indentation or a blank line. It supports case-insensitive sorting via a `[case-insensitive]` option in the pragma comment or a command-line flag.\n\nThe tool is designed for Python code but works with any consistently indented text. It integrates with pre-commit hooks, making it useful for automated code formatting workflows. With no runtime dependencies and a straightforward installation, it's a lightweight utility for keeping lists, imports, or other line-based structures in alphabetical order without manual intervention.","worth_installing":"Yes, if you need lightweight, pragma-driven line sorting in code or text files. The tool has no dependencies, installs easily, and integrates well with pre-commit workflows. It's actively maintained and carries no known security vulnerabilities. Suitable for teams that want to enforce alphabetical ordering without heavyweight formatters."},"id":"sort-lines","links":{"html":"https://skillfed.io/packages/sort-lines","md":"https://skillfed.io/packages/sort-lines.md","pypi":"https://pypi.org/project/sort-lines/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-06-12","license_spdx":null,"license_treatment":"permissive","name":"sort-lines","python_support":"supports_current","summary":"alphabetize lines in files"},"popularity":{"monthly_downloads":78235,"position":14458,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.3.0"}
