Add details to readme and organize folder
This commit is contained in:
parent
97a678cf73
commit
ab6ca3297d
7 changed files with 72 additions and 2 deletions
54
README.md
54
README.md
|
@ -1 +1,53 @@
|
||||||
== feed2imap
|
# feed2imap
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- Python 3.X (3.8 tested)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Linux / Mac OS / *nix
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo python3 setup.py install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows (using PowerShell)
|
||||||
|
|
||||||
|
```PowerShell
|
||||||
|
& $(where.exe python).split()[0] setup.py install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. Create a feeds file in YAML format with the following syntax:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
default-email: feed-sender@domain.com
|
||||||
|
disable-ssl-verification: true
|
||||||
|
include-images: true
|
||||||
|
feeds:
|
||||||
|
- name: Slashdot RSS
|
||||||
|
url: http://rss.slashdot.org/Slashdot/slashdot
|
||||||
|
target: "imaps://username:password@server.domain.com/INBOX.Feeds.Technology.Slashdot" # The dot separate folders. You can also use IMAP without SSL using imap: as protocol at the begging.
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
feed2imap.py [OPTIONS]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
```
|
||||||
|
--debug-level [CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET] Debug level.
|
||||||
|
-f, --feeds-file TEXT File in YAML with the information of the feeds.
|
||||||
|
-l, --log-file TEXT File to store all log information.
|
||||||
|
-e, --default-email TEXT Email address for the sender of the feed items.
|
||||||
|
-n, --disable-ssl-verification Disable SSL verification for the IMAP server certificate.
|
||||||
|
-i, --include-images Include images from feed items.
|
||||||
|
-f, --feeds TEXT Feed item in JSON format.
|
||||||
|
-c, --cache-file TEXT Cache file to store downloaded items.
|
||||||
|
--help Show this message and exit.
|
||||||
|
```
|
||||||
|
|
0
feed2imap/__init__.py
Normal file
0
feed2imap/__init__.py
Normal file
|
@ -15,6 +15,7 @@ import imaplib
|
||||||
import email
|
import email
|
||||||
from email import message
|
from email import message
|
||||||
import urllib
|
import urllib
|
||||||
|
from defusedxml.ElementTree import fromstring
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
import requests
|
import requests
|
||||||
|
@ -22,7 +23,6 @@ import click
|
||||||
import click_config_file
|
import click_config_file
|
||||||
import logging
|
import logging
|
||||||
from logging.handlers import SysLogHandler
|
from logging.handlers import SysLogHandler
|
||||||
from defusedxml.ElementTree import fromstring
|
|
||||||
|
|
||||||
class feed2imap():
|
class feed2imap():
|
||||||
|
|
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools", "wheel"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
click
|
||||||
|
click_config_file
|
||||||
|
pyyaml
|
||||||
|
requests
|
9
setup.cfg
Normal file
9
setup.cfg
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[metadata]
|
||||||
|
name = %project_codename%
|
||||||
|
version = %version%
|
||||||
|
|
||||||
|
[options]
|
||||||
|
packages = %project_codename%
|
||||||
|
install_requires =
|
||||||
|
requests
|
||||||
|
importlib; python_version == "3.6"
|
2
setup.py
Normal file
2
setup.py
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
import setuptools
|
||||||
|
setuptools.setup()
|
Loading…
Reference in a new issue