Skip to content

Commit 22dfbf5

Browse files
committed
Initial PyPl requirements
1 parent 8a941d4 commit 22dfbf5

File tree

5 files changed

+71
-0
lines changed

5 files changed

+71
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__pycache__

LICENSE.txt

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

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# OneDrive downloader: python utility to download files from OneDrive
2+
3+
## Requires
4+
- `tqdm`: for nice progress bar
5+
- `requests`: pretty obvious
6+
- `zipfile`: for extracting zip files
7+
8+
## Usage
9+
`from onedrivedownloader import download`
10+
and
11+
`download(url: str, path: str = None, unzip=False, unzip_path: str = None, force_download=False, force_unzip=False, clean=False)`
12+
13+
Defaults are:
14+
- `path`: current path
15+
- `unzip`: don't unzip, just download
16+
- `unzip_path`: `path` + `_unzipped`
17+
- `force_download`: DON'T download if file already exists
18+
- `force_unzip`: DON'T unzip if file already exists
19+
- `clean`: DON'T delete unzipped files after unzipped
20+
21+
## Example
22+
`download("https://<stuff>.sharepoint.com/<path>?download=1", dest_path="files.zip", unzip=True, unzip_path="./data")`

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.md

setup.py

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from distutils.core import setup
2+
setup(
3+
name='onedrivedownloader',
4+
packages=['onedrivedownloader'],
5+
version='0.1',
6+
license='MIT',
7+
description='Python utility to download files through OneDrive',
8+
author='Lorenzo Bonicelli',
9+
author_email='[email protected]',
10+
url='https://github.com/loribonna/onedrivedownloader',
11+
# I explain this later on
12+
download_url='',
13+
keywords=['onedrive', 'downloader', 'python'],
14+
install_requires=[ # I get to this in a second
15+
'validators',
16+
'beautifulsoup4',
17+
],
18+
classifiers=[
19+
'Development Status :: 3 - Alpha',
20+
'Intended Audience :: Developers',
21+
'Topic :: Software Development :: Build Tools',
22+
'License :: OSI Approved :: MIT License',
23+
'Programming Language :: Python :: 3',
24+
'Programming Language :: Python :: 3.7',
25+
'Programming Language :: Python :: 3.8',
26+
],
27+
)

0 commit comments

Comments
 (0)