{"id":43617428,"url":"https://github.com/jceaser/shellwrap","last_synced_at":"2026-02-04T12:38:00.854Z","repository":{"id":83786138,"uuid":"469080913","full_name":"jceaser/shellwrap","owner":"jceaser","description":"A set of helper functions for writing shell scripts with python","archived":false,"fork":false,"pushed_at":"2025-08-15T21:17:59.000Z","size":32,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-15T23:35:24.859Z","etag":null,"topics":["python","scripting","shell"],"latest_commit_sha":null,"homepage":"","language":"Python","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/jceaser.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2022-03-12T12:48:47.000Z","updated_at":"2022-03-14T11:52:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"be097a2a-3e53-4dc7-83b2-157f648a3aca","html_url":"https://github.com/jceaser/shellwrap","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jceaser/shellwrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceaser%2Fshellwrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceaser%2Fshellwrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceaser%2Fshellwrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceaser%2Fshellwrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jceaser","download_url":"https://codeload.github.com/jceaser/shellwrap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceaser%2Fshellwrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29084417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["python","scripting","shell"],"created_at":"2026-02-04T12:38:00.212Z","updated_at":"2026-02-04T12:38:00.848Z","avatar_url":"https://github.com/jceaser.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shell Wrap\nA simple set of tools for writing shell scripts in python\n\n## What this does\nFar to much of the world runs on bash shell scripts. A shamefull amount of code, some of which I have contributed to. Shell scripts are just not the best language for most solutions. Python on the other hand is not is a bit more verbose when it comes to directly interacting with commands.\n\nThis library hopes to bridge that gap\n\n## Setup for development\n\n    get clone https://github.com/jceaser/shellwrap.git\n    cd shellwrap\n\n    pip3 install virtualenv\n    virtualenv -p python3 .venv\n    source .venv/bin/activate\n\n    ./run.sh -I -b -i   #Init build install\n    python3 example.py\n\n## Installing directly\n\n    pip3 install https://github.com/jceaser/shellwrap/releases/download/v0.0.3-release/shellwrap-0.0.3-py3-none-any.whl\n\n## Usage\n\n### Printing in color with formating\n\n    from shellwrap import color\n    color.cprint(color.tcode.green, \"Starting script\", env)\n    print(color.colorize(\":rocket::blink:This is my :red:RED:end: text and this is my :green:GREEN:end: text.\"))\n    print(color.link(\"https://example.com/\", \"example.com\"))\n\nRead more about [OCS 8](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda).\n\n### Calling Unix Commands\n\n\tfrom shellwrap import unix\n\tpresult = unix.pipe(['echo', 'one', 'two', 'three'], ['wc', '-m'])\n\n\tprint(unix.ccurl('-v',\n\t\t'-H', 'Header: Value',\n\t\t'https://github.com/jceaser/shellwrap.git'))\n\n### Reading Files\n\n\tfrom shellwrap import file\n\tprint(file.read_file('.editorconfig'))\n\n### Interactivity\n\n\tfrom shellwrap import interactivity\n\tinteractive.interactive(env, g=globals())\n\tinteractive.user_commands(handler=process_actions, g=globals())\n\nThe function `interactivity()` will start a python shell with the scope of the `globals()` as the global for the session. This means that any public methods in the calling file are public in the session allowing for any of them to be run and interacted with. History is remembered.\n\nThe function `user_commands()` is a little different. This ones will prompt the user for commands which are then handled by `process_actions(action=None, env:dict=None)`. This allows the calling function more control over what actions are offered. History is also remembered.\n\n----\nCopyright \u0026copy; 2022-2025 Thomas Cherry. This software is declared to be under the BSD license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjceaser%2Fshellwrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjceaser%2Fshellwrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjceaser%2Fshellwrap/lists"}