{"id":16921639,"url":"https://github.com/sbrunner/sphinx-prompt","last_synced_at":"2025-04-10T00:19:19.901Z","repository":{"id":11163734,"uuid":"13536573","full_name":"sbrunner/sphinx-prompt","owner":"sbrunner","description":"Sphinx directive to add unselectable prompt","archived":false,"fork":false,"pushed_at":"2024-04-14T00:21:14.000Z","size":899,"stargazers_count":46,"open_issues_count":10,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T14:55:40.861Z","etag":null,"topics":["documentation","sphinx-extension"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbrunner.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":"2013-10-13T09:05:43.000Z","updated_at":"2024-05-01T17:43:50.199Z","dependencies_parsed_at":"2023-10-01T16:50:26.186Z","dependency_job_id":"e0c5c28f-477f-48ca-936e-b7f6d9b91991","html_url":"https://github.com/sbrunner/sphinx-prompt","commit_stats":{"total_commits":433,"total_committers":18,"mean_commits":"24.055555555555557","dds":0.7228637413394919,"last_synced_commit":"3065051576fde3ea1940d955049ba26574ec479b"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunner%2Fsphinx-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunner%2Fsphinx-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunner%2Fsphinx-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunner%2Fsphinx-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbrunner","download_url":"https://codeload.github.com/sbrunner/sphinx-prompt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131489,"owners_count":21052855,"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":["documentation","sphinx-extension"],"created_at":"2024-10-13T19:52:41.208Z","updated_at":"2025-04-10T00:19:19.875Z","avatar_url":"https://github.com/sbrunner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sphinx Prompt\n\n## Initialize\n\nIn `conf.py` add `extensions += ['sphinx_prompt']`.\n\n## Syntax\n\nA default prompt can be created using a `prompt` directive:\n\n```rst\n.. prompt::\n\n   \u003cstatements\u003e\n```\n\nThe prompt can be further customized in one of two ways:\n\n- Using positional arguments:\n\n  ```rst\n  .. prompt:: [\u003clanguage\u003e [\u003cprompts\u003e [\u003cmodifiers\u003e]]]\n\n      \u003cstatements\u003e\n  ```\n\n- Using options:\n\n  ```rst\n  .. prompt::\n      :language: \u003clanguage\u003e\n      :prompts: \u003cprompts\u003e\n      :modifiers: \u003cmodifiers\u003e\n\n     \u003cstatements\u003e\n  ```\n\nWhile these constructs generate the same output, the positional\narguments cannot be used if you want to use a prompt that contains\nspaces. This is a limitation of reStructuredText.\n\nPositional arguments can be mixed with options **if** they don\\'t\noverlap (so if you pass prompts using options, you can only pass the\nlanguage using positional arguments):\n\n```rst\n.. prompt:: bash\n    :prompts: (cool_project) $\n\n   python3 -m pip install --upgrade sphinx-prompt\n```\n\n### Language\n\nSupported language:\n\n- `text` (no pigments, default)\n- `bash`\n- `batch`\n- `powershell`\n- `python`\n- `scala`\n\n### Prompt(s)\n\nIf modifier is auto, a comma-separated list of prompts to find in the\nstatements.\n\nElse the prompt to add on each statements, for Python and Bash language\nthe end `\\` is supported.\n\nDefaults to empty, except for the shell languages listed below:\n\n- `bash` - `$`\n- `batch` - `C:\\\u003e`\n- `powershell` - `PS C:\\\u003e`\n\n## Examples\n\nSee: \u003chttp://sbrunner.github.io/sphinx-prompt/\u003e\n\n## Run tests and prospector\n\n```bash\npython3 -m pip install --user --upgrade poetry\npoetry install\npoetry run pytest\npoetry run prospector\n```\n\nThe code should be formatted with `black` add `isort`.\n\n## Create new release\n\n```bash\ngit tag \u003cversion\u003e\ngit push origin \u003cversion\u003e\n```\n\n## Contributing\n\nInstall the pre-commit hooks:\n\n```bash\npip install pre-commit\npre-commit install --allow-missing-config\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbrunner%2Fsphinx-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbrunner%2Fsphinx-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbrunner%2Fsphinx-prompt/lists"}