{"id":13642508,"url":"https://github.com/x-j/ps1scriptify","last_synced_at":"2025-04-20T16:32:37.740Z","repository":{"id":44372708,"uuid":"164296861","full_name":"x-j/ps1scriptify","owner":"x-j","description":"wrapper turning Python scripts into Powershell scripts","archived":false,"fork":false,"pushed_at":"2023-03-18T23:45:36.000Z","size":30,"stargazers_count":62,"open_issues_count":3,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-02T01:16:07.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x-j.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":"2019-01-06T10:28:51.000Z","updated_at":"2024-08-02T01:16:10.381Z","dependencies_parsed_at":"2024-08-02T01:26:09.171Z","dependency_job_id":null,"html_url":"https://github.com/x-j/ps1scriptify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-j%2Fps1scriptify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-j%2Fps1scriptify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-j%2Fps1scriptify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-j%2Fps1scriptify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x-j","download_url":"https://codeload.github.com/x-j/ps1scriptify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223833150,"owners_count":17210788,"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":[],"created_at":"2024-08-02T01:01:32.374Z","updated_at":"2024-11-09T13:32:08.598Z","avatar_url":"https://github.com/x-j.png","language":"Python","readme":"# ps1scriptify\n\nPython script that creates a Powershell function wrapped around an executable Python script. Easy as pie to understand.\n\n\u003enote from 2022: this code is old and buggy, I'm not sure why I made it in the first place, I'm sure there are other, better ways to call python scripts from terminal. But hey, this script still works in some cases.\n\nIf your Python script has a main block and uses an ArgumentParser then you can __ps1scriptify__ it! This is done by snakingly parsing your .py file using regex and the result is a .ps1 file containing a function that _should_ take the same arguments as your script. This Powershell function calls your .py file, so you can use it straight from terminal.\n\nCURRENTLY AND FOR THE FORSEEABLE FUTURE ONLY WORKS ON WINDOWS AND WITH PYTHON3, and only on argparse.\n\nusage:\n```\u003e python ps1scriptify.py [Python file here]```\n\nOptionally include the parameter -f to make this script overwrite existing .ps1 files.\n\nExample:\n```\u003e python ps1scriptify.py foo.py -f```\n\nWill create a file named Foo.ps1, overwriting it if it already exists. \n\nOr, you can specify the destination folder by using the -dest parameter.\n\nExample:\n```\u003e python ps1scriptify.py foo.py -dest C:\\bar```\n\nWill create a file named Foo.ps1 in folder C:\\bar.\n\nFun fact: you can test this script by running it on itself!\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-j%2Fps1scriptify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-j%2Fps1scriptify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-j%2Fps1scriptify/lists"}