ultyas


Nameultyas JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/jamescherti/ultyas
SummaryA tool for converting code snippets from Ultisnips to YASnippet format
upload_time2024-10-18 16:18:33
maintainerNone
docs_urlNone
authorJames Cherti
requires_python<4,>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ultyas - UltiSnips to YASnippet Conversion Tool
![License](https://img.shields.io/github/license/jamescherti/ultyas)

Ultyas is a command-line tool designed to simplify the process of converting code snippets from UltiSnips (Vim) to YASnippet format (Emacs).

With Ultyas, you can effortlessly migrate your code snippets to the YASnippet format, saving you valuable time and effort.

## Installation

Here is how to install Ultyas locally to `~/.local/bin/ultyas` using pip:
```
pip install --user ultyas
```

## Command usage example

To use Ultyas, simply run the command with the appropriate input and output files. Here is a basic example:

```
~/.local/bin/ultyas ~/.vim/UltiSnips/python.snippets -o ~/.emacs.d/snippets/python-mode/
```

This command takes an UltiSnips file `python.snippets` and converts it to a directory that contains YASnippet snippets at `~/.emacs.d/snippets/python-mode/`.

## Options and flags

```
usage: ultyas <file.snippets> -o <yasnippet-major-mode-dir>

A command-line tool for converting code snippets from UltiSnips to YASnippet format.

positional arguments:
  ultisnips_file        The UltiSnips .snippets file (e.g. '~/.vim/UltiSnips/python.snippets')

options:
  -h, --help            show this help message and exit
  -o YASNIPPET_DIR, --yasnippet-dir YASNIPPET_DIR
                        The YASnippet snippets major mode directory (e.g. '~/.emacs.d/snippets/python-mode/')
  -i {auto,fixed,nothing}, --yas-indent-line {auto,fixed,nothing}
                        Add one of the following comments to the YASnippet snippets that will be generated: "# expand-env: ((yas-indent-line 'fixed))" or "# expand-env: ((yas-indent-line
                        'auto))". For more information on 'yas-indent-line', visit: https://joaotavora.github.io/yasnippet/snippet-reference.html#yas-indent-line
  -t CONVERT_TABS_TO, --convert-tabs-to CONVERT_TABS_TO
                        Convert the tabs that are in the generated snippets to the string passed to this option (Default: The indentation marker '$>')
  -v, --verbose         Verbose mode
  -q, --quiet           Quiet mode
```

## Example of an UltiSnips snippet that could be converted to Yasnippet

Here is an example of an UltiSnips snippet that can be converted by Ultyas from the UltiSnips format to the Yasnippet format:
```
priority 50

snippet if
if ${1:True}:
	${2:pass}
endsnippet

snippet for
for ${1:_} in ${2:[]}:
	${3:pass}
endsnippet

snippet while
while ${1:True}:
	${2:pass}
endsnippet
```

## License

The `ultyas` Emacs package has been written by [James Cherti](https://www.jamescherti.com/) and is distributed under terms of the GNU General Public License version 3, or, at your choice, any later version.

Copyright (C) 2023-2024 [James Cherti](https://www.jamescherti.com)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program.

## Links

- [Ultyas @GitHub](https://github.com/jamescherti/ultyas/)
- [Ultyas @PyPI](https://pypi.org/project/ultyas/)

Other Emacs packages by the same author:
- [minimal-emacs.d](https://github.com/jamescherti/minimal-emacs.d): This repository hosts a minimal Emacs configuration designed to serve as a foundation for your vanilla Emacs setup and provide a solid base for an enhanced Emacs experience.
- [vim-tab-bar.el](https://github.com/jamescherti/vim-tab-bar.el): Make the Emacs tab-bar Look Like Vim’s Tab Bar.
- [outline-indent.el](https://github.com/jamescherti/outline-indent.el): An Emacs package that provides a minor mode that enables code folding and outlining based on indentation levels for various indentation-based text files, such as YAML, Python, and other indented text files.
- [easysession.el](https://github.com/jamescherti/easysession.el): Easysession is lightweight Emacs session manager that can persist and restore file editing buffers, indirect buffers/clones, Dired buffers, the tab-bar, and the Emacs frames (with or without the Emacs frames size, width, and height).
- [elispcomp](https://github.com/jamescherti/elispcomp): A command line tool that allows compiling Elisp code directly from the terminal or from a shell script. It facilitates the generation of optimized .elc (byte-compiled) and .eln (native-compiled) files.
- [tomorrow-night-deepblue-theme.el](https://github.com/jamescherti/tomorrow-night-deepblue-theme.el): The Tomorrow Night Deepblue Emacs theme is a beautiful deep blue variant of the Tomorrow Night theme, which is renowned for its elegant color palette that is pleasing to the eyes. It features a deep blue background color that creates a calming atmosphere. The theme is also a great choice for those who miss the blue themes that were trendy a few years ago.
- [dir-config.el](https://github.com/jamescherti/dir-config.el): Automatically find and evaluate .dir-config.el Elisp files to configure directory-specific settings.
- [flymake-bashate.el](https://github.com/jamescherti/flymake-bashate.el): A package that provides a Flymake backend for the bashate Bash script style checker.
- [flymake-ansible-lint.el](https://github.com/jamescherti/flymake-ansible-lint.el): An Emacs package that offers a Flymake backend for `ansible-lint`.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jamescherti/ultyas",
    "name": "ultyas",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "James Cherti",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/4a/b0/7d07bfa95c01ed5d9457af4414bc1fccd3dc6c70f099f751f9c4c64617bd/ultyas-1.1.0.tar.gz",
    "platform": null,
    "description": "# Ultyas - UltiSnips to YASnippet Conversion Tool\n![License](https://img.shields.io/github/license/jamescherti/ultyas)\n\nUltyas is a command-line tool designed to simplify the process of converting code snippets from UltiSnips (Vim) to YASnippet format (Emacs).\n\nWith Ultyas, you can effortlessly migrate your code snippets to the YASnippet format, saving you valuable time and effort.\n\n## Installation\n\nHere is how to install Ultyas locally to `~/.local/bin/ultyas` using pip:\n```\npip install --user ultyas\n```\n\n## Command usage example\n\nTo use Ultyas, simply run the command with the appropriate input and output files. Here is a basic example:\n\n```\n~/.local/bin/ultyas ~/.vim/UltiSnips/python.snippets -o ~/.emacs.d/snippets/python-mode/\n```\n\nThis command takes an UltiSnips file `python.snippets` and converts it to a directory that contains YASnippet snippets at `~/.emacs.d/snippets/python-mode/`.\n\n## Options and flags\n\n```\nusage: ultyas <file.snippets> -o <yasnippet-major-mode-dir>\n\nA command-line tool for converting code snippets from UltiSnips to YASnippet format.\n\npositional arguments:\n  ultisnips_file        The UltiSnips .snippets file (e.g. '~/.vim/UltiSnips/python.snippets')\n\noptions:\n  -h, --help            show this help message and exit\n  -o YASNIPPET_DIR, --yasnippet-dir YASNIPPET_DIR\n                        The YASnippet snippets major mode directory (e.g. '~/.emacs.d/snippets/python-mode/')\n  -i {auto,fixed,nothing}, --yas-indent-line {auto,fixed,nothing}\n                        Add one of the following comments to the YASnippet snippets that will be generated: \"# expand-env: ((yas-indent-line 'fixed))\" or \"# expand-env: ((yas-indent-line\n                        'auto))\". For more information on 'yas-indent-line', visit: https://joaotavora.github.io/yasnippet/snippet-reference.html#yas-indent-line\n  -t CONVERT_TABS_TO, --convert-tabs-to CONVERT_TABS_TO\n                        Convert the tabs that are in the generated snippets to the string passed to this option (Default: The indentation marker '$>')\n  -v, --verbose         Verbose mode\n  -q, --quiet           Quiet mode\n```\n\n## Example of an UltiSnips snippet that could be converted to Yasnippet\n\nHere is an example of an UltiSnips snippet that can be converted by Ultyas from the UltiSnips format to the Yasnippet format:\n```\npriority 50\n\nsnippet if\nif ${1:True}:\n\t${2:pass}\nendsnippet\n\nsnippet for\nfor ${1:_} in ${2:[]}:\n\t${3:pass}\nendsnippet\n\nsnippet while\nwhile ${1:True}:\n\t${2:pass}\nendsnippet\n```\n\n## License\n\nThe `ultyas` Emacs package has been written by [James Cherti](https://www.jamescherti.com/) and is distributed under terms of the GNU General Public License version 3, or, at your choice, any later version.\n\nCopyright (C) 2023-2024 [James Cherti](https://www.jamescherti.com)\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program.\n\n## Links\n\n- [Ultyas @GitHub](https://github.com/jamescherti/ultyas/)\n- [Ultyas @PyPI](https://pypi.org/project/ultyas/)\n\nOther Emacs packages by the same author:\n- [minimal-emacs.d](https://github.com/jamescherti/minimal-emacs.d): This repository hosts a minimal Emacs configuration designed to serve as a foundation for your vanilla Emacs setup and provide a solid base for an enhanced Emacs experience.\n- [vim-tab-bar.el](https://github.com/jamescherti/vim-tab-bar.el): Make the Emacs tab-bar Look Like Vim\u2019s Tab Bar.\n- [outline-indent.el](https://github.com/jamescherti/outline-indent.el): An Emacs package that provides a minor mode that enables code folding and outlining based on indentation levels for various indentation-based text files, such as YAML, Python, and other indented text files.\n- [easysession.el](https://github.com/jamescherti/easysession.el): Easysession is lightweight Emacs session manager that can persist and restore file editing buffers, indirect buffers/clones, Dired buffers, the tab-bar, and the Emacs frames (with or without the Emacs frames size, width, and height).\n- [elispcomp](https://github.com/jamescherti/elispcomp): A command line tool that allows compiling Elisp code directly from the terminal or from a shell script. It facilitates the generation of optimized .elc (byte-compiled) and .eln (native-compiled) files.\n- [tomorrow-night-deepblue-theme.el](https://github.com/jamescherti/tomorrow-night-deepblue-theme.el): The Tomorrow Night Deepblue Emacs theme is a beautiful deep blue variant of the Tomorrow Night theme, which is renowned for its elegant color palette that is pleasing to the eyes. It features a deep blue background color that creates a calming atmosphere. The theme is also a great choice for those who miss the blue themes that were trendy a few years ago.\n- [dir-config.el](https://github.com/jamescherti/dir-config.el): Automatically find and evaluate .dir-config.el Elisp files to configure directory-specific settings.\n- [flymake-bashate.el](https://github.com/jamescherti/flymake-bashate.el): A package that provides a Flymake backend for the bashate Bash script style checker.\n- [flymake-ansible-lint.el](https://github.com/jamescherti/flymake-ansible-lint.el): An Emacs package that offers a Flymake backend for `ansible-lint`.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A tool for converting code snippets from Ultisnips to YASnippet format",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/jamescherti/ultyas"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c86cdc49029a5db81e6cb3ca16d85c678fbc1e7f469b8fffbd4d01b130a25a00",
                "md5": "e6a75964df56cd579b32a671c55abfc5",
                "sha256": "9ab00f0b4c94006dc4f92cb0d2a953bbab5fcc53f39e1f7b08a27214207994b6"
            },
            "downloads": -1,
            "filename": "ultyas-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6a75964df56cd579b32a671c55abfc5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.6",
            "size": 20613,
            "upload_time": "2024-10-18T16:18:31",
            "upload_time_iso_8601": "2024-10-18T16:18:31.885963Z",
            "url": "https://files.pythonhosted.org/packages/c8/6c/dc49029a5db81e6cb3ca16d85c678fbc1e7f469b8fffbd4d01b130a25a00/ultyas-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ab07d07bfa95c01ed5d9457af4414bc1fccd3dc6c70f099f751f9c4c64617bd",
                "md5": "9bf5de66bd253e0092cef46e9a99d0d2",
                "sha256": "03ea4738321549df990e34058b130b44f3bd098946fd2464402db5be56a5bc16"
            },
            "downloads": -1,
            "filename": "ultyas-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9bf5de66bd253e0092cef46e9a99d0d2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.6",
            "size": 20515,
            "upload_time": "2024-10-18T16:18:33",
            "upload_time_iso_8601": "2024-10-18T16:18:33.407433Z",
            "url": "https://files.pythonhosted.org/packages/4a/b0/7d07bfa95c01ed5d9457af4414bc1fccd3dc6c70f099f751f9c4c64617bd/ultyas-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-18 16:18:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jamescherti",
    "github_project": "ultyas",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ultyas"
}
        
Elapsed time: 0.42976s