Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing wrong filename written to md5 hash file #22

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Question!

How many of use Windows vs. Linux to run this software? I have an idea to accommodate the CAPTCHA and make the downloader more interactive, but I don't have the expertise to create it on Linux -- thus will only do it if you guys are using Windows.

Please let me know at [email protected] which OS you use and if you'd be interested.

# hb-downloader
[![Coverage Status](https://coveralls.io/repos/github/MayeulC/hb-downloader/badge.svg)](https://coveralls.io/github/MayeulC/hb-downloader)
[![Build Status](https://travis-ci.org/MayeulC/hb-downloader.svg)](https://travis-ci.org/MayeulC/hb-downloader)
Expand Down
20 changes: 13 additions & 7 deletions hb-downloader.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logger
from config_data import ConfigData
from configuration import Configuration
from event_handler import EventHandler
from humble_api.humble_api import HumbleApi
from actions import Action
import hb_downloader.logger as logger
from hb_downloader.config_data import ConfigData
from hb_downloader.configuration import Configuration
from hb_downloader.event_handler import EventHandler
from hb_downloader.humble_api.humble_api import HumbleApi
from hb_downloader.actions import Action

__author__ = "Brian Schkerke"
__copyright__ = "Copyright 2016 Brian Schkerke"
Expand All @@ -19,7 +19,13 @@
print("")

# Load the configuration from the YAML file...
Configuration.load_configuration("hb-downloader-settings.yaml")
try:
Configuration.load_configuration("/etc/hb_downloader.yaml")
except FileNotFoundError:
print("Configuration File not found in /etc")
print("Trying local instead...")
Configuration.load_configuration("hb-downloader-settings.yaml")

Configuration.parse_command_line()
Configuration.dump_configuration()
Configuration.push_configuration()
Expand Down
Empty file added hb_downloader/__init__.py
Empty file.
8 changes: 4 additions & 4 deletions actions.py → hb_downloader/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

__license__ = "MIT"

from humble_download import HumbleDownload
from progress_tracker import ProgressTracker
from config_data import ConfigData
import logger
from hb_downloader.humble_download import HumbleDownload
from hb_downloader.progress_tracker import ProgressTracker
from hb_downloader.config_data import ConfigData
from hb_downloader import logger


class Action:
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions configuration.py → hb_downloader/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import argparse
import os
import yaml
import logger
from config_data import ConfigData
from humble_api.humble_hash import HumbleHash
from hb_downloader import logger
from hb_downloader.config_data import ConfigData
from hb_downloader.humble_api.humble_hash import HumbleHash

__author__ = "Brian Schkerke"
__copyright__ = "Copyright 2016 Brian Schkerke"
Expand Down
4 changes: 2 additions & 2 deletions event_handler.py → hb_downloader/event_handler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import logger
from humble_api.events import Events
from hb_downloader import logger
from hb_downloader.humble_api.events import Events

__author__ = "Brian Schkerke"
__copyright__ = "Copyright 2016 Brian Schkerke"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def write_md5file(full_filename, checksum):
return

md5full_filename = HumbleHash.md5filename(full_filename)
local_filename = os.path.basename(md5full_filename)
local_filename = os.path.basename(full_filename)

if os.path.exists(md5full_filename):
os.remove(md5full_filename)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions humble_download.py → hb_downloader/humble_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
import os
import requests
from config_data import ConfigData
from humble_api.events import Events
from humble_api.humble_hash import HumbleHash
from hb_downloader.config_data import ConfigData
from hb_downloader.humble_api.events import Events
from hb_downloader.humble_api.humble_hash import HumbleHash

__author__ = "Brian Schkerke"
__copyright__ = "Copyright 2016 Brian Schkerke"
Expand Down
2 changes: 1 addition & 1 deletion logger.py → hb_downloader/logger.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from config_data import ConfigData
from hb_downloader.config_data import ConfigData
import time
import sys

Expand Down
2 changes: 1 addition & 1 deletion progress_tracker.py → hb_downloader/progress_tracker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logger
from hb_downloader import logger

__author__ = "Brian Schkerke"
__copyright__ = "Copyright 2016 Brian Schkerke"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import sys
import subprocess
from config_data import ConfigData
from configuration import Configuration
from hb_downloader.config_data import ConfigData
from hb_downloader.configuration import Configuration

actions = ["download", "list"]

Expand Down
17 changes: 17 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from setuptools import setup

setup(name='hb_downloader',
version='0.5.0',
description='an unofficial api client for humblebundle',
url='https://github.com/MayeulC/hb-downloader/releases',
author='Brian Schkerke',
license='MIT',
packages=[
'hb_downloader',
'hb_downloader.humble_api',
'hb_downloader.humble_api.model',
'hb_downloader.humble_api.exceptions'
],
test_suite='nose.collector',
tests_require=['nose'],
zip_safe=False)