Metadata-Version: 1.0
Name: dendrotox
Version: 2017.10.20.10
Summary: Python interface to Tox distributed communications
Home-page: https://github.com/wdbm/dendrotox
Author: Will Breaden Madden
Author-email: wbm@protonmail.ch
License: GPLv3
Description: .. figure:: https://raw.githubusercontent.com/wdbm/dendrotox/master/media/dendrotox.png
           :alt: 
        
        ``dendrotox`` is a Python module designed to enable Python code to
        interact with the `Tox <https://tox.chat/>`__ distributed communications
        network, including for the purposes of scripts communicating with people
        or other scripts. It uses `TokTok
        Toxcore <https://github.com/TokTok/c-toxcore>`__ and
        `ratox <https://github.com/kytvi2p/ratox>`__ for interfacing with the
        Tox network and `megaparsex <https://github.com/wdbm/megaparsex>`__ for
        parsing.
        
        In particular, ``dendrotox`` interacts with the filesystem provided by
        the FIFO Tox client `ratox <https://github.com/kytvi2p/ratox>`__.
        ``dendrotox`` also provides functionality to send and receive messages,
        to parse input, to send files, to request confirmations, to provide
        information such as IP address and weather information, and to run
        arbitrary commands, including functionality to launch reverse-SSH
        connections and to restart a script.
        
        setup
        =====
        
        .. code:: bash
        
            sudo apt-get install\
                autoconf        \
                autotools-dev   \
                automake        \
                build-essential \
                checkinstall    \
                check           \
                cmake           \
                git             \
                libtool         \
                libsodium-dev   \
                yasm
        
        .. code:: bash
        
            cd ~
            mkdir Tox
            cd Tox
        
        Install the Sodium crypto library.
        
        .. code:: bash
        
            git clone https://github.com/jedisct1/libsodium.git
            cd libsodium
            git checkout tags/1.0.3
            ./autogen.sh
            ./configure
            make check
            sudo checkinstall --install --pkgname libsodium --pkgversion 1.0.0 --nodoc
            sudo ldconfig
            cd ..
        
        Install the libvpx codec.
        
        .. code:: bash
        
            git clone https://chromium.googlesource.com/webm/libvpx
            cd libvpx
            git checkout tags/v1.4.0
            ./configure --enable-shared --disable-static
            make -j$(nproc)
            sudo make install
            cd ..
        
        Install TokTok ToxCore.
        
        .. code:: bash
        
            git clone https://github.com/TokTok/c-toxcore.git
            cd c-toxcore
            autoreconf --install --force
            mkdir _build
            cd _build
            ../configure
            make -j$(nproc)
            sudo make install
            sudo ldconfig
            cd ../..
        
        Install ``ratox``.
        
        .. code:: bash
        
            #git clone git://git.2f30.org/ratox.git
            git clone https://github.com/kytvi2p/ratox.git
            cd ratox
            make -j$(nproc)
            sudo make install
        
        Install dendrotox.
        
        .. code:: bash
        
            sudo pip install dentrodox
        
        When ``ratox`` is launched for the first time, it creates a file
        ``.ratox.tox`` at the working directory to store Tox profile details.
        While running, the file ``id`` contains the Tox ID.
        
        examples
        ========
        
        ``dendrotox`` is imported and launched in the following way:
        
        .. code:: python
        
            import dendrotox
        
            dendrotox.start_messaging()
        
            print("Tox ID: " + dendrotox.self_ID())
        
        A message can be sent to a contact in the following way, where a contact
        is specified using a string containing their Tox ID:
        
        .. code:: python
        
            dendrotox.send_message(
                contact = Tox_ID,
                text    = "oohai"
            )
        
        A message can be sent to multiple contacts in the following way, where
        contacts are specified as a list of strings containing contacts' Tox
        IDs.
        
        .. code:: python
        
            dendrotox.send_message(
                contacts = [Tox_ID_1, Tox_ID_2],
                text     = "sup"
            )
        
        A list of unseen messages received recently can be accessed in the
        following ways:
        
        .. code:: python
        
            messages = dendrotox.received_messages()
        
            print(messages[0].sender())
        
        .. code:: python
        
            message = dendrotox.last_received_message()
        
            print(message.__repr__())
        
        See example bot code for more advanced usage, including message parsing,
        confirmations and running commands.
        
        dendrotox\_alert.py
        ===================
        
        The script ``dendrotox_alert.py`` is a command line script that can be
        used to send a message to contacts. It attempts to connect with any
        specified contacts before attempting to send a message to them. If no
        contacts are specified, it attempts to send a message to all known
        contacts.
        
        .. code:: bash
        
            dendrotox_alert.py --text="alert"
        
Platform: UNKNOWN
