{"id":21639933,"url":"https://github.com/soliez/pylight","last_synced_at":"2025-03-19T03:14:54.913Z","repository":{"id":222941734,"uuid":"758802429","full_name":"Soliez/pylight","owner":"Soliez","description":"Command line utility for viewing code snippets and source code files with syntax-highlighting","archived":false,"fork":false,"pushed_at":"2024-07-20T15:20:22.000Z","size":27102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T03:23:00.698Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soliez.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":"2024-02-17T05:47:31.000Z","updated_at":"2024-07-20T15:20:26.000Z","dependencies_parsed_at":"2024-02-17T06:30:26.010Z","dependency_job_id":"c754dfe2-a5cf-4d7c-aef1-9471d865f9b5","html_url":"https://github.com/Soliez/pylight","commit_stats":null,"previous_names":["soliez/code_highlighter","soliez/pylight"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soliez%2Fpylight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soliez%2Fpylight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soliez%2Fpylight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soliez%2Fpylight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soliez","download_url":"https://codeload.github.com/Soliez/pylight/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244345100,"owners_count":20438241,"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-11-25T04:15:43.092Z","updated_at":"2025-03-19T03:14:54.894Z","avatar_url":"https://github.com/Soliez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pylight\nCommand line utility for viewing code snippets and source code files with syntax-highlighting\n\n## Installation\n\u003e Before you get started, ensure you have Python 3.8 or later installed\n\n#### **Step 1:** Clone this repository\n```bash\ngit clone https://github.com/Soliez/pylight.git\n```\n\n#### **Step 2:** Run the install script\n```bash\npython3 pylight/install.py\n```\n\n### Alternative Installations\n\nPylight is also available as a compiled binary. See the [Releases](https://github.com/Soliez/pylight/releases) page for more details.\n\n---\n\n## Usage\n\n\u003e All of the following example usages are valid\n\n\n### Reading input from a file\n\nInvoking pylight with the `-f` flag instructs pylight to treat the second argument as a file path\n\n```bash\npylight -f \u003cpath-to-source-code-file\u003e\n```\n\n---\n\n### Reading input from a command line argument\n\nInvoking pylight with the `-c` flag instructs pylight to treat the second argument as code\n\n```bash\npylight -c \"import requests; r = requests.get('https://jsonplaceholder.typicode.com/users'); print(r.json())\"\n```\n\n--- \n\n### Reading input from an interactive prompt\n\nInvoking pylight with the `-i` flag instructs pylight to read the input from the user with an interactive prompt at runtime\n\n```bash\npylight -i\n```\n---\n\n### Reading input from standard-in\n\nInvoking pylight with the `-` flag instructs pylight to read the input from `stdin`\n\n```bash\necho \"import requests; r = requests.get('https://jsonplaceholder.typicode.com/users'); print(r.json())\" | pylight -\n```\n---\n\n### Example Output\n\n```bash\n$ pylight -f example.py\n```\n```python3\nimport requests\n\nr = requests.get(\"https://jsonplaceholder.typicode.com/users\")\n\nprint(r.json())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoliez%2Fpylight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoliez%2Fpylight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoliez%2Fpylight/lists"}