semvec/pypi-packages huggingface dataset:
prototag 0.1.3
A small cli tool to filter plain text files by header tags.
License: MIT
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4
Keywords: cli

Prototag
========

.. image:: https://travis-ci.org/flxbe/prototag.svg?branch=master
    :target: https://travis-ci.org/flxbe/prototag

A simple CLI tool to filter and list ``.md`` files based on comment headers.

Motivation
----------

After testing multiple sophisticated tools to document small ideas or meetups,
I found plain ``.md`` files and a flat directory structure to work best
for me. I have built this tool to help me search these protocols in the
terminal.

The cli tool ``ptag`` scans a given directory for ``.md`` files and tries to
extract a block comment at the start. If this comment includes valid ``yaml``,
the file is considered valid. One can specify selectors to further filter all
valid files. The list of results is then printed to stdout.

Installation
------------

.. code-block:: bash

    pip install prototag

Synopsis
--------

Usage: ``ptag [options] [<dir>]``

-h, --help              
    Show help.
-v, --version           
    Show version.
-t <selector>, --tag <selector>
    Filter the files by tags by specifying a selector.
-a <selector>, --author <selector>
    Filter the files by their author by specifying a selector.

One can use logical AND and OR conditions to filter the found files with
valid headers. AND terms are combined using ',' and OR terms are
combined using ':'. OR terms are evaluated before AND terms. The OR
conditions are not exclusive.

Select all files, that have both tag1 and tag2.

.. code-block:: bash

    ptag -t tag1,tag2

Select all files, that have at least one of both tags.

.. code-block:: bash

    ptag -t tag1:tag2
    
Select all files, that have either tag1 and tag2 or tag3 or both.

.. code-block:: bash

    ptag -t tag1,tag2:tag3

Example
-------

Consider the file ``~/protocols/example.md``:

.. code-block:: md

    <!--
    author: 
      - jan
      - olli
    tag: 
      - idea
      - python
    -->

    # Heading

    Some text.

One can filter the ``~/protocols`` directory using the cli tool ``ptag``. The
following command would return the filename of the above created file.

.. code-block:: bash

    ptag -t idea,python -a jan ~/protocols

The directory is optional and defaults to the current working directory. This
is therefore equivalent to

.. code-block:: bash

    cd ~/protocols
    ptag -t idea,python -a jan


Changelog
=========

0.1.3 (2017-12-26)
------------------
- Support Python ``2.7``.

0.1.2 (2017-12-23)
------------------
- Extract cli to ``prototag/cli.py``.

0.1.1 (2017-12-23)
------------------
- Add ``CHANGELOG.rst``.
- Update ``README.rst``.

0.1.0 (2017-12-22)
------------------
- Initial release.
vagranttoansible 1.0.2
Simple script to transform 'vagrant ssh-config' output to an inventory hosts for Ansible
License: MIT

Vagant to Ansible inventory
===========================

|Build Status| |PyPI version|

A simple library to convert ``vagrant ssh-config`` to an inventory file
for Ansible.

Usage
-----

Inside your vagrant directory, run the script ``vagrant2ansible`` This
will create a filed named ``hosts`` (your Ansible inventory) in the
current directory along with a file named ``.vagrant-ssh-config`` (the
output of ``vagrant ssh-config``).

The script has been tested with **Vagrant 2.0** but it should work with
earlier versions of Vagrant too.

Installation
------------

.. code:: bash

    $ pip install vagranttoansible

Example
-------

.. code:: bash

    $ vagranttoansible

This configuration:

.. code:: yaml

    Host machine1
      HostName 127.0.0.1
      User vagrant
      Port 2222
      UserKnownHostsFile /dev/null
      StrictHostKeyChecking no
      PasswordAuthentication no
      IdentityFile /home/mha-dw/Projets/ansible/.vagrant/machines/machine1/virtualbox/private_key
      IdentitiesOnly yes
      LogLevel FATAL
    Host machine2
      HostName 127.0.0.1
      User vagrant
      Port 2200
      UserKnownHostsFile /dev/null
      StrictHostKeyChecking no
      PasswordAuthentication no
      IdentityFile /home/mha-dw/Projets/ansible/.vagrant/machines/machine2/virtualbox/private_key
      IdentitiesOnly yes
      LogLevel FATAL

will be

.. code:: ini

    machine1 ansible_host=127.0.0.1 ansible_user=vagrant ansible_ssh_common_args='-o StrictHostKeyChecking=no' ansible_ssh_private_key_file=/home/mha-dw/Projets/ansible/.vagrant/machines/machine1/virtualbox/private_key ansible_port=2222 
    machine2 ansible_host=127.0.0.1 ansible_user=vagrant ansible_ssh_common_args='-o StrictHostKeyChecking=no' ansible_ssh_private_key_file=/home/mha-dw/Projets/ansible/.vagrant/machines/machine2/virtualbox/private_key ansible_port=2200

.. code:: bash

    $ vagranttoansible --help
    usage: vagranttoansible [-h] [-V] [-v] [-o OUTPUT_FILE_NAME]

    Simple script to transform 'vagrant ssh-config' output to an inventory hosts
    for Ansible. This script must be run in your vagrant folder.

    optional arguments:
      -h, --help            show this help message and exit
      -V, --version         Print version and exits
      -v, --verbose         Print more information
      -o OUTPUT_FILE_NAME, --output-file-name OUTPUT_FILE_NAME
                            The inventory file name to write hosts to. Default: stdout

TODO
----

-  Maybe remove the stormssh dependency
-  Test with different Vagrant environments

More options will be added. Feel free to contribute.

Credits
-------

Mohamed El Mouctar HAIDARA (elmhaidara@gmail.com)

.. |Build Status| image:: https://travis-ci.org/haidaraM/vagranttoansibleinventory.svg?branch=master
   :target: https://travis-ci.org/haidaraM/vagranttoansibleinventory
.. |PyPI version| image:: https://badge.fury.io/py/vagranttoansible.svg
   :target: https://badge.fury.io/py/vagranttoansible