Recent Releases of snippy
snippy - Snippy 0.11.0
Breaking changes
- Change content category command line options.
- Change content text templates metadata section.
- Add content attribute
languages.
New features
- Add import plugin architecture with tldr plugin.
- Add new REST API endpoints to query distinct values of attributes.
- Add Bash completion support for command line interface.
- Add
--sortcommand line option to sort search results. - Add
--headerscommand line option to print only content headers.
Bugfixes
- Fix REST API server response if the HTTP request fails.
- Fix updating Markdown native content in text format.
- Fix
--formatoption with the export operation. - Fix parsing of text formatted solution.
- Fix update operation when content does not change.
- Fix
--salloption did not search all attributes. - Fix reading one line attributes like
brieffrom multiple lines. - Fix terminal colors on Windows.
- Fix parsing Markdown metadata from solution.
- Fix parsing Markdown solution data with '---' string.
- Fix parsing Markdown solution
briefattribute. - Fix Python 2 update and export operations with non ASCII characters.
Security
- none
Documentation
- none
Upgrade
All content must be exported to YAML files from version 0.10.0 and then imported to version 0.11.0. When upgrading from older version, see the release notes specific upgrade instructions.
```
Export all content with version v0.10.0 to YAML files.
snippy --version snippy export --snippets -f ./snippets.yaml snippy export --solutions -f ./solutions.yaml snippy export --references -f ./references.yaml
Install new version and import generated YAML files.
pip install snippy==0.11.0 --user snippy --version snippy import -f ./snippets.yaml snippy import -f ./solutions.yaml snippy import -f ./references.yaml snippy search . --scat all --limit 200 # List up to 200 contents from all categories. ```
- Python
Published by heilaaks almost 6 years ago
snippy - Snippy v0.10.0
Breaking changes
- Change REST API endpoints.
- Change REST API base path default.
- Change REST API JSON schema validation.
- Change REST API id attribute and queries with UUID.
- Change server base path command line option name.
New features
- Add search shortcut for command line interface.
- Add support for
name,sourceandversionscontent fields. - Add
gzipcompression support for REST API responses. - Add option to import all default content when server is started.
- Add environment variable support for server, storage and support options.
Bugfixes
- Fix install requirement for PyYAML version.
- Fix multiple server startup problems in Docker container.
- Fix POST HTTP response when multiple POST requests were processed.
- Fix creating new content with prefilled templates.
- Fix exporting and importing content template.
- Fix error when content matching to a text template is saved.
- Fix duplicated content field values when updating content.
- Fix default value setting to
groupsfield if no value was given. - Fix error message from duplicated content when defaults imported again.
Security
- Remove setuid/setgid bit from binaries in Docker image.
- Remove unnecessary file permissions in Docker image.
- Change IP address where server binds in Docker container.
Documentation
- Add containerized server example usage in Dockerfile and DockerHub.
Upgrade
All content must be exported to YAML files from version 0.9.0 and then imported to version 0.10.0. When upgrading from older version, see the release notes specific upgrade instructions.
```
Export all content with version v0.9.0 to YAML files.
snippy --version snippy export --snippets -f ./snippets.yaml snippy export --solutions -f ./solutions.yaml snippy export --references -f ./references.yaml
Install new version and import generated YAML files.
pip install snippy==0.10.0 --user snippy --version snippy import -f ./snippets.yaml snippy import -f ./solutions.yaml snippy import -f ./references.yaml snippy search --sall . --all ```
- Python
Published by heilaaks almost 7 years ago
snippy - Snippy v0.9.0
Breaking changes
- Change Markdown as default format.
- Change content field
grouptogroups. - Change content field
versionsfrom string to array. - Change UTC offset format from +0000 to +00:00.
- Change server command line options.
- Change
filteroption behaviour. - Change
editoroption and addno-editoroption. - Add new content field
description.
New features
- Add REST API routes for: keywords, groups, tags, uuid and digest.
- Add experimental support for PostgreSQL database.
- Add support for Markdown formatted content.
- Add support to output search results also in Markdown format.
- Add one command to export and import all default content.
- Add comment auto-alignment for snippets when printed to terminal.
- Add
descriptionfield in text content templates. - Add
uuidfield for CLI and REST API operations. - Add
limioption for CLI operations. - Add search category
scatoption for CLI operations.
Bugfixes
- Fix solution creation from empty template.
- Fix content update when parsing user input fails.
- Fix content import from invalid source file.
- Fix search from all categories with
alloption. - Fix resource validation for POST method.
- Fix resource validation for PUT and PATCH methods.
- Fix REST API HTTP OPTIONS responses.
- Fix reading timestamps without quotes from YAML.
Security
- Remove Alpine (apk) and Python (pip) installers from Docker image.
- Remove all log messages that may reveal secrets.
Upgrade
Existing content in version v0.8.0 must be exported to YAML files for each content category. Then new version v0.9.0 from the Snippy tool is installed and the content is imported.
Because group field name was changed to groups, YAML files exported from version v0.8.0 must be modified manually before they are imported to version v0.9.0. If this is not done, the groups field will be empty in version v0.9.0.
```
Export all content with version v0.8.0 to YAML files.
snippy --version snippy export --snippets -f ./snippets.yaml snippy export --solutions -f ./solutions.yaml snippy export --references -f ./references.yaml
Modify the YAML files so that all group property names are renamed to groups.
Install new version and import generated YAML files.
pip install snippy==0.9.0 --user snippy --version snippy import -f ./snippets.yaml snippy import -f ./solutions.yaml snippy import -f ./solutions.yaml snippy search --sall . --all ```
- Python
Published by heilaaks about 7 years ago
snippy - Snippy v0.8.0
New Features
- Add new content category references.
- Experimental beta release from RESTish API server.
- REST API documentation can be read from Swagger Hub.
- Use case and user documentation can be read from Read the Docs.
Examples
```
Installing for local user.
$ pip install snippy --user $ snippy import --defaults $ snippy import --defaults --solutions $ snippy import --defaults --references $ snippy search --sall docker
Installing as a Docker container.
$ sudo docker pull heilaaks/snippy:latest $ sudo docker run heilaaks/snippy search --sall docker
Running server in Docker container.
$ sudo docker run -d --net="host" --name snippy heilaaks/snippy --server --port 8080 --ip 127.0.0.1 --log-json -vv $ curl -s -X GET "http://127.0.0.1:8080/snippy/api/app/v1/snippets?sall=security&limit=1" -H "accept: application/vnd.api+json" $ sudo docker logs snippy $ sudo docker rm -f snippy ```
- Python
Published by heilaaks over 7 years ago
snippy - Snippy v0.7.0
New Features
- Experimental RESTish JSON API that implements a subset of JSON API v1.0.
- REST API documentation can be read from Swagger Hub
Examples
```
Installing for local user.
$ pip install snippy --user $ snippy import --defaults $ snippy search --sall docker
Installing for root user.
$ sudo pip install snippy $ sudo snippy import --defaults $ sudo snippy search --sall docker
Installing as a Docker container.
$ sudo docker pull heilaaks/snippy:latest $ sudo docker run heilaaks/snippy search --sall docker
Running server in Docker container.
$ sudo docker run -d --net="host" --name snippy heilaaks/snippy --server --json-logs -vv $ curl -X GET "http://127.0.0.1:8080/snippy/api/v1/snippets?sall=docker&limit=2" -H "accept: application/json" | python -m json.tool $ docker logs snippy $ docker rm -f snippy ```
- Python
Published by heilaaks almost 8 years ago
snippy - Snippy v0.6.0
New Features
- Support exporting and importing multiple contents from text file.
- Improved support to migrate content between Snippy and YAML, JSON or text files.
- Bug fixes and extended test coverage.
Examples
$ pip3 install snippy
$ snippy import --solution --defaults
$ snippy search -d e2d4df9eb68749cb
$ snippy export -d e2d4df9eb68749cb
$ snippy import -d e2d4df9eb68749cb -f howto-debug-docker.txt
$ snippy export -d e2d4df9eb68749cb -f howto-debug-docker.yaml
$ snippy export --solution -f all-solutions.txt
$ snippy export --solution --template
- Python
Published by heilaaks over 8 years ago
snippy - Snippy v0.5.0
New Features
- Changed command line options for migrating default content and templates.
- Improved test suite, documentation and many bug fixes.
- Added more default content (still minimal).
- Available from PyPI and Docker Hub.
Examples
$ pip3 install snippy
$ snippy --help
$ snippy import --snippet --defaults
$ snippy import --solution --defaults
$ snippy search --all --sall .
- Python
Published by heilaaks over 8 years ago
snippy - Snippy v0.1.0
New Features
- Operate snippets and solutions with six operations directly from command line.
- Minimal optional content for snippet and solution categories.
- Available from PyPI!
Examples
$ pip3 install snippy
$ snippy --help
$ snippy import --snippet --file defaults
$ snippy import --solution --file defaults
$ snippy search --all --sall .
- Python
Published by heilaaks over 8 years ago