mirror of
https://github.com/KevinMidboe/bulk-downloader-for-reddit.git
synced 2026-01-21 08:36:18 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ec4bb3008 | ||
|
|
0dbe2ed917 | ||
|
|
9f831e1b78 | ||
|
|
59012077e1 | ||
|
|
5e3c79160b | ||
|
|
1e8eaa1a8d | ||
|
|
7dbc83fdce |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
|
build/
|
||||||
|
dist/
|
||||||
|
MANIFEST
|
||||||
__pycache__/
|
__pycache__/
|
||||||
src/__pycache__/
|
src/__pycache__/
|
||||||
logs/
|
|
||||||
*.json
|
|
||||||
@@ -47,9 +47,13 @@ It should redirect to a page which shows your **imgur_client_id** and **imgur_cl
|
|||||||
However, there is a [great Chrome extension](https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk) for viewing Markdown files with its styling. Install it and open the files with [Chrome](https://www.google.com/intl/tr/chrome/).
|
However, there is a [great Chrome extension](https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk) for viewing Markdown files with its styling. Install it and open the files with [Chrome](https://www.google.com/intl/tr/chrome/).
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
### [12/07/2018](https://github.com/aliparlakci/bulk-downloader-for-reddit/tree/dd671fd7380d6b9bc7610df75e82b8a21c6eb4e9)
|
### [13/07/2018](https://github.com/aliparlakci/bulk-downloader-for-reddit/tree/9f831e1b784a770c82252e909462871401a05c11)
|
||||||
|
- Change config.json file's path to home directory
|
||||||
|
|
||||||
|
### [12/07/2018](https://github.com/aliparlakci/bulk-downloader-for-reddit/tree/50a77f6ba54c24f5647d5ea4e177400b71ff04a7)
|
||||||
- Added binaries for Windows and Linux
|
- Added binaries for Windows and Linux
|
||||||
- Wait on KeyboardInterrupt
|
- Wait on KeyboardInterrupt
|
||||||
|
- Accept multiple subreddit input
|
||||||
- Fixed the bug that prevents choosing "[0] exit" with typing "exit"
|
- Fixed the bug that prevents choosing "[0] exit" with typing "exit"
|
||||||
|
|
||||||
### [11/07/2018](https://github.com/aliparlakci/bulk-downloader-for-reddit/tree/a28a7776ab826dea2a8d93873a94cd46db3a339b)
|
### [11/07/2018](https://github.com/aliparlakci/bulk-downloader-for-reddit/tree/a28a7776ab826dea2a8d93873a94cd46db3a339b)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from src.tools import (GLOBAL, createLogFile, jsonFile, nameCorrector,
|
|||||||
|
|
||||||
__author__ = "Ali Parlakci"
|
__author__ = "Ali Parlakci"
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
__version__ = "1.1.1"
|
__version__ = "1.1.2"
|
||||||
__maintainer__ = "Ali Parlakci"
|
__maintainer__ = "Ali Parlakci"
|
||||||
__email__ = "parlakciali@gmail.com"
|
__email__ = "parlakciali@gmail.com"
|
||||||
|
|
||||||
@@ -609,8 +609,9 @@ def main():
|
|||||||
print(err)
|
print(err)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
GLOBAL.config = getConfig("config.json")
|
if not Path(GLOBAL.configDirectory).is_dir():
|
||||||
|
os.makedirs(GLOBAL.configDirectory)
|
||||||
|
GLOBAL.config = getConfig(GLOBAL.configDirectory / "config.json")
|
||||||
|
|
||||||
if GLOBAL.arguments.log is not None:
|
if GLOBAL.arguments.log is not None:
|
||||||
logDir = Path(GLOBAL.arguments.log)
|
logDir = Path(GLOBAL.arguments.log)
|
||||||
|
|||||||
50
setup.py
Normal file
50
setup.py
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#!C:\Users\Ali\AppData\Local\Programs\Python\Python36\python.exe
|
||||||
|
|
||||||
|
## python setup.py build
|
||||||
|
import sys
|
||||||
|
from cx_Freeze import setup, Executable
|
||||||
|
from script import __version__
|
||||||
|
|
||||||
|
options = {
|
||||||
|
"build_exe": {
|
||||||
|
"packages":[
|
||||||
|
"idna","imgurpython", "praw", "requests"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if sys.platform == "win32":
|
||||||
|
executables = [Executable(
|
||||||
|
"script.py",
|
||||||
|
targetName="bulk-downloader-for-reddit.exe",
|
||||||
|
shortcutName="Bulk Downloader for Reddit",
|
||||||
|
shortcutDir="DesktopFolder"
|
||||||
|
)]
|
||||||
|
|
||||||
|
elif sys.platform == "linux":
|
||||||
|
executables = [Executable(
|
||||||
|
"script.py",
|
||||||
|
targetName="bulk-downloader-for-reddit",
|
||||||
|
shortcutName="Bulk Downloader for Reddit",
|
||||||
|
shortcutDir="DesktopFolder"
|
||||||
|
)]
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name = "Bulk Downloader for Reddit",
|
||||||
|
version = __version__,
|
||||||
|
description = "Bulk Downloader for Reddit",
|
||||||
|
author = "Ali Parlakci",
|
||||||
|
author_email="parlakciali@gmail.com",
|
||||||
|
url="https://github.com/aliparlakci/bulk-downloader-for-reddit",
|
||||||
|
classifiers=(
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Environment :: Console",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
),
|
||||||
|
executables = executables,
|
||||||
|
options = options
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ def beginPraw(config,user_agent = str(socket.gethostname())):
|
|||||||
authorizedInstance = GetAuth(reddit,port).getRefreshToken(*scopes)
|
authorizedInstance = GetAuth(reddit,port).getRefreshToken(*scopes)
|
||||||
reddit = authorizedInstance[0]
|
reddit = authorizedInstance[0]
|
||||||
refresh_token = authorizedInstance[1]
|
refresh_token = authorizedInstance[1]
|
||||||
jsonFile("config.json").add({
|
jsonFile(GLOBAL.configDirectory / "config.json").add({
|
||||||
"reddit_refresh_token":refresh_token
|
"reddit_refresh_token":refresh_token
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
@@ -98,7 +98,7 @@ def beginPraw(config,user_agent = str(socket.gethostname())):
|
|||||||
authorizedInstance = GetAuth(reddit,port).getRefreshToken(*scopes)
|
authorizedInstance = GetAuth(reddit,port).getRefreshToken(*scopes)
|
||||||
reddit = authorizedInstance[0]
|
reddit = authorizedInstance[0]
|
||||||
refresh_token = authorizedInstance[1]
|
refresh_token = authorizedInstance[1]
|
||||||
jsonFile("config.json").add({
|
jsonFile(GLOBAL.configDirectory / "config.json").add({
|
||||||
"reddit_refresh_token":refresh_token
|
"reddit_refresh_token":refresh_token
|
||||||
})
|
})
|
||||||
return reddit
|
return reddit
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class GLOBAL:
|
|||||||
config = None
|
config = None
|
||||||
arguments = None
|
arguments = None
|
||||||
directory = None
|
directory = None
|
||||||
|
configDirectory = Path.home() / "Bulk Downloader for Reddit"
|
||||||
reddit_client_id = "BSyphDdxYZAgVQ"
|
reddit_client_id = "BSyphDdxYZAgVQ"
|
||||||
reddit_client_secret = "bfqNJaRh8NMh-9eAr-t4TRz-Blk"
|
reddit_client_secret = "bfqNJaRh8NMh-9eAr-t4TRz-Blk"
|
||||||
printVanilla = print
|
printVanilla = print
|
||||||
|
|||||||
Reference in New Issue
Block a user