@@ -46,7 +46,29 @@ As a concept, M2em has different workers that run in a loop. All Chapter/user da
4646* Converter - Converting images into ebooks
4747* Sender - Compiling & Sending Emails to users and marking them as SENT
4848
49- With the sourceparser you can add support of a Webhost.
49+
50+ ### The Loop Run & Daemon Loop Run
51+ If you start m2em in loop mode (with or without --daemon) it will only consider any action with elements that that are
52+ younger than 24h hours.
53+
54+ The use of that is having it running on the server 24/7, waiting for updates from the feeds and ONLY handling said updates.
55+
56+ ### Direct action
57+ You can start a part of the loop without the restriction of 24h. Use the -a (--action) command with either element you wish to start.
58+
59+ Example: if you wish to download all chapters you have saved in your database, you start the download action.
60+ ```
61+ ./m2em.py --action downloader
62+ ```
63+ ### Chapter action
64+ You can directly apply an action to one chapter with the options --download, --convert or --send. You need to pass
65+ the ID of said chapter, you can find that out with "-Lc" or "-lc".
66+ You can pass multiple IDs.
67+ Example:
68+ ```
69+ ./m2em.py --download 100 #Downloads chapter with ID 100
70+ ```
71+
5072
5173## Supported Websites
5274* Mangastream
@@ -56,27 +78,42 @@ With the sourceparser you can add support of a Webhost.
5678
5779### Help output:
5880```
59- usage: m2em.py [-h] [-r RSS_FEED] [-u] [-l] [-L] [--list-feeds] [--list-users]
60- [-cd] [-s SWITCH_SEND] [-S SWITCH_CHAPTER] [-dc DELETE_CHAPTER]
61- [-du DELETE_USER] [-df DELETE_FEED] [--daemon] [-d]
81+ usage: m2em.py [-h] [-af ADD_FEED] [-au] [-lc] [-Lc] [-lf] [-lu] [-cd] [-s]
82+ [--send [SEND [SEND ...]]] [--convert [CONVERT [CONVERT ...]]]
83+ [--download [DOWNLOAD [DOWNLOAD ...]]] [-a ACTION]
84+ [-ss SWITCH_SEND] [-sc SWITCH_CHAPTER] [-dc DELETE_CHAPTER]
85+ [-du DELETE_USER] [-df DELETE_FEED] [--daemon] [-d] [-v]
6286
6387Manga to eManga - m2em
6488
6589optional arguments:
6690 -h, --help show this help message and exit
67- -r RSS_FEED , --rss -feed RSS_FEED
91+ -af ADD_FEED , --add -feed ADD_FEED
6892 Add RSS Feed of Manga. Only Mangastream & MangaFox are
6993 supported
70- -u , --add-user Adds new user
71- -l , --list-chapters Lists the last 10 Chapters
72- -L , --list-chapters-all
94+ -au , --add-user Adds new user
95+ -lc , --list-chapters Lists the last 10 Chapters
96+ -Lc , --list-chapters-all
7397 Lists all Chapters
74- -- list-feeds Lists all feeds
75- -- list-users Lists all Users
98+ -lf, -- list-feeds Lists all feeds
99+ -lu, -- list-users Lists all Users
76100 -cd, --create-db Creates DB. Uses Configfile for Naming
77- -s SWITCH_SEND, --switch-send SWITCH_SEND
101+ -s, --start Starts one loop
102+ --send [SEND [SEND ...]]
103+ Sends Chapter directly by chapter ID. Multiple IDs can
104+ be given
105+ --convert [CONVERT [CONVERT ...]]
106+ Converts Chapter directly by chapter ID. Multiple IDs
107+ can be given
108+ --download [DOWNLOAD [DOWNLOAD ...]]
109+ Downloads Chapter directly by chapter ID. Multiple IDs
110+ can be given
111+ -a ACTION, --action ACTION
112+ Start action. Options are: rssparser (collecting feed
113+ data), downloader, converter or sender
114+ -ss SWITCH_SEND, --switch-send SWITCH_SEND
78115 Pass ID of User. Switches said user Send eBook status
79- -S SWITCH_CHAPTER, --switch-chapter SWITCH_CHAPTER
116+ -sc SWITCH_CHAPTER, --switch-chapter SWITCH_CHAPTER
80117 Pass ID of Chapter. Switches said Chapter Sent status
81118 -dc DELETE_CHAPTER, --delete-chapter DELETE_CHAPTER
82119 Pass ID of Chapter. Deletes said Chapter
@@ -86,13 +123,15 @@ optional arguments:
86123 Pass ID of Feed. Deletes said Feed
87124 --daemon Run as daemon
88125 -d, --debug Debug Mode
126+ -v, --version show program's version number and exit
127+
89128```
90129
91130## Initial Data
92131To have a working environment you need to add some initial data and create the database
93132``` x-sh
94133./m2em.py --create-db # Create a DB
95- ./m2em.py --rss -feed <URL> # Add an RSS Feed you want to pull
134+ ./m2em.py --add -feed <URL> # Add an RSS Feed you want to pull
96135# Please note that you should set the sending AFTER a complete run for now
97136./m2em.py --add-user # Add a user
98137
@@ -127,10 +166,19 @@ ServerStartSSL = True
127166
128167To start a single run through the workers, you can simply execute the main program:
129168```
130- ./m2em.py
169+ ./m2em.py -s
170+ ```
171+
172+ If you wish to run the program as a daemon, start it with the option "--daemon" as well. It will re-run at the config "Sleep" in second.
173+ ```
174+ ./m2em.py -s --daemon
175+ ```
176+
177+ If you wish to disable/enable sending status of a user, use the -ss command
178+ ```
179+ ./m2em.py -ss <USERID>
131180```
132181
133- If you wish to run the program as a daemon, start it with the option "--daemon". It will re-run at the config "Sleep" in second.
134182
135183
136184### A complete run with nothing happening:
@@ -152,7 +200,6 @@ Finished sending ebooks!
152200Everything else should be self-explanatory with the "-h" option.
153201
154202## Known Issues
155- * There is a huge data load in the beginning. It is recommended to only activate sending of Emails after one complete run
156203* MangaFox has issues with SSL Verification on some systems. For now, Simply add the http feed.
157204
158205Please Open an issue if you find anything!
0 commit comments