Skip to content

Commit f4e8696

Browse files
author
X
committed
comic-dl
1 parent 3514a60 commit f4e8696

File tree

13 files changed

+846
-3
lines changed

13 files changed

+846
-3
lines changed

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: python
2+
python:
3+
- "2.6"
4+
- "2.7"
5+
- "3.2"
6+
- "3.3"
7+
- "3.4"
8+
- "3.5"
9+
- "3.5-dev" # 3.5 development branch
10+
- "3.6-dev" # 3.6 development branch
11+
- "nightly" # currently points to 3.7-dev
12+
# command to install dependencies
13+
install: "pip install -r requirements.txt"
14+
# command to run tests
15+
script: nosetests
16+
notifications:
17+
email:
18+

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#Changelog

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
The MIT License (MIT)
3+
4+
Copyright (c) 2013-2016 Blackrock Digital LLC.
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

ReadMe.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# Comic-DL
2+
3+
Comic-dl is a command line tool to download Comics and Manga from various Manga and Comic sites easily.
4+
5+
> Don't overuse this script. Support the developers of those websites by disabling your adblock on their site.
6+
>Advertisments pay for the website servers.
7+
8+
> WINDOWS BINARY COMING SOON!
9+
10+
### Table of Content
11+
12+
* [Supported Sites]()
13+
* [Dependencies Installation]()
14+
* [Linux/Debian]()
15+
* [Windows]()
16+
* [Mac OS X]()
17+
* [Installation]()
18+
* [Windows Binary]()
19+
* [List of Arguments]()
20+
* [Usage]()
21+
* [Windows]()
22+
* [Linux/Debian]()
23+
* [Features]()
24+
* [Changelog]()
25+
* [Opening An Issue/Requesting A Site]()
26+
* [Reporting Issues]()
27+
* [Suggesting A Feature]()
28+
29+
## Supported Websites
30+
You can check the list of supported websites [**`HERE`**](https://github.com/Xonshiz/comic-dl/blob/master/Supported_Sites.md).
31+
32+
## Dependencies Installation
33+
This script can run on multiple Operating Systems. So, if you're using the `python` script instead of the `windows binary` of this script, then you'll need to get things ready first. Follow the instructions mentioned below, according to your OS.
34+
35+
### Linux/Debian :
36+
Since most (if not all) Linux/Debian OS come with python pre-installed, you don't have to install python manually. Make sure you're using python >= 2.7.x though.
37+
38+
We need `pip` to install any external dependenc(ies). So, open any terminal and type in `pip list` and if it shows some data, then it is fine. But, if it shows error, like `pip not found` or something along this line, then you need to install `pip`. Just type this command in terminal :
39+
40+
> `sudo apt-get install python-pip`
41+
42+
If you're on Fedora, CentOS/RHEL, openSUSE, Arch Linux, then you simply need to follow [`THIS TUTORIAL`](https://packaging.python.org/install_requirements_linux/) to install `pip`.
43+
44+
If this still doesn't work, then you'll manually need to install pip. Doing so is an easy one time job and you can follow [`THHIS TUTORIAL`](https://pip.pypa.io/en/stable/installing/) to do so.
45+
46+
### Windows :
47+
If you're on windows, then it is recommended to download the [`windows binary`](#) for this script. If you use the windows binary, you don't need to install anything. But, if for some weird reason you want to use Python script instead, then follow these steps :
48+
49+
* Install Python > 2.7.6. Download the desired installer from [here](https://www.python.org/downloads/).
50+
* [Add it in the system path](http://superuser.com/questions/143119/how-to-add-python-to-the-windows-path) (if not already added).
51+
* If you're using python >2.7.9, you don't need to install `PIP`. However, if you don't have pip installed and added in windows path, then do so by following [this little tutorial](http://stackoverflow.com/a/12476379).
52+
* Download [this `text`]() file and put it in some directory/folder.
53+
* Open Command Prompt and browse to the directory where you downloaded your requiremenets.txt file and run this command :
54+
```
55+
pip install -r requirements.txt
56+
```
57+
* It should install the required external libraries.
58+
59+
Well, if everything came up good without any error(s), then you're good to go!
60+
61+
### Mac OS X :
62+
Mac OS X users will have to fetch their version of `Python` and `Pip`.
63+
* Python installation guide : http://docs.python-guide.org/en/latest/starting/install/osx/
64+
* Pip installation guide : http://stackoverflow.com/questions/17271319/installing-pip-on-mac-os-x
65+
66+
After downloading and installing these, you need to add PIP & Python in your path. Follow [`THIS LITTLE GUIDE`](http://www.pyladies.com/blog/Get-Your-Mac-Ready-for-Python-Programming/) to install both, Python & pip successfully.
67+
68+
## Installation
69+
After installing and setting up all the dependencies in your Operating System, you're good to go and use this script.
70+
The instructions for all the OS would remain same. Download [`THIS REPOSITORY`]() and put it somewhere in your system.
71+
72+
**Windows users**, it's better to not place it places where it requires administrator privileges. Good example would be `C:\Windows`. This goes for both, the Python script and the windows binary file (.exe).
73+
74+
**Linux/Debian** users make sure that this script is executable.just run this command, if you run into problem(s) :
75+
76+
> `chmod +x comic-dl.py`
77+
78+
and then, execute with this :
79+
80+
> `./comic-dl.py`
81+
82+
## Windows Binary
83+
It is recommended that windows users use this binary to save both, your head and time from installing all the dependencies. You can download the binary and start using the script right off the bat. Grab the respective binaries from the links below :
84+
* `x86 Systems` : [COMING SOON](#)
85+
* `x64 Systems` : [COMING SOON](#)
86+
87+
## List of Arguments
88+
Currently, the script supports these arguments :
89+
```
90+
-h, --help Prints the basic help menu of the script and exits.
91+
-i,--input Defines the input link to the comic/manga.
92+
-V,--version Prints the VERSION and exits.
93+
-a,--about Prints ABOUT and USAGE of the script and exits.
94+
```
95+
96+
## Usage
97+
With this script, you have to pass arguments in order to be able to download anything. Passing arguments in a script is pretty easy. Since the script is pretty basic, it doesn't have too many arguments. Go check the [`ARGUMENTS SECTION`] to know more about which arguments the script offers.
98+
99+
Follow the instructions according to your OS :
100+
101+
### Windows
102+
After you've saved this script in a directory/folder, you need to open `command prompt` and browse to that directory and then execute the script. Let's do it step by step :
103+
* Open the folder where you've downloaded the files of this repository.
104+
* Hold down the **`SHIFT`** key and while holding down the SHIFT key, **`RIGHT CLICK`** and select `Open Command Prompy Here` from the options that show up.
105+
* Now, in the command prompt, type this :
106+
107+
*If you're using the windows binary :*
108+
>>> `comic-dl.exe -i <URL TO THE COMIC>`
109+
110+
*If you're using the Python Script :*
111+
>>> `comic-dl.py -i <URL TO THE COMIC>`
112+
113+
URL can be any URL of the [supported websites]().
114+
115+
### Linux/Debian
116+
After you've saved this script in a directory/folder, you need to open `command prompt` and browse to that directory and then execute the script. Let's do it step by step :
117+
* Open a terminal, `Ctrl + Alt + T` is the shortcut to do so (if you didn't know).
118+
* Now, change the current working directory of the terminal to the one where you've downloaded this repository.
119+
* Now, in the Terminal, type this :
120+
121+
>>> `comic-dl.py -i <URL TO THE COMIC>`
122+
123+
URL can be any URL of the [supported websites]().
124+
125+
## Features
126+
This is a very basic and small sript, so at the moment it only have a few features.
127+
* Downloads a Single Chapter and puts in a directory with the comic name, volume and chapter.
128+
* Downloads all the chapters available for a series.
129+
* Skip if the file has already been downloaded.
130+
* Show human readable error(s) in most places.
131+
132+
## Changelog
133+
You can check the changelog [**`HERE`**](https://github.com/Xonshiz/comic-dl/blob/master/Changelog.md).
134+
135+
## Opening An Issue/Requesting A Site
136+
If your're planning to open an issue for the script or ask for a new feature or anything that requires opening an Issue, then please do keep these things in mind.
137+
138+
### Reporting Issues
139+
If you're about to report some issue with the script, the please do include these things :
140+
* The command your entered. Yes, with the URL
141+
* The output of that command. You can simply copy the text from the terminal/command prompt and paste it. Make sure you put that output inside `` (tilde).
142+
* Your Operating System and python version.
143+
144+
### Suggesting A Feature
145+
If you're here to make suggestions, please follow the basic syntax to post a request :
146+
147+
**Subject** : Something that briefly tells us about the feature.
148+
149+
**Long Explanation** : Describe in details what you want and how you want.
150+
151+
This should be enough, but it'll be great if you can add more ;)

Supported_Sites.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#List of Supported Websites
22

3-
* [Mangafox]
4-
* [YoManga]
5-
* [GoManga]
3+
* [Mangafox](http://mangafox.me/)
4+
* [YoManga](http://yomanga.co/)
5+
* [GoManga](http://gomanga.co/)

comic_dl/comic-dl.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
from honcho import url_checker
5+
import os
6+
import sys
7+
import argparse
8+
from version import __version__
9+
10+
def version():
11+
print '\n'
12+
print '{:^80}'.format('Current Version : %s')%(__version__)
13+
print '\n'
14+
print '{:^80}'.format("More info : comic-dl -h")
15+
sys.exit()
16+
17+
def usage():
18+
print '\n'
19+
print '{:^80}'.format('################################################')
20+
print '{:^80}'.format('Comic-DL Usage')
21+
print '{:^80}'.format('################################################\n')
22+
print '\n'
23+
print '{:^80}'.format('Author : Xonshiz | Version : %s')%(__version__)
24+
print '{:^80}'.format('-------------------------------------------------\n')
25+
print "Comic-dl is a command line tool to download manga and comics from various comic and manga sites."
26+
print "Using the script is pretty simple and should be easy for anyone familiar with a command line/shell."
27+
print '\n'
28+
print '{:^80}'.format("USAGE : comic-dl -i <URL to comic>")
29+
print '\n'
30+
print "Check Supported websites : https://github.com/Xonshiz/comic-dl/blob/master/Supported_Sites.md ",'\n'
31+
print "Available Arguments : "
32+
print '{:^80}'.format("-i,--input : Specifies the Input URL")
33+
print '{:^80}'.format("-h : Prints this help menu")
34+
print '{:^80}'.format("--version : Prints the current version and exits")
35+
print '{:^80}'.format("-a,--about : Shows the info about this script and exits.")
36+
sys.exit()
37+
38+
def main(argv):
39+
current_directory = str(os.getcwd())
40+
parser = argparse.ArgumentParser(description='Comic-dl is a command line tool to download manga and comics from various comic and manga sites.')
41+
parser.add_argument('--version',action='store_true',help='Shows version and exits' )
42+
parser.add_argument('-i','--input',nargs=1,help='Inputs the URL to comic',default='--version')
43+
parser.add_argument('-a','--about',action='store_true',help='Shows the info regarding this script' )
44+
45+
46+
args = parser.parse_args()
47+
48+
if args.version:
49+
version()
50+
sys.exit()
51+
52+
if args.input:
53+
#print args.input
54+
input_url = str(args.input[0]).strip()
55+
url_checker(input_url,current_directory)
56+
sys.exit()
57+
58+
if args.about:
59+
usage()
60+
61+
if __name__ == "__main__":
62+
main(sys.argv[1:])

comic_dl/honcho.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
5+
'''
6+
7+
This python module decides which URL should be assigned to which other module from the site package.
8+
9+
'''
10+
11+
12+
13+
from sites.yomanga import yomanga_Url_Check
14+
from sites.gomanga import gomanga_Url_Check
15+
from sites.mangafox import mangafox_Url_Check
16+
import os
17+
import urllib2
18+
19+
20+
21+
22+
def url_checker(input_url,current_directory):
23+
24+
domain = urllib2.urlparse.urlparse(input_url).netloc
25+
26+
if domain in ['mangafox.me']:
27+
mangafox_Url_Check(input_url,current_directory)
28+
pass
29+
elif domain in ['yomanga.co']:
30+
yomanga_Url_Check(input_url,current_directory)
31+
pass
32+
elif domain in ['gomanga.co']:
33+
gomanga_Url_Check(input_url,current_directory)
34+
pass
35+
elif domain in ['']:
36+
print 'You need to specify at least 1 URL. Please run : comic-dl -h'
37+
else:
38+
print "%s is unsupported at the moment. Please request on Github repository."%(domain)

comic_dl/sites/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
5+
import mangafox
6+
import yomanga
7+
import gomanga

0 commit comments

Comments
 (0)