{"id":32779356,"url":"https://github.com/ghtaarn/simpleui.jl","last_synced_at":"2026-02-26T00:49:10.520Z","repository":{"id":241878108,"uuid":"808045737","full_name":"GHTaarn/SimpleUI.jl","owner":"GHTaarn","description":"Simple user interface functions for text based terminals","archived":false,"fork":false,"pushed_at":"2024-08-30T17:49:49.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-04T16:09:55.672Z","etag":null,"topics":["text-terminal","user-interface"],"latest_commit_sha":null,"homepage":"","language":"Julia","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/GHTaarn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","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":"2024-05-30T09:18:46.000Z","updated_at":"2024-08-30T17:49:52.000Z","dependencies_parsed_at":"2024-08-28T18:39:10.083Z","dependency_job_id":null,"html_url":"https://github.com/GHTaarn/SimpleUI.jl","commit_stats":null,"previous_names":["ghtaarn/simpleui.jl"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/GHTaarn/SimpleUI.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FSimpleUI.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FSimpleUI.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FSimpleUI.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FSimpleUI.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GHTaarn","download_url":"https://codeload.github.com/GHTaarn/SimpleUI.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GHTaarn%2FSimpleUI.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29846209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"ssl_error","status_checked_at":"2026-02-25T22:37:25.960Z","response_time":61,"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":["text-terminal","user-interface"],"created_at":"2025-11-04T16:05:49.714Z","updated_at":"2026-02-26T00:49:10.516Z","avatar_url":"https://github.com/GHTaarn.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleUI.jl\nA [Julia](http://julialang.org) package with some very simple functions for\ncreating text based user interfaces.\n\n## Installation\n\nDirectly from source:\n```julia\nimport Pkg\nPkg.add(url=\"https://github.com/GHTaarn/SimpleUI.jl\")\n```\n\nor using [FreeRegistry](https://github.com/GHTaarn/FreeRegistry):\n```julia\nusing Pkg\npkg\"registry add https://github.com/GHTaarn/FreeRegistry\"\npkg\"add SimpleUI\"\n```\n\n## Use\n\nAt present there are seven entrypoints: `pick_file`, `pick_one`, `pick`\n`getsavefilename`, `yesno`, `promptget` and `pause`.\nAll are described below and in more detail in their docstrings.\n\n### The `pick_file` function\n\nThe function `pick_file` displays the contents of a directory and waits\nfor the user to select one of them, e.g.:\n\n```julia\nusing SimpleUI\npick_file(\".\"; pattern=r\"[A-Za-z]*\")\n```\n\nThe return value is the path of whichever file the user selected.\n\n### The `pick_one` function\n\nThis function displays a menu from which the user must choose one, e.g.:\n\n```julia\nusing SimpleUI\npick_one(\"Image quality:\",\n    [\"320x240\", \"640x480\", \"1280x960\"]; default=2)\n```\n\n### The `pick` function\n\nThis function displays a menu from which the user must select 0 or more, e.g.:\n\n```julia\nusing SimpleUI\npick(\"Image quality:\",\n    [\"320x240\", \"640x480\", \"1280x960\"])\n```\n\n### The `getsavefilename` function\n\nPrompts the user for a filename and checks if the filename is allowed\nand if it exists already, e.g.:\n\n```julia\nusing SimpleUI\ngetsavefilename(\"Enter a filename for saving\"; isallowed=contains(r\".jl$\"))\n```\n\n### The `yesno` function\n\nPrompts the user to answer yes or no and returns the corresponding `Bool` e.g.:\n\n```julia\nusing SimpleUI\nif yesno(\"Do you want to quit?\")\n    exit()\nend\n```\n\n### The `promptget` function\n\nPrompts the user for some input with an optional default value e.g.:\n\n```julia\nusing SimpleUI\nsleep(promptget(Float64, \"How many seconds do you want to pause?\", 5)))\nprintln(\"Hello \", promptget(\"Who do you want to say hello to?\", \"Julia\"))\n```\n\nwhere `5` and `\"Julia\"` are the default values which will be returned by\n`promptget` if the user presses the return key without entering any input.\n\n### The `pause` function\n\nDisplay a message and wait until the user presses the return key, e.g.:\n\n```julia\nusing Dates, SimpleUI\nif Time(now()) \u003e Time(12,0)\n    pause(\"It is too late to use this program\")\nelse\n    println(\"The time is \", now() |\u003e Time)\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghtaarn%2Fsimpleui.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghtaarn%2Fsimpleui.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghtaarn%2Fsimpleui.jl/lists"}