Skip to content

Commit

Permalink
added: pypi release
Browse files Browse the repository at this point in the history
  • Loading branch information
Schluggi committed Jan 8, 2021
1 parent 9d53fb3 commit 0b102e4
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 16 deletions.
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
*.idea
*~
*.pyc
.pypirc
__pycache__
build/
dist/
/pymap_copy.egg-info/
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,27 @@ SSL/TLS and STARTTLS support i wrote my own python-based version. I hope you lik
- Python >= 3.5 (with pip)

## Installation
### pip (recommended)
1. Install pymap-copy: `python3 -m pip install pymap-copy`
2. Start the program:`pymap-copy.py --help`
> **Upgrade**: `python3 -m pip install --upgrade pymap-copy`
### whl / release
1. Download the latest [release](https://github.com/Schluggi/pymap-copy/releases/latest)
2. Install the wheel-file: `python3 -m pip install pymap_copy-X.X-py3-none-any.whl`
3. Start the program:`pymap-copy.py --help`
> **Upgrade**: Simply install a newer release
### git
1. Clone this repo
2. Install the requirements by running `pip3 install -r requirements.txt`
3. Start the program:`./pymap-copy.py --help`
> **Upgrade**: `git pull`
## Simple usage
By running the following command the whole structure (folders & mails) from user1 will be copy to the mailbox of user2.
```
./pymap-copy.py \
pymap-copy.py \
--source-user=user1 \
--source-server=server1.example.org \
--source-pass=2345678 \
Expand Down Expand Up @@ -149,4 +162,4 @@ Possible encryption are `tls`, `ssl` (the same as `tls`), `none` and `starttls`.


## Credits
Created and maintained by Schluggi.
Created and maintained by Lukas Schulte-Tickmann / Schluggi.
13 changes: 11 additions & 2 deletions pymap-copy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/python3
"""
Copy and transfer IMAP mailboxes
"""
__version__ = '1.0'
__author__ = 'Lukas Schulte-Tickmann'
__url__ = 'https://github.com/Schluggi/pymap-copy'

from argparse import ArgumentParser, ArgumentTypeError
from time import time

Expand Down Expand Up @@ -82,8 +89,10 @@ def login(client, user, password):
return False, '{} No active connection'.format(colorize('Error:', color='red', bold=True))


parser = ArgumentParser(description='Simple python client to copy and transfer IMAP mailboxes ',
epilog='pymap-copy by Schluggi (https://github.com/Schluggi/pymap-copy)')
parser = ArgumentParser(description='Copy and transfer IMAP mailboxes',
epilog='pymap-copy by {} ({})'.format(__author__, __url__))
parser.add_argument('-v', '--version', help='show version and exit.', action="version",
version='pymap-copy {} by {} ({})'.format(__version__, __author__, __url__))

#: run mode arguments
parser.add_argument('-d', '--dry-run', help='copy & creating nothing, just feign', action="store_true")
Expand Down
38 changes: 38 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import setuptools

with open('README.md') as readme:
long_desc = readme.read()

setuptools.setup(
name='pymap-copy',
version='1.0',
python_requires='>=3.5',
scripts=['pymap-copy.py'],
author='Lukas Schulte-Tickmann',
author_email='[email protected]',
description='Copy and transfer IMAP mailboxes ',
long_description=long_desc,
long_description_content_type='text/markdown',
url='https://github.com/Schluggi/pymap-copy',
project_urls={
'Source': 'https://github.com/Schluggi/pymap-copy',
'Tracker': 'https://github.com/Schluggi/pymap-copy/issues',
'Funding': 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KPG2MY37LCC24&source=url'
},
packages=setuptools.find_packages(),
py_modules=['imapidle', 'utils'],
install_requires=[
'chardet',
'IMAPClient',
'six'
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Communications :: Email :: Post-Office :: IMAP',
'Topic :: Utilities'
]
)

0 comments on commit 0b102e4

Please sign in to comment.