{"id":15048591,"url":"https://github.com/rebilly/lexi","last_synced_at":"2025-04-10T01:33:15.222Z","repository":{"id":40702669,"uuid":"381684067","full_name":"Rebilly/lexi","owner":"Rebilly","description":"Reduce content complexity","archived":false,"fork":false,"pushed_at":"2024-05-20T07:59:10.000Z","size":4012,"stargazers_count":33,"open_issues_count":3,"forks_count":2,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-05-20T08:54:44.092Z","etag":null,"topics":["action","actions","comment","comment-bot","comment-system","comments","documentation","github-actions","markdown","md","pull-request","pull-requests","quality","readability","readability-level","readability-metrics","readability-scores","readability-tests","report","reporter"],"latest_commit_sha":null,"homepage":"https://rebilly.github.io/lexi/","language":"TypeScript","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/Rebilly.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":"2021-06-30T11:49:07.000Z","updated_at":"2024-05-27T13:46:51.769Z","dependencies_parsed_at":"2023-07-21T05:43:46.225Z","dependency_job_id":"d9fbd6fb-ebd0-477f-8044-0a7250915874","html_url":"https://github.com/Rebilly/lexi","commit_stats":{"total_commits":143,"total_committers":8,"mean_commits":17.875,"dds":"0.39860139860139865","last_synced_commit":"f5ce0b0650078a98513f71af85c6ae620d2421d4"},"previous_names":["rebilly/lexi","rebilly/readability-reporter"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rebilly%2Flexi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rebilly%2Flexi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rebilly%2Flexi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rebilly%2Flexi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rebilly","download_url":"https://codeload.github.com/Rebilly/lexi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140810,"owners_count":21054353,"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":["action","actions","comment","comment-bot","comment-system","comments","documentation","github-actions","markdown","md","pull-request","pull-requests","quality","readability","readability-level","readability-metrics","readability-scores","readability-tests","report","reporter"],"created_at":"2024-09-24T21:14:18.600Z","updated_at":"2025-04-10T01:33:15.202Z","avatar_url":"https://github.com/Rebilly.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource srcset=\"images/logo_b\u0026w_dark.png\" media=\"(prefers-color-scheme: dark)\"\u003e\n    \u003cimg width=\"250\" src=\"images/logo_b\u0026w.png\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\nUse Lexi to reduce the complexity of the language in your documentation, and to quantify and track improvements overtime.\n\u003c/br\u003e\u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource srcset=\"images/example_comment_dark.png\" media=\"(prefers-color-scheme: dark)\"\u003e\n    \u003cimg src=\"images/example_comment.png\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\nLexi is a GitHub action that reports readability metrics for Markdown files in your pull requests. Use these metrics to help you understand how changes impact the readability of your documentation. Lexi reports an overall readability score that is calculated based on a scaled combination of the following readability metrics:\n\n- [Flesch Reading Ease](https://en.wikipedia.org/wiki/Flesch_reading_ease)\n- [Gunning Fog Index](https://en.wikipedia.org/wiki/Gunning_fog_index)\n- [Automated Readability Index (ARI)](https://en.wikipedia.org/wiki/Automated_readability_index)\n- [Dale-Chall Readability Score](https://en.wikipedia.org/wiki/Dale%E2%80%93Chall_readability_formula)\n- [Coleman–Liau Index](https://en.wikipedia.org/wiki/Coleman%E2%80%93Liau_index)\n\n### Reports\n\nReports describe the overall change to each file in a pull request, and also the impact the edits make to the documentation set as a whole.\n\n- **Overall readability**: describes the readability of all the documentation in your repository, along with the scores and degree of change for each file that was edited in the pull request.\n- **Detailed metrics**: describes all available metrics for each file that was edited in the pull request.\n- **Averages**: describes the overall readability of all the documentation in your repository for each available metric.\n- **Metrics targets**: describes the range and ideal score for each readability metric.\n\n#### View reports from previous commits\n\nLexi displays a report for each commit. The scores displayed in the GitHub action represent the metrics from the most recent commit.\n\nTo view metrics from previous commits in a pull request:\n\n1. At the top right of the GitHub action, click **edited**.\n1. Select the commit report that you want to view.\n\n\u003cp align=\"left\"\u003e\n  \u003cpicture\u003e\n    \u003csource srcset=\"images/dialogue_dark.png\" media=\"(prefers-color-scheme: dark)\"\u003e\n    \u003cimg width=\"500\" src=\"images/dialogue.png\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n### Example report\n\n\u003e **Overall readability score:** 20.18 (🟢 +0.97)\n\u003e\n\u003e | File                                                                                                             | Readability      |\n\u003e | ---------------------------------------------------------------------------------------------------------------- | ---------------- |\n\u003e | [README.md](https://github.com/Rebilly/lexi/blob/cce569da633a092c0a9b09bc1fe6d3df1b4dcb26/README.md 'README.md') | 22.36 (🟢 +3.86) |\n\u003e\n\u003e \u003cdetails open\u003e\n\u003e  \u003csummary\u003eView detailed metrics\u003c/summary\u003e\n\u003e\n\u003e 🟢 - Shows an _increase_ in readability\n\u003e 🔴 - Shows a _decrease_ in readability\n\u003e\n\u003e | File                                                                                                             | Readability | FRE      | GF       | ARI     | CLI     | DCRS     |\n\u003e | ---------------------------------------------------------------------------------------------------------------- | ----------- | -------- | -------- | ------- | ------- | -------- |\n\u003e | [README.md](https://github.com/Rebilly/lexi/blob/cce569da633a092c0a9b09bc1fe6d3df1b4dcb26/README.md 'README.md') | 22.36       | 44.11    | 16.67    | 28.7    | 11.85   | 7.66     |\n\u003e | \u0026nbsp;                                                                                                           | 🟢 +3.86    | 🟢 +2.03 | 🟢 +0.75 | 🟢 +2.2 | 🔴 -0.7 | 🟢 +0.01 |\n\u003e\n\u003e Averages:\n\u003e\n\u003e | \u0026nbsp;  | Readability | FRE      | GF       | ARI      | CLI      | DCRS  |\n\u003e | ------- | ----------- | -------- | -------- | -------- | -------- | ----- |\n\u003e | Average | 20.18       | 14       | 16.94    | 19.17    | 15.11    | 9.52  |\n\u003e | \u0026nbsp;  | 🟢 +0.97    | 🟢 +0.51 | 🟢 +0.19 | 🟢 +0.55 | 🔴 -0.17 | 🟢 +0 |\n\u003e\n\u003e \u003cdetails open\u003e\n\u003e  \u003csummary\u003eView metric targets\u003c/summary\u003e\n\u003e\n\u003e | Metric                 | Range                                                  | Ideal score |\n\u003e | ---------------------- | ------------------------------------------------------ | ----------- |\n\u003e | Flesch Reading Ease    | 100 (very easy read) to 0 (extremely difficult read)   | 60          |\n\u003e | Gunning Fog            | 6 (very easy read) to 17 (extremely difficult read)    | 8 or less   |\n\u003e | Auto. Read. Index      | 6 (very easy read) to 14 (extremely difficult read)    | 8 or less   |\n\u003e | Coleman Liau Index     | 6 (very easy read) to 17 (extremely difficult read)    | 8 or less   |\n\u003e | Dale-Chall Readability | 4.9 (very easy read) to 9.9 (extremely difficult read) | 6.9 or less |\n\u003e\n\u003e \u003c/details\u003e\n\u003e\n\u003e \u003c/details\u003e\n\u003e\n\u003e \u003c/details\u003e\n\n## Usage\n\n### Inputs\n\n| Name           | Necessity | Description                                                                                                                                                                                                                                     |\n| -------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `github-token` | Required  | Use this token to post the report comment to pull requests. The [GitHub Actions token](https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret) can be used with `${{ secrets.GITHUB_TOKEN }}`. |\n| `glob`         | Required  | Use this pattern to match Markdown files you want to analyse.                                                                                                                                                                                   |\n\n### Example workflow\n\nThis workflow reports readability metrics for `.md` files in your pull requests. For information, see [Supported markup languages](#supported-markup-languages).\n\n```yaml\nname: Report readability\n\n# This action only works on pull request events\non: pull_request\n\njobs:\n    report-readability:\n        name: Report readability\n        runs-on: ubuntu-latest\n        steps:\n            - name: Checkout repo with history\n              uses: actions/checkout@v4\n              with:\n                  fetch-depth: 0\n            - uses: Rebilly/lexi@v2\n              with:\n                  github-token: ${{ secrets.GITHUB_TOKEN }}\n                  glob: '**/*.md'\n```\n\n## Development\n\n### Commands\n\n| command               | description                                                                                                                                                                                                                                             |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `test`                | Run the unit tests.                                                                                                                                                                                                                                     |\n| `lint`                | Run eslint on all files.                                                                                                                                                                                                                                |\n| `format`              | Run prettier on all files.                                                                                                                                                                                                                              |\n| `build`               | Build the dist file. You are required to run this locally in order to build the dist before opening a PR.                                                                                                                                               |\n| `run:local:report`    | Run the action on two local folders, for testing and development. The first argument is the old (\"base branch\") folder and the sedcond argument is the new (\"head branch\") folder. For example `yarn run:local:report ./test-data/old ./test-data/new`. |\n| `run:local:debugfile` | Display what the program parses from a single file, after stripping all non-wanted items from the file, and before rating the readability. For example `yarn run:local:debugfile ./test-data/new/test-document.md`.                                     |\n| `playground:dev`      | Open the playground in local development mode for testing readability scores.                                                                                                                                                                           |\n\n### Testing\n\nWhen developing the action, it may be useful to run the action locally rather than pushing a branch and running your development version on GitHub.\n\nTo test the action locally, execute the `run:local:report` command. This reports readability on two different directories, as though they are in one pull request.\n\nFor example: `yarn run:local:report ./test-data/old ./test-data/new`\n\n### Release process\n\n1. Merge all changes into the `main` branch.\n1. Create a new [GitHub release](https://github.com/Rebilly/lexi/releases/new):\n    1. Enter the new tag in the release form, and choose \"Create a new tag on publish\". The tag must be prefixed with a `v`, for example `v1.0.0`. \\\n       The version number must follow [semantic versioning](https://semver.org/).\n    1. Set the title to the version number, for example `v1.0.0`.\n    1. Click \"Generate release notes\" to automatically generate the description since the last release.\n    1. Click \"Publish release\".\n1. The release is published to the Marketplace, and a [workflow automatically](./.github/workflows/update-tags-post-release.yml) updates the major and minor tags.\n\n## Supported markup languages\n\nLexi supports the following markup languages: Markdown, Markdoc, and MDX.\n\nTo configure the file formats, update the `glob` input in the workflow file. For more information, see [Example workflow](#example-workflow).\n\nExample: To report on `.md` and `.mdx` files, use: `glob: '**/*.{md,mdx}'`.\n\n## Playground\n\nTo experiment with this tool in your web browser, and get real-time readability metric data as you edit a Markdown file, try out the [playground](https://rebilly.github.io/lexi/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebilly%2Flexi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frebilly%2Flexi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebilly%2Flexi/lists"}