{"id":20572718,"url":"https://github.com/molnarmark/spinny","last_synced_at":"2025-07-20T16:04:05.934Z","repository":{"id":92791181,"uuid":"96052308","full_name":"molnarmark/spinny","owner":"molnarmark","description":"🌀 Spinny is a tiny terminal spinner package for the Nim Programming Language.","archived":false,"fork":false,"pushed_at":"2020-05-28T11:31:27.000Z","size":965,"stargazers_count":46,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-14T22:02:40.827Z","etag":null,"topics":["nim","nim-lang","spinner","terminal"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/molnarmark.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":"2017-07-02T22:29:49.000Z","updated_at":"2025-02-08T12:34:32.000Z","dependencies_parsed_at":"2023-03-22T14:02:08.283Z","dependency_job_id":null,"html_url":"https://github.com/molnarmark/spinny","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/molnarmark/spinny","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Fspinny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Fspinny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Fspinny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Fspinny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/molnarmark","download_url":"https://codeload.github.com/molnarmark/spinny/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molnarmark%2Fspinny/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266152254,"owners_count":23884474,"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":["nim","nim-lang","spinner","terminal"],"created_at":"2024-11-16T05:23:18.063Z","updated_at":"2025-07-20T16:04:05.912Z","avatar_url":"https://github.com/molnarmark.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"Spinny\n============\n\n[![GitHub version](https://badge.fury.io/gh/boennemann%2Fbadges.svg)](http://badge.fury.io/gh/boennemann%2Fbadges)\n[![Maintenance](https://img.shields.io/maintenance/yes/2018.svg)]()\n\nSpinny is a tiny terminal spinner package for [Nim Programming Language](https://nim-lang.org).\n![Spinny in Action](https://github.com/molnarmark/spinny/blob/master/action.gif)\n\n## Getting Started\n\nYou can use Nimble to install the package by running:\n```\nnimble install spinny\n```\n\nThis library uses threads for spinners, so you have to compile your application\n(or add to your ``nim.cfg``):\n```\n--threads:on\n```\n\n\n## Usage\n\nSpinny is quite easy to use. You can set the color, text or symbol of an already running spinner.\n\n```nim\nimport spinny, os\n\nvar spinner1 = newSpinny(\"Loading file..\".fgWhite, Dots)\nspinner1.setSymbolColor(fgBlue)\nspinner1.start()\n\n# do some work here\nfor x in countup(5, 10):\n  sleep(500)\n\nspinner1.success(\"File was loaded successfully.\")\n\nvar spinner2 = newSpinny(\"Downloading files..\".fgBlue, Dots5)\nspinner2.setSymbolColor(fgLightBlue)\nspinner2.start()\n\n# do some work here\nfor x in countup(5, 10):\n  sleep(500)\n\nspinner2.error(\"Sorry, something went wrong during downloading!\")\n```\n\nYou can even use custom spinners if predefined ones aren't suitable for your needs.\n\n```nim\nimport spinny, os\n\n# makeSpinner accepts two arguments - the interval between different frames,\n# and frames themselves (as a sequence of strings)\nvar spinner3 = newSpinny(\"I'm custom.\", makeSpinner(100, @[\"x\", \"y\"]))\nspinner3.setSymbolColor(fgGreen)\nspinner3.start()\n\n# do some magnificent work here\nfor x in countup(1, 5):\n  sleep(500)\n\nspinner3.success(\"Looks like it's working!\")\n```\n\nSpinny embeds the [colorize](http://github.com/molnarmark/colorize) library for terminal colors.\nFor spinners to use, take a look at the ``src/spinners.nim`` file. (Credit goes to [sindresorhus](https://github.com/sindresorhus/cli-spinners))\n\n\n## API Reference\n\nThe following procs are available on a `Spinny` object:\n\n* `setSymbolColor*(spinny: Spinny, color: proc(x: string): string)`\n* `setSymbol*(spinny: Spinny, symbol: string)`\n* `setText*(spinny: Spinny, text: string)`\n* `start*(spinny: Spinny)`\n* `stop*(spinny: Spinny)`\n* `success*(spinny: Spinny, msg: string)`\n* `error*(spinny: Spinny, msg: string)`\n\n## Contributing\n\nAll contributions are welcome. Feel free to make this project better. :)\n\n\n## Authors\n\n* Mark Molnar\n\n\n## License\n\n* MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolnarmark%2Fspinny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmolnarmark%2Fspinny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolnarmark%2Fspinny/lists"}