-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c49f09f
Showing
18 changed files
with
646 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TrafficLimits is a plugin for the Deluge bittorrent client | ||
(http://deluge-torrent.org/). | ||
|
||
It will pause all torrents if more than a set amount of data is uploaded | ||
or downloaded. | ||
|
||
TrafficLimits can be found at http://github.com/mavit/deluge-trafficlimits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* Add documentation. | ||
* Add a user interface. | ||
* Make more robust. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Metadata-Version: 1.0 | ||
Name: TrafficLimits | ||
Version: 0.1 | ||
Summary: Restrict the maximum total upload/download during certain time periods. | ||
Home-page: http://github.com/mavit/deluge-trafficlimits | ||
Author: Peter Oliver | ||
Author-email: [email protected] | ||
License: GPLv3 | ||
Description: Restrict the maximum total upload/download during certain time periods. | ||
Platform: UNKNOWN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
README | ||
setup.py | ||
TrafficLimits.egg-info/PKG-INFO | ||
TrafficLimits.egg-info/SOURCES.txt | ||
TrafficLimits.egg-info/dependency_links.txt | ||
TrafficLimits.egg-info/entry_points.txt | ||
TrafficLimits.egg-info/top_level.txt | ||
trafficlimits/__init__.py | ||
trafficlimits/common.py | ||
trafficlimits/core.py | ||
trafficlimits/gtkui.py | ||
trafficlimits/webui.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
[deluge.plugin.core] | ||
TrafficLimits = trafficlimits:CorePlugin | ||
[deluge.plugin.gtkui] | ||
TrafficLimits = trafficlimits:GtkUIPlugin | ||
[deluge.plugin.web] | ||
TrafficLimits = trafficlimits:WebUIPlugin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
trafficlimits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
cd /home/mavit/src/trafficlimits | ||
mkdir temp | ||
export PYTHONPATH=./temp | ||
python setup.py build develop --install-dir ./temp | ||
cp ./temp/TrafficLimits.egg-link /home/mavit/.config/deluge/plugins | ||
rm -fr ./temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# | ||
# setup.py | ||
# | ||
# Copyright (C) 2009 Peter Oliver <[email protected]> | ||
# | ||
# Basic plugin template created by: | ||
# Copyright (C) 2008 Martijn Voncken <[email protected]> | ||
# Copyright (C) 2007-2009 Andrew Resch <[email protected]> | ||
# Copyright (C) 2009 Damien Churchill <[email protected]> | ||
# | ||
# Deluge is free software. | ||
# | ||
# You may redistribute it and/or modify it under the terms of the | ||
# GNU General Public License, as published by the Free Software | ||
# Foundation; either version 3 of the License, or (at your option) | ||
# any later version. | ||
# | ||
# deluge is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# See the GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with deluge. If not, write to: | ||
# The Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor | ||
# Boston, MA 02110-1301, USA. | ||
# | ||
# In addition, as a special exception, the copyright holders give | ||
# permission to link the code of portions of this program with the OpenSSL | ||
# library. | ||
# You must obey the GNU General Public License in all respects for all of | ||
# the code used other than OpenSSL. If you modify file(s) with this | ||
# exception, you may extend this exception to your version of the file(s), | ||
# but you are not obligated to do so. If you do not wish to do so, delete | ||
# this exception statement from your version. If you delete this exception | ||
# statement from all source files in the program, then also delete it here. | ||
# | ||
|
||
from setuptools import setup | ||
|
||
__plugin_name__ = "TrafficLimits" | ||
__author__ = "Peter Oliver" | ||
__author_email__ = "[email protected]" | ||
__version__ = "0.1" | ||
__url__ = "http://github.com/mavit/deluge-trafficlimits" | ||
__license__ = "GPLv3" | ||
__description__ = "Restrict the maximum total upload/download during certain time periods." | ||
__long_description__ = """""" | ||
__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} | ||
|
||
setup( | ||
name=__plugin_name__, | ||
version=__version__, | ||
description=__description__, | ||
author=__author__, | ||
author_email=__author_email__, | ||
url=__url__, | ||
license=__license__, | ||
long_description=__long_description__ if __long_description__ else __description__, | ||
|
||
packages=[__plugin_name__.lower()], | ||
package_data = __pkg_data__, | ||
|
||
entry_points=""" | ||
[deluge.plugin.core] | ||
%s = %s:CorePlugin | ||
[deluge.plugin.gtkui] | ||
%s = %s:GtkUIPlugin | ||
[deluge.plugin.web] | ||
%s = %s:WebUIPlugin | ||
""" % ((__plugin_name__, __plugin_name__.lower())*3) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# __init__.py | ||
# | ||
# Copyright (C) 2009 Peter Oliver <[email protected]> | ||
# | ||
# Basic plugin template created by: | ||
# Copyright (C) 2008 Martijn Voncken <[email protected]> | ||
# Copyright (C) 2007-2009 Andrew Resch <[email protected]> | ||
# Copyright (C) 2009 Damien Churchill <[email protected]> | ||
# | ||
# Deluge is free software. | ||
# | ||
# You may redistribute it and/or modify it under the terms of the | ||
# GNU General Public License, as published by the Free Software | ||
# Foundation; either version 3 of the License, or (at your option) | ||
# any later version. | ||
# | ||
# deluge is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# See the GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with deluge. If not, write to: | ||
# The Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor | ||
# Boston, MA 02110-1301, USA. | ||
# | ||
# In addition, as a special exception, the copyright holders give | ||
# permission to link the code of portions of this program with the OpenSSL | ||
# library. | ||
# You must obey the GNU General Public License in all respects for all of | ||
# the code used other than OpenSSL. If you modify file(s) with this | ||
# exception, you may extend this exception to your version of the file(s), | ||
# but you are not obligated to do so. If you do not wish to do so, delete | ||
# this exception statement from your version. If you delete this exception | ||
# statement from all source files in the program, then also delete it here. | ||
# | ||
|
||
from deluge.plugins.init import PluginInitBase | ||
|
||
class CorePlugin(PluginInitBase): | ||
def __init__(self, plugin_name): | ||
from core import Core as _plugin_cls | ||
self._plugin_cls = _plugin_cls | ||
super(CorePlugin, self).__init__(plugin_name) | ||
|
||
class GtkUIPlugin(PluginInitBase): | ||
def __init__(self, plugin_name): | ||
from gtkui import GtkUI as _plugin_cls | ||
self._plugin_cls = _plugin_cls | ||
super(GtkUIPlugin, self).__init__(plugin_name) | ||
|
||
class WebUIPlugin(PluginInitBase): | ||
def __init__(self, plugin_name): | ||
from webui import WebUI as _plugin_cls | ||
self._plugin_cls = _plugin_cls | ||
super(WebUIPlugin, self).__init__(plugin_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# common.py | ||
# | ||
# Copyright (C) 2009 Peter Oliver <[email protected]> | ||
# | ||
# Basic plugin template created by: | ||
# Copyright (C) 2008 Martijn Voncken <[email protected]> | ||
# Copyright (C) 2007-2009 Andrew Resch <[email protected]> | ||
# Copyright (C) 2009 Damien Churchill <[email protected]> | ||
# | ||
# Deluge is free software. | ||
# | ||
# You may redistribute it and/or modify it under the terms of the | ||
# GNU General Public License, as published by the Free Software | ||
# Foundation; either version 3 of the License, or (at your option) | ||
# any later version. | ||
# | ||
# deluge is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# See the GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with deluge. If not, write to: | ||
# The Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor | ||
# Boston, MA 02110-1301, USA. | ||
# | ||
# In addition, as a special exception, the copyright holders give | ||
# permission to link the code of portions of this program with the OpenSSL | ||
# library. | ||
# You must obey the GNU General Public License in all respects for all of | ||
# the code used other than OpenSSL. If you modify file(s) with this | ||
# exception, you may extend this exception to your version of the file(s), | ||
# but you are not obligated to do so. If you do not wish to do so, delete | ||
# this exception statement from your version. If you delete this exception | ||
# statement from all source files in the program, then also delete it here. | ||
# | ||
|
||
def get_resource(filename): | ||
import pkg_resources, os | ||
return pkg_resources.resource_filename("trafficlimits", os.path.join("data", filename)) |
Oops, something went wrong.