{"id":42325869,"url":"https://github.com/jpsca/texteditor","last_synced_at":"2026-01-27T13:09:47.766Z","repository":{"id":57474696,"uuid":"168570811","full_name":"jpsca/texteditor","owner":"jpsca","description":"Open your editor from Python. Like webbrowser, but for the text editor.","archived":false,"fork":false,"pushed_at":"2025-10-01T15:33:11.000Z","size":49,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-21T21:06:17.680Z","etag":null,"topics":["editor","python"],"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/jpsca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-31T17:58:57.000Z","updated_at":"2024-11-11T11:47:22.000Z","dependencies_parsed_at":"2022-09-10T02:21:33.838Z","dependency_job_id":null,"html_url":"https://github.com/jpsca/texteditor","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jpsca/texteditor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsca%2Ftexteditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsca%2Ftexteditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsca%2Ftexteditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsca%2Ftexteditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpsca","download_url":"https://codeload.github.com/jpsca/texteditor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpsca%2Ftexteditor/sbom","scorecard":{"id":536154,"data":{"date":"2025-08-11","repo":{"name":"github.com/jpsca/texteditor","commit":"d60b99319fb90bf8493ef047911efc0f050d992c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: MIT-LICENSE:0","Info: FSF or OSI recognized license: MIT License: MIT-LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T07:00:39.152Z","repository_id":57474696,"created_at":"2025-08-20T07:00:39.152Z","updated_at":"2025-08-20T07:00:39.152Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28813274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"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":["editor","python"],"created_at":"2026-01-27T13:09:47.026Z","updated_at":"2026-01-27T13:09:47.753Z","avatar_url":"https://github.com/jpsca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TextEditor\n\nProgrammatically open the system's editor from your Python program (like [webbrowser](https://docs.python.org/3.7/library/webbrowser.html) but for text editors).\n\nUnlike other libraries, *TextEditor* makes an effort to find the text editor the users really prefer, specially for those that doesn't know what the `EDITOR` environment variable is.\n\n## Temporal file\n\n```python\nimport texteditor\n\ntext = texteditor.open(\"This is the starting content\")\n```\n\nOpens a temporary file with some content to edit, and returns the new content when\nthe user closes the editor.\n\n## Existing (or new) file\n\n```python\ntext = texteditor.open(filename=\"README.md\")\n\n# Warning: By doing the following, you will overwrite the existing content:\n# text = texteditor.open(\n#   text=\"This will replace the file content\",\n#   filename=\"README.md\"\n# )\n```\n\nYou can also edit an existing text file or one you want to create.\n\n\n## Installation\n\nUsing `pip` of course!\n\n```\npython -m pip install texteditor\n```\n\n## Usage\n\n*texteditor*.**open**(text=None, filename=None, extension=\"txt\", encoding=None)\n\nOpens `filename` or a new temporary file in the default editor.\n\n- *text*:\n    The starting content for the edited file. This will also be used instead of the\n    original contents of `filename` if one is also defined.\n\n- *filename*:\n    Edit this file instead of a new temporary one.\n\n- *extension*:\n    When editing a new temporary file, this will help the editor recognize the\n    intended filetype, so syntax highlighting and custom settings for that\n    filetype can be used. Examples: `txt`, `md`, `ini`.\n    Ignored if `filename` is used.\n\n- *encoding*:\n    To encode the content and decode the result, `texteditor.open()` uses the default\n    encoding for the platform, but you can use an `encoding` argument to specify\n    any text encoding supported by Python.\n\n\n## How it Works\n\n`texteditor.open()` first looks for the `EDITOR` environment variable. If set, it uses\nthe value as-is, including any command-line argument, without fallbacks.\n\nIf no `EDITOR` is set, it tries to guess.\n\nTo do so, the function search through a *very short* list of the most popular editors, and use the first one that founds.\n\nOn MacOS, as fallback, it calls the system default for *editing* that file extension.\n\nYou might notice that *vim* and *Emacs* are not in the short list of editors, that's because:\n\n1. If you are using either of them, you know what the `EDITOR` variable is, and you probably has set it already.\n2. If you aren't using it, finding yourself in their UI for the first time is going to be super confusing.\n   In fact \"How to exit vim\" is a common Stack Overflow question. Having to google how to set an EDITOR variable is a less scary alternative.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpsca%2Ftexteditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpsca%2Ftexteditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpsca%2Ftexteditor/lists"}