{"id":18841105,"url":"https://github.com/x1ao4/text-wrapper","last_synced_at":"2026-01-30T08:30:18.261Z","repository":{"id":181658079,"uuid":"667105825","full_name":"x1ao4/text-wrapper","owner":"x1ao4","description":"通过 python 脚本为 txt 文档的每一行添加前后缀 / add prefix and suffix to each line of a txt file via python script","archived":false,"fork":false,"pushed_at":"2023-08-09T06:47:54.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T09:49:16.664Z","etag":null,"topics":["add-prefix","add-suffix","prefix","suffix","text","text-editor","text-processing","text-wrapper"],"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/x1ao4.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":"2023-07-16T16:52:24.000Z","updated_at":"2023-07-16T17:53:01.000Z","dependencies_parsed_at":"2024-12-30T09:47:48.295Z","dependency_job_id":null,"html_url":"https://github.com/x1ao4/text-wrapper","commit_stats":null,"previous_names":["x1ao4/text-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x1ao4%2Ftext-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x1ao4%2Ftext-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x1ao4%2Ftext-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x1ao4%2Ftext-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x1ao4","download_url":"https://codeload.github.com/x1ao4/text-wrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239780121,"owners_count":19695734,"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":["add-prefix","add-suffix","prefix","suffix","text","text-editor","text-processing","text-wrapper"],"created_at":"2024-11-08T02:50:04.238Z","updated_at":"2026-01-30T08:30:18.209Z","avatar_url":"https://github.com/x1ao4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# text-wrapper\n使用 text-wrapper 可以为您的文本自动逐行添加前后缀。\n\n## 功能演示\n若 `prefix = 'prefix '`，`suffix = ' suffix'`。假设 `input.txt` 文件中的内容如下：\n```\napple\nbanana\ncherry\n```\n运行脚本后，`output.txt` 文件中的内容将变为：\n```\nprefix apple suffix\nprefix banana suffix\nprefix cherry suffix\n```\n每一行前面都添加了一个前缀，后面都添加了一个后缀。\n\n## 运行条件\n请确保您的系统上安装了 Python 3.6 或更高版本。\n\n## 使用方法\n1. 将仓库克隆或下载到计算机上的一个目录中。\n2. 修改脚本中的 `prefix` 和 `suffix` 变量，以指定添加的前缀和后缀，留空为不添加。\n3. 修改 `start.command (Mac)` 或 `start.bat (Win)` 中的路径，以指向您存放 `text-wrapper.py` 脚本的目录。\n4. 将要处理的文本保存为 `input.txt` 文件，并放在与脚本相同的目录中。\n5. 双击运行 `start.command` 或 `start.bat` 脚本以执行 `text-wrapper.py` 脚本。\n6. 结果将写入到同一目录下名为 `output.txt` 的文件中。\n\u003cbr\u003e\n\n# text-wrapper\nWith text-wrapper, you can automatically add a prefix and suffix to each line of your text file.\n\n## Demo\nIf `prefix = 'prefix '`, `suffix = ' suffix'`. Assuming the contents of the `input.txt` file are as follows:\n```\napple\nbanana\ncherry\n```\nAfter running the script, the content of the `output.txt` file will be:\n```\nprefix apple suffix\nprefix banana suffix\nprefix cherry suffix\n```\nA prefix is added before each line, and a suffix is added after each line.\n\n## Requirements\nMake sure you have Python 3.6 or higher installed on your system.\n\n## Usage\n1. Clone or download the repository to a directory on your computer.\n2. Modify the `prefix` and `suffix` variables in the script to specify the prefix and suffix to be added, leave blank for no addition.\n3. Modify the path in `start.command (Mac)` or `start.bat (Win)` to point to the directory where you store the `text-wrapper.py` script.\n4. Save the text to be processed as an `input.txt` file and place it in the same directory as the script.\n5. Double-click `start.command` or `start.bat` to execute the `text-wrapper.py` script.\n6. The result will be written to a file named `output.txt` in the same directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx1ao4%2Ftext-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx1ao4%2Ftext-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx1ao4%2Ftext-wrapper/lists"}