semvec/pypi-packages huggingface dataset:
wpexport 0.0.2
Backup your Wordpress post to GitHub or local
License: MIT
Keywords: github wordpress backup sync

# wpexport
This small python package backup your Wordpress post to GitHub. It convert
the html to Markdown with pypandoc. For the api interaction, I uses the two
packages gitpython and python-wordpress-xmlrpc. So you have to install this
dependence, if you wand to install it from source.

## quick start
Install wpexport:
```bash
pip install wpexport
```
It uses pandoc for the formatting. you may have to install it manually.
```bash
sudo apt install pandoc
```
More information https://pandoc.org/installing.html

Set up your settings:
```bash
python -m wpexport --setup
```
and when you have to input all the parameters. After that it will save the
parameters in the file ~.wpexport.conf. Notice that your passwords are in this
file.

Now you are ready to have some fun.
```bash
python -m wpexport
```

## command line arguments
This command export all your post to the GitHub repo. If you didn't like the
config file, you can pass the parameter throw the terminal. Use the name of the
parameter as the command option. The command option will always override the
config file. For axample you cann uses the config file for all parametes exclude
the password. And then pass the password throw the command line.
```bash
python -m wpexport --wp_pw 1234
```

## the config file
You can also uses another config file. For the setup as well as the backup
function.
```bash
python -m wpexport --config "/path/to/your/config.json"
```
The config file is a basic json file. You can look into it and change the
values, if you like.

## only local export
If you didn't like GitHub, only export it to your local machine.
```bash
python -m wpexport --output "/path/to/your/export"
```

## how does it work?
Coming soon.

## development
Clone repo:
```bash
git clone https://github.com/axju/wpexport.git
```
Create virtual environment and update dev-tools:
```bash
python3 -m venv venv
source venv/bin/activate
pip install --upgrade wheel pip setuptools twine
```
Install wpexport:
```bash
pip install -e .
```

Publish the packages:
```bash
python setup.py sdist bdist_wheel
twine upload dist/*
```
PyEventEmitter 1.0.5
Simple python events library
License: MIT

PyEventEmitter
==============

Python events library, heavily inspired by Node.js' EventEmitter.

Installation
============

::

    $ pip install PyEventEmitter

How to use
==========

The library provides an EventEmitter class. This class let you bind
listeners to events and trigger events.

.. code:: python

    import event_emitter as events

    em = events.EventEmitter()

    def hello(who):
        print('Hello {}'.format(who))

    em.on('hello', hello)
    em.emit('hello', who='World')  # prints Hello World

You can also use ``on`` decorator :

.. code:: python

    import event_emitter as events

    em = events.EventEmitter()

    @events.on(emitter=em, event='hello')
    def hello(who):
        print('Hello {}'.format(who))

    em.emit('hello', who='World')  # prints Hello World

Using ``once`` instead of ``on`` may be usefull if you want your
listener to be called once :

.. code:: python

    import event_emitter as events

    em = events.EventEmitter()

    def hello(who):
        print('Hello {}'.format(who))

    em.once('hello', hello)
    em.emit('hello', who='World')  # prints Hello World
    em.emit('hello', who='World')  # nothing happens

Of course, there is also a decorator for this :

.. code:: python

    import event_emitter as events

    em = events.EventEmitter()

    @events.once(emitter=em, event='hello')
    def hello(who):
        print('Hello {}'.format(who))

    em.emit('hello', who='World')  # prints Hello World

You can remove a listener bound to an event :

.. code:: python

    import event_emitter as events

    em = events.EventEmitter()

    def hello(who):
        print('Hello {}'.format(who))

    em.on('hello', hello)
    em.remove('hello', hello)
    em.emit('hello', who='World')  # nothing happens

Please note that this method will remove at moste one listener from the list.
If the same listener was bound multiple times to the event, this method has to
be invoked multiple times to remove all the occurences.

You can also remove all listeners bound to an event thanks to
``remove_all``.

The ``count`` method returns the number of listeners bound to an event :

.. code:: python

    import event_emitter as events

    em = events.EventEmitter()

    def hello(who):
        print('Hello {}'.format(who))

    em.on('hello', hello)
    print(em.count('hello'))  # prints 1