Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 89980d9

Browse files
committed
Revamp of structure for pip installation
1 parent 12161ff commit 89980d9

File tree

6 files changed

+54
-14
lines changed

6 files changed

+54
-14
lines changed

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,29 @@
22
Downloads comics from various websites and creates cbz files from them.
33
Currently supports just readcomics.tv
44

5-
## Requirements
6-
The script is written in python3. It requires the following packages:
5+
## Installation
6+
7+
### Via pip
8+
To install the comic scrapper, simply type this into your terminal (sudo might be necessary):
9+
```
10+
pip install comic-scrapper
11+
```
12+
13+
### Via pip (local)
14+
Clone a copy of the repository using the following command:
15+
```
16+
git clone [email protected]:AbstractGeek/comic-scrapper.git
17+
```
18+
19+
Open your terminal into the folder and type this into it (sudo might be necessary):
20+
```
21+
pip install .
22+
```
23+
24+
### Manual Installation
25+
26+
#### Requirements
27+
The script is written in python. It requires the following packages:
728
1. BeautifulSoup4
829
2. requests
930
3. futures (concurrent.futures)
@@ -12,6 +33,7 @@ These can simply be installed by:
1233
```
1334
pip install -r requirements.txt
1435
```
36+
That's it. Use comic_scrapper.py to download comics
1537

1638
## Usage
1739
Find your comic of interest in readcomics.tv. Copy the url of the comic page.
@@ -20,23 +42,17 @@ http://www.readcomics.tv/comic/spider-man-2016
2042

2143
To download all the chapters of the comic, simply call the script and input the url.
2244
```
23-
python comic-scrapper http://www.readcomics.tv/comic/spider-man-2016
45+
comic-scrapper http://www.readcomics.tv/comic/spider-man-2016
2446
```
2547

2648
If you want to set a custom location, add -l and input the location
2749
```
28-
python comic-scrapper -l ~/Comics/ http://www.readcomics.tv/comic/spider-man-2016
50+
comic-scrapper -l ~/Comics/ http://www.readcomics.tv/comic/spider-man-2016
2951
```
3052

3153
If you want to download a select few chapters, add -c and input the chapter numbers.
3254
For example, if I want to download chapters 10-20, I use the following command
3355
```
34-
python comic-scrapper -l ~/Comics/ -c 10:20 http://www.readcomics.tv/comic/spider-man-2016
56+
comic-scrapper -l ~/Comics/ -c 10:20 http://www.readcomics.tv/comic/spider-man-2016
3557
```
3658
Note: Only individual chapters or sequential chunks (start:stop) can currently be downloaded.
37-
38-
You can also make the comic-scrapper script an executable and call it directly
39-
```
40-
chmod +x comic-scrapper
41-
./comic-scrapper -l ~/Comics/ http://www.readcomics.tv/comic/spider-man-2016
42-
```

comic_scrapper/__init__.py

Whitespace-only changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python
22
import argparse
33
import bs4 as bsoup
44
import requests
@@ -115,7 +115,7 @@ def main():
115115
raise SyntaxError("Chapter inputs should be separated by ':'")
116116
exit()
117117
else:
118-
keys = chapters.keys
118+
keys = chapters.keys()
119119

120120
# Download chapters
121121
if 'readcomics.tv' in url:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
beautifulsoup4
22
futures
3-
requests
3+
requests==2.9.1

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.md

setup.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from setuptools import setup
2+
3+
setup(name='comic_scrapper',
4+
version='0.1',
5+
description='Scraps comics and creates cbz files',
6+
url='https://github.com/AbstractGeek/comic-scrapper',
7+
download_url='https://github.com/AbstractGeek/comic-scrapper',
8+
author='Dinesh Natesan',
9+
author_email='[email protected]',
10+
license='MIT',
11+
packages=['comic_scrapper'],
12+
install_requires=[
13+
'beautifulsoup4',
14+
'futures',
15+
'requests==2.9.1'
16+
],
17+
entry_points={
18+
'console_scripts':
19+
['comic-scrapper=comic_scrapper.comic_scrapper:main'],
20+
},
21+
include_package_data=True,
22+
zip_safe=False)

0 commit comments

Comments
 (0)