-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,8 @@ | |
|
||
.venv | ||
__pycache__ | ||
build | ||
dist | ||
*.egg-info | ||
|
||
.index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,25 +9,30 @@ | |
<a href="https://gitee.com/hsowan/ForMaiR">码云</a> | ||
</p> | ||
|
||
## Usage | ||
## Installation | ||
|
||
### Install using `pip` | ||
|
||
```bash | ||
# clone repo | ||
git clone [email protected]:k8scat/ForMaiR.git | ||
cd ForMaiR | ||
$ python3 -m pip install --user formair | ||
``` | ||
|
||
# copy `template/config.yaml` as your own | ||
cp template/config.yaml config.yaml | ||
### Install using `git` | ||
|
||
# init python3 environment | ||
virtualenv -p python3 .venv | ||
source .venv/bin/activate | ||
```bash | ||
$ git clone [email protected]:k8scat/ForMaiR.git | ||
$ cd ForMaiR | ||
$ python3 setup.py install | ||
``` | ||
|
||
# install requirements | ||
pip install -r requirements.txt | ||
## Usage | ||
|
||
Refer config: [template/config.yaml](https://github.com/k8scat/ForMaiR/blob/master/template/config.yaml) | ||
|
||
```bash | ||
$ formair # load config from ./config.yaml | ||
|
||
# start forwarding emails by your custom rules | ||
python main.py config.yaml | ||
$ formair /path/to/config.yaml # load config from /path/to/config.yaml | ||
``` | ||
|
||
## Custom rules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,25 +11,30 @@ | |
|
||
自定义规则的邮件自动转发工具。 | ||
|
||
## 使用 | ||
## 安装 | ||
|
||
### 使用 `pip` | ||
|
||
```bash | ||
# 克隆代码仓 | ||
git clone [email protected]:hsowan/ForMaiR.git | ||
cd ForMaiR | ||
$ python3 -m pip install --user formair | ||
``` | ||
|
||
# 从 template/config.yaml 复制一份配置文件 | ||
cp template/config.yaml config.yaml | ||
### 使用 `git` | ||
|
||
# 初始化 python3 的环境 | ||
virtualenv -p python3 .venv | ||
source .venv/bin/activate | ||
```bash | ||
$ git clone [email protected]:k8scat/ForMaiR.git | ||
$ cd ForMaiR | ||
$ python3 setup.py install | ||
``` | ||
|
||
# 安装依赖 | ||
pip install -r requirements.txt | ||
## 使用 | ||
|
||
参考配置:[template/config.yaml](https://github.com/k8scat/ForMaiR/blob/master/template/config.yaml) | ||
|
||
```bash | ||
$ formair # 从 ./config.yaml 中加载配置 | ||
|
||
# 开始根据自定义的规则进行转发邮件 | ||
python main.py config.yaml | ||
$ formair /path/to/config.yaml # 从 /path/to/config.yaml 中加载配置 | ||
``` | ||
|
||
## 自定义规则 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import setuptools | ||
|
||
with open("README.md", 'r', encoding="utf-8") as f: | ||
long_description = f.read() | ||
|
||
setuptools.setup( | ||
name='formair', | ||
version='1.2.0', | ||
author='K8sCat', | ||
author_email='[email protected]', | ||
description='auto Forward eMails with custom Rules', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url='https://github.com/k8scat/ForMaiR', | ||
packages=setuptools.find_packages(), | ||
entry_points={'console_scripts': ['formair = formair.formair:main']}, | ||
install_requires=['PyYaml'], | ||
) |