From 895d7a3d5f6f0cb76f2a2a76d50cddc4155e37c6 Mon Sep 17 00:00:00 2001 From: Anantha Natarajan Date: Mon, 9 Mar 2015 15:43:14 +0530 Subject: [PATCH] Changed summary, updated .rst --- README.md | 2 +- README.rst | 69 +++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 48 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index c1b872e..d13121f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ImageScraper :page_with_curl: ============ -A cool command line tool which downloads all images in the given webpage. +A cool command line tool which downloads images from the given webpage. | Build Status | Version | Downloads | | ------------ | ------- | ------------------- | diff --git a/README.rst b/README.rst index cb25db5..c40ddcf 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ -ImageScraper -============= +ImageScraper +============ -A cool command line tool which downloads all images in the given +A cool command line tool to download images in the given webpage. +------------------+--------------------+--------------------+ @@ -10,11 +10,23 @@ webpage. | |Build Status| | |Latest Version| | |PyPi downloads| | +------------------+--------------------+--------------------+ +Demo +^^^^ + +Click `here `__ to see it +in action! + Download -------- -pip install(recommended) -~~~~~~~~~~~~~~~~~~~~~~~~ +tar file: +~~~~~~~~~ + +Grab the latest stable build from **- Pip: +https://pypi.python.org/pypi/ImageScraper** + +pip install (recommended): +~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also download using pip: @@ -36,6 +48,13 @@ Usage $ image-scraper [OPTIONS] URL +You can also use it in your python scripts. + +.. code:: py + + import image_scraper + image_scraper.scrape_images(URL) + Options ------- @@ -43,9 +62,12 @@ Options -h, --help Print help -m, --max-images Maximum number images to be scraped - -s, --save-dir Name of the folder to save the images (default: ./images_) + -s, --save-dir Name of the folder to save the images + -g, --injected Scrape injected images + --formats [ [FORMATS ..]] Specify the formats of images to be scraped --max-filesize Limit on size of image in bytes (default: 100000000) --dump-urls Print the URLs of the images + --scrape-reverse Scrape the images in reverse order If you downloaded the tar: ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -54,38 +76,41 @@ Extract the contents of the tar file. .. code:: sh - $cd ImageScraper/ - $python setup.py install - $image-scraper --max-images 10 [url to scrape] + $ cd ImageScraper/ + $ python setup.py install + $ image-scraper --max-images 10 [url to scrape] -If installed using pip: -~~~~~~~~~~~~~~~~~~~~~~~ +Examples +-------- -Open python in terminal. +Scrape all images .. code:: sh - $image-scraper --max-images 10 [url to scrape] + $ image-scraper ananth.co.in/test.html -NOTE: -^^^^^ +Scrape at max 2 images -A new folder called "images\_" will be created in the same place, -containing all the downloaded images. +.. code:: sh -Upgrading ---------- + $ image-scraper -m 2 ananth.co.in/test.html -Check if a newer version if available and upgrade using: +Scrape only gifs and download to folder ./mygifs .. code:: sh - $ sudo pip install ImageScraper --upgrade + $ image-scraper -s mygifs ananth.co.in/test.html --formats gif + +NOTE: +^^^^^ + +By default, a new folder called "images\_" will be created in the +working directory, containing all the downloaded images. .. |Build Status| image:: https://travis-ci.org/sananth12/ImageScraper.svg?branch=master :target: https://travis-ci.org/sananth12/ImageScraper .. |Latest Version| image:: https://pypip.in/v/ImageScraper/badge.png :target: https://pypi.python.org/pypi/ImageScraper/ -.. |PyPi downloads| image:: http://img.shields.io/badge/downloads-7k%20total-blue.svg +.. |PyPi downloads| image:: http://img.shields.io/badge/downloads-7.5k%20total-blue.svg :target: https://pypi.python.org/pypi/ImageScraper