{"id":28194303,"url":"https://github.com/humansinput/wantcl","last_synced_at":"2025-10-07T23:26:12.806Z","repository":{"id":128773898,"uuid":"230929628","full_name":"humansinput/wantcl","owner":"humansinput","description":"WanTcl - a Tcl library containing various functions for working with Tcl data types","archived":false,"fork":false,"pushed_at":"2019-12-30T14:28:42.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T01:38:26.559Z","etag":null,"topics":["freebsd","linux","macos","tcl","tcl-extension","tcl-tk","tcllib"],"latest_commit_sha":null,"homepage":null,"language":"Tcl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humansinput.png","metadata":{"files":{"readme":"README.asciidoc","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-12-30T14:28:23.000Z","updated_at":"2019-12-30T14:28:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcb035a2-6d17-47a1-951a-4c606c0de9b0","html_url":"https://github.com/humansinput/wantcl","commit_stats":null,"previous_names":["humansinput/wantcl","tenfensw/wantcl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humansinput%2Fwantcl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humansinput%2Fwantcl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humansinput%2Fwantcl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humansinput%2Fwantcl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humansinput","download_url":"https://codeload.github.com/humansinput/wantcl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535798,"owners_count":22087399,"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":["freebsd","linux","macos","tcl","tcl-extension","tcl-tk","tcllib"],"created_at":"2025-05-16T13:11:51.734Z","updated_at":"2025-10-07T23:26:07.771Z","avatar_url":"https://github.com/humansinput.png","language":"Tcl","funding_links":[],"categories":[],"sub_categories":[],"readme":"= WanTcl\n\n**Copyright (C) Tim K/RoverAMD \u003ctimprogrammer@rambler.ru\u003e 2019-2020**\n\n**WanTcl** is a small software library providing some functions for working wth strings, lists and dicts. It was created by me after realising that I tend to reimplement some functions that are missing from Tcl's core stdlib or from Tcllib from project to project.\n\nWanTcl is available under 0BSD License. Oh, and yes, it only depends on Tcl 8.4/8.5/8.6/8.7 and on Tcllib.\n\n== Installing\n\nmacOS users can just run this command to install WanTcl:\n\n[source,bash]\n----\ntclsh8.5 install-macos.tcl\n----\n\nLinux/FreeBSD folders will have to copy all of the files from this folder into a subfolder inside Tcl's library folder. You can get the name of that folder by running:\n\n[source,bash]\n----\nprintf 'puts [info library]' | tclsh -\n----\n\n== Some most important functions\n\nWhile documentation for WanTcl is on the way, here is a little showcase of some of the methods that are provided by WanTcl:\n\n[source,tcl]\n----\npackage require wantcl::lists\npackage require wantcl::strings\npackage require wantcl::dicts\npackage require wantcl::http\n\n# You can omit some of the above lines if you don't need some of the methods.\n\nset listing {foo bar meow mew purr}\nif {! [lhas $listing meow mew purr lick]} {\n\t# lhas is a list command provided by WanTcl\n\t# It allows you to check if any of the multiple items are contained\n\t# inside a list.\n\tputs stderr \"{$listing} does not contain any cat sounds.\"\n\texit 1\n}\n\nset data [dict create items $listing]\nputs [dictToJSON $data]\n# dictToJSON is a dict command provided by WanTcl\n# It converts a Tcl dict into a JSON clip that you can later\n# parse from JavaScript, etc.\n\nset bingContents [httpGet http://www.bing.com]\n# httpGet is a http command provided by WanTcl\n# It is a convenient wrapper around http::geturl and it\n# also supports TLS (sort of).\n\nputs [dictToCGI $data]\n# dictToCGI is a http command provided by WanTcl\n# It converts a Tcl dict into a HTTP query string (key1=value1\u0026key2=value2)\n\nexit 0\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumansinput%2Fwantcl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumansinput%2Fwantcl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumansinput%2Fwantcl/lists"}