-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from schemen/devel
Version 0.6.0
- Loading branch information
Showing
14 changed files
with
374 additions
and
37 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 |
---|---|---|
|
@@ -11,3 +11,5 @@ kindlegen.exe | |
venv | ||
main.db | ||
log/* | ||
docker-compose.yml | ||
Dockerfile |
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 |
---|---|---|
|
@@ -14,12 +14,23 @@ M2em let's you automatically download Mangas via RSS Feed that updates at a conf | |
## Supported Websites | ||
|
||
* Mangastream | ||
* MangaFox | ||
* MangaFox (With Splash Rendering container) | ||
* Cdmnet | ||
|
||
# Setup | ||
|
||
M2em requires Python3 and I highly recommend working in a virtualenv. Some OS require the python-dev package! | ||
M2em requires Python3 and I highly recommend working in a virtualenv and if you want to use Mangasources which are JavaScript heavy, I actually recommend to use docker to deploy the m2em binary and the rendering service together. Some OS require the python-dev package! | ||
|
||
## Docker Setup | ||
You can use the Dockerfile or the image schemen/m2em. All options in the config.ini are available as environment variable. Make sure you write the exactly the same! | ||
|
||
Have a look at the example Compose file in the repository. This will deploy two containers, m2em and splash. Splash is to render websites which use javascript. The alias (which you can add to your bashrc if you want) allows you to directly call the containerized application | ||
|
||
``` | ||
docker-compose up -d | ||
alias m2em='sudo docker exec -it m2em_m2em_1 ./m2em.py' | ||
m2em -h | ||
``` | ||
|
||
## Create and install virtual environment | ||
```x-sh | ||
|
@@ -45,23 +56,6 @@ deactivate | |
|
||
Get Kindlegen here: https://www.amazon.com/gp/feature.html?docId=1000765211 | ||
|
||
## Docker Setup | ||
You can use the Dockerfile or the image schemen/m2em. All options in the config.ini are available as environment variable. Make sure you write the exactly the same! | ||
|
||
Example Compose file: | ||
``` | ||
version: '2' | ||
services: | ||
m2em: | ||
image: schemen/m2em:latest | ||
environment: | ||
- SMTPServer=mail.example.com | ||
- [email protected] | ||
- EmailAddressPw=verysecurepassword | ||
volumes: | ||
- <DATA_DIRECTORY>:/usr/src/app/data | ||
``` | ||
|
||
## Concept | ||
As a concept, M2em has different workers that run in a loop. All Chapter/user data is saved in a SQLite3 Database. | ||
|
@@ -155,6 +149,11 @@ optional arguments: | |
--daemon Run as daemon | ||
-d, --debug Debug Mode | ||
-v, --version show program's version number and exit | ||
-f "filter_regex", --filter "filter_regex" | ||
Adds a filter(python regex format), to filter the | ||
title of any manga parsed. Example: "(?i)one-punch" | ||
-fl, --filter-list Lists all filters | ||
``` | ||
|
||
|
@@ -185,6 +184,8 @@ EbookFormat = MOBI | |
# Ebook Profile setting, check | ||
# https://github.com/ciromattia/kcc for more information | ||
EbookProfile = KV | ||
# If you want to run splash intependently change this setting | ||
SplashServer = http://splash:8050 | ||
# Sender Email Server Settings | ||
SMTPServer = mail.example.com | ||
ServerPort = 587 | ||
|
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,23 @@ | ||
from peewee_migrate import Router | ||
from peewee import SqliteDatabase | ||
|
||
import bin.Config as Config | ||
|
||
|
||
# Load config right at the start | ||
config = Config.load_config() | ||
|
||
db = SqliteDatabase(config['Database']) | ||
|
||
def migrate(): | ||
router = Router(db) | ||
router.run() | ||
|
||
# Create migration | ||
#router.create('initial') | ||
|
||
# Run migration/migrations | ||
#router.run('initial') | ||
|
||
# Run all unapplied migrations | ||
|
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
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
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,17 @@ | ||
version: '2' | ||
services: | ||
m2em: | ||
image: schemen/m2em:latest | ||
environment: | ||
- SMTPServer=mail.example.com | ||
- [email protected] | ||
- EmailAddressPw=verysecurepassword | ||
volumes: | ||
- m2em:/usr/src/app/data | ||
|
||
splash: | ||
image: scrapinghub/splash | ||
command: --max-timeout 3600 | ||
|
||
volumes: | ||
m2em: |
Oops, something went wrong.