{"id":13485527,"url":"https://github.com/beryx/text-io","last_synced_at":"2025-04-04T20:12:01.063Z","repository":{"id":13116518,"uuid":"73326848","full_name":"beryx/text-io","owner":"beryx","description":"A library for creating interactive console applications in Java","archived":false,"fork":false,"pushed_at":"2023-11-02T08:49:43.000Z","size":10008,"stargazers_count":349,"open_issues_count":17,"forks_count":45,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T19:11:21.287Z","etag":null,"topics":["console","text-based"],"latest_commit_sha":null,"homepage":"http://text-io.beryx.org/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beryx.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":"2016-11-09T22:36:25.000Z","updated_at":"2025-03-27T07:10:39.000Z","dependencies_parsed_at":"2024-05-02T13:02:48.745Z","dependency_job_id":"84e973f1-ff74-4f84-9589-e7afbd272004","html_url":"https://github.com/beryx/text-io","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beryx%2Ftext-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beryx%2Ftext-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beryx%2Ftext-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beryx%2Ftext-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beryx","download_url":"https://codeload.github.com/beryx/text-io/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242679,"owners_count":20907134,"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":["console","text-based"],"created_at":"2024-07-31T18:00:25.086Z","updated_at":"2025-04-04T20:12:01.043Z","avatar_url":"https://github.com/beryx.png","language":"Java","readme":"[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/beryx/text-io/blob/master/LICENSE)\n[![Build Status](https://img.shields.io/travis/beryx/text-io/master.svg?label=Build)](https://travis-ci.org/beryx/text-io)\n## Text-IO ##\n\n\nText-IO is a library for creating Java console applications.\nIt can be used in applications that need to read interactive input from the user.\n\n**Features**\n\n- supports reading values with various data types.\n- allows masking the input when reading sensitive data.\n- allows selecting a value from a list.\n- allows to specify constraints on the input values (format patterns, value ranges, length constraints etc.).\n- provides different terminal implementations and offers a Service Provider Interface (SPI) for configuring additional text terminals.\n\nBy default, Text-IO tries to use text terminals backed by [java.io.Console](http://docs.oracle.com/javase/8/docs/api/java/io/Console.html).\nIf no console device is present (which may happen, for example, when running the application in your IDE),\na Swing-based terminal is used instead.\n\n*Example*\n\n```\nTextIO textIO = TextIoFactory.getTextIO();\n\nString user = textIO.newStringInputReader()\n        .withDefaultValue(\"admin\")\n        .read(\"Username\");\n\nString password = textIO.newStringInputReader()\n        .withMinLength(6)\n        .withInputMasking(true)\n        .read(\"Password\");\n\nint age = textIO.newIntInputReader()\n        .withMinVal(13)\n        .read(\"Age\");\n\nMonth month = textIO.newEnumInputReader(Month.class)\n        .read(\"What month were you born in?\");\n\nTextTerminal terminal = textIO.getTextTerminal();\nterminal.printf(\"\\nUser %s is %d years old, was born in %s and has the password %s.\\n\",\n        user, age, month, password);\n```\n\nClick on the image below to see the output of the above example in a Swing-based terminal.\n\n\u003ca href=\"https://github.com/beryx/text-io/raw/master/doc/img/swing-terminal-animated.gif\"\u003e\u003cimg src=\"https://github.com/beryx/text-io/raw/master/doc/img/swing-terminal-thumb.gif\"\u003e\u003c/a\u003e\n\nYou can also use a web-based terminal, which allows you to access your application via a browser, as shown in the image below.\n\n\u003ca href=\"https://github.com/beryx/text-io/raw/master/doc/img/web-terminal-animated.gif\"\u003e\u003cimg src=\"https://github.com/beryx/text-io/raw/master/doc/img/web-terminal-thumb.gif\"\u003e\u003c/a\u003e\n\n**Useful links**\n - [Documentation](http://text-io.beryx.org)\n - [javadoc](http://text-io.beryx.org/releases/latest/javadoc)\n - [Demos, examples and projects using Text-IO](https://github.com/beryx/text-io/wiki/Demos,-Examples-and-Projects-using-Text-IO)\n - [List of all releases](https://github.com/beryx/text-io/blob/gh-pages/releases.md)\n\nText-IO is available in [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.beryx%22%20AND%20a%3A%22text-io%22) and [JCenter](https://bintray.com/beryx/maven/text-io).\n","funding_links":[],"categories":["Projects","项目"],"sub_categories":["CLI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberyx%2Ftext-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberyx%2Ftext-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberyx%2Ftext-io/lists"}