Skip to content

Commit

Permalink
feat: format elapsed time
Browse files Browse the repository at this point in the history
  • Loading branch information
CatchZeng committed Feb 24, 2021
1 parent 8d43867 commit ae21f98
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ BASEDIR = $(shell pwd)

.PHONY: build
build:
rm -rf dist/*
rm -rf dist/* bing_images.egg-info build
python3 -m build
testpypi:
python3 -m twine upload --repository testpypi dist/*
python3 -m twine upload -u __token__ --repository testpypi dist/*
pypi:
python3 -m twine upload dist/*
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ Python library to fetch image urls and download using multithreading from [Bing.

## Requires

```shell
python3 -m pip install requests
```

> requests>=2.24.0
- requests>=2.24.0

## Installation

```shell
python3 -m pip install bing-images
pip install bing-images
```

## Usage
Expand Down Expand Up @@ -97,5 +93,5 @@ Image #18 Downloaded
Image #9 Downloaded
Image #19 Downloaded
Done
Elapsed Time: 58.56829500198364
Elapsed Time: 58.56s
```
3 changes: 2 additions & 1 deletion bing_images/bing.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def download_images(
print("Image #{} Downloaded".format(index))

print("Done")
print(f"Elapsed Time: {timer() - start}")
elapsed = timer() - start
print("Elapsed Time: %.2fs" % elapsed)


def download_image_with_thread(entry):
Expand Down
6 changes: 2 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = bing_images
version = 0.0.1
version = 0.0.2
author = CatchZeng
author_email = [email protected]
description = Python library to fetch image urls and download using multithreading from Bing.com.
Expand All @@ -14,8 +14,6 @@ classifiers =

[options]
packages = find:
python_requires = >=3.6
python_requires = >=3
install_requires =
requests>=2.24.0
setup_requires =
requests>=2.24.0

0 comments on commit ae21f98

Please sign in to comment.