Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tushar-rishav/g4g-dl
:file_folder: Download all tutorials from Geeks4Geeks
https://github.com/tushar-rishav/g4g-dl
Last synced: about 2 months ago
JSON representation
:file_folder: Download all tutorials from Geeks4Geeks
- Host: GitHub
- URL: https://github.com/tushar-rishav/g4g-dl
- Owner: tushar-rishav
- License: gpl-3.0
- Created: 2015-10-29T18:05:16.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-02T14:14:21.000Z (about 9 years ago)
- Last Synced: 2024-10-13T09:47:54.485Z (3 months ago)
- Language: Python
- Homepage:
- Size: 156 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## g4g-dl :bookmark:
###### Downloads all Geeks for Geeks Algo and Data Structures tutorials and save as PDFNote: I wrote this script because my friend [Pragyaditya das](https://github.com/Jeet1994) needed it. I ain't sure if it's legal to scrape Geeks4Geeks. In future if I come across any such policies, I shall remove this repo without any hesitation.
### Installation
###### Dependency to be installed manually
[wkhtmltopdf](https://github.com/wkhtmltopdf/wkhtmltopdf)##### Build from source
```sh
git clone "https://github.com/tushar-rishav/g4g-dl.git"
cd g4g-dl
python setup.py install
```###Default config:
target : g4gPdf### Options
```sh
usage: g4g-dl [-h] [-t TARGET] [-p POST] [-d] [-a] [-s START] [-e END]Downloads Geeks for Geeks DS and Algorithm tutorials and save as PDF
optional arguments:
-h, --help show this help message and exit
-t TARGET, --target TARGET
absolute path of target directory to save all PDFs.
Default is g4gPdf in current dir
-p POST, --post POST link for single post
-s START, --start START
Position to start from. Default is 0
-e END, --end END Position to end at. Default is the last linkgroup:
-d, --ds Fetch all Data Structures
-a, --algo Fetch all AlgorithmsAuthor:https://github.com/tushar-rishav
```
### Usage
##### Fetch single post
To fetch single tutorial, say Topological Sorting, run this in your shell
```shg4g-dl -p http://www.geeksforgeeks.org/topological-sorting/
```
Note:
1. The above command will save the pdf in default directory
2. You must specify `-d` (for data structure) or `-a` (for algo) if you aren't fetching tutorials this way.##### Fetch all data structure tutorial in your custom directory
```sh
g4g-dl -t my_directory_abs_path -d```
##### Fetch tutorials in range in your custom directory```sh
g4g-dl -t my_directory_abs_path -d -s 63 -e 69```
Note: The order is according to which links appear in page. Above command will fetch some graphs turorials which exist between between 63rd and 69th positions (both inclusive). This way you can download selected tutorials. Go ahead and try downloading just Dynamic Programming tutorials.##### Get help
```sh
g4g-dl -h```
### Contributions
Have an idea to make it better? Go ahead! I will be happy to see a pull request from you! :blush:### License
![gpl](https://cloud.githubusercontent.com/assets/7397433/9025904/67008062-3936-11e5-8803-e5b164a0dfc0.png)