fugitech / txoffer Goto Github PK
View Code? Open in Web Editor NEWA Twisted-Python version of iroffer
A Twisted-Python version of iroffer
Add an optional function to prepend whatever text to the output txoffer gives.
For example:
[Weeaboo] Pack #35 added: [sage] Gundam Build Fighters - 07 [720p][10bit][70E61591].mkv - Get it with "/msg Weeaboo XDCC SEND 35"
with an prepend text thing you could make it output some shit in the beginning like:
[Weeaboo] Fucking Weeaboos. - Pack #35 added: [sage] Gundam Build Fighters - 07 [720p][10bit][70E61591].mkv - Get it with "/msg Weeaboo XDCC SEND 35"
Also allow it to do bolding somehow.
Ideally something similar to what iroffer-dinoex has, where every x amount of seconds, the current packlist will be polled against what actually exists and remove any packs that don't actually exist and adjust the pack numbering accordingly without dropping any current connections on both IRC and HTTP. Maybe this could be done at the same time the autoadd portion runs to simultaneously adjust pack numbering for adding new files to the top while dropping the old pack numbering down to adjust for the missing files? At the very least remove the entries so there aren't old packs displayed in packlists (http://weeaboo.aoi-chan.com for example shouldn't have any packs listed before pack 1264, at least at the time of writing, except for a few things that haven't been purged yet).
By default txoffer will attempt to bind to all IPs available on the nic, as you can image, if you try to use port 80, it tries to use every IPs port 80, and this is a problem on systems with multiple IPs with httpds on them.
Can reproduce and provide logs if required.
An off/on switch for the webserver and the related pack announcement section with the DDL url might be useful for funi wrath and etc.
If you add a channel with a key to the join list and specify the key with a space after the channel name it will properly join the channel, however it will on next pack announce simply repeat the channel key in the channel with the key. I'm not sure if it will announce the key out to other channels, didn't test that.
Can reproduce and provide logs if required.
It appears that txoffer crashes while adding new files, In this case, the file was "[HorribleSubs] Nagi no Asukara - 08 [480p].mkv". Restarting txoffer allows it to add, however.
2013-11-21 11:08:11-0500 [-] Exception in thread Thread-2:
2013-11-21 11:08:11-0500 [-] Traceback (most recent call last):
2013-11-21 11:08:11-0500 [-] File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner
2013-11-21 11:08:11-0500 [-] self.run()
2013-11-21 11:08:11-0500 [-] File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/api.py", line 191, in run
2013-11-21 11:08:11-0500 [-] self.queue_events(self.timeout)
2013-11-21 11:08:11-0500 [-] File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/inotify.py", line 772, in queue_events
2013-11-21 11:08:11-0500 [-] for sub_event in event.sub_moved_events():
2013-11-21 11:08:11-0500 [-] File "/usr/local/lib/python2.7/dist-packages/watchdog/events.py", line 327, in sub_moved_events
2013-11-21 11:08:11-0500 [-] _walker=_walker))
2013-11-21 11:08:11-0500 [-] File "/usr/local/lib/python2.7/dist-packages/watchdog/events.py", line 610, in _generate_sub_moved_events_for
2013-11-21 11:08:11-0500 [-] src_dir_path = absolute_path(src_dir_path)
2013-11-21 11:08:11-0500 [-] File "/usr/local/lib/python2.7/dist-packages/pathtools/path.py", line 183, in absolute_path
2013-11-21 11:08:11-0500 [-] return os.path.abspath(os.path.normpath(path))
2013-11-21 11:08:11-0500 [-] File "/usr/lib/python2.7/posixpath.py", line 327, in normpath
2013-11-21 11:08:11-0500 [-] initial_slashes = path.startswith('/')
2013-11-21 11:08:11-0500 [-] AttributeError: 'NoneType' object has no attribute 'startswith'
2013-11-21 11:08:11-0500 [-]
If you move a folder into the watch dir while txoffer is running it will break future watch dir pack listing and announcing, even for single files, until you kill and restart it. It will properly add the packs to the listing if you add them before starting txoffer, however it will not announce any of them, so a bit useless.
Can reproduce and provide the log file if required.
Using Firefox 22.0 (I know, old), but it doesn't appear to filter the packlist. This can be checked with the Levi packlist @ http://levi.aoi-chan.com:8080.
As the description says, here's the exception error:
Failed to load application: invalid syntax (txoffer.yaml, line 1)
weeaboo@tori:~/txoffer$ twistd -y txoffer.py
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 657, in run
runApp(config)
File "/usr/local/lib/python2.7/dist-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/scripts/twistd.py", line 23, in runApp
_SomeApplicationRunner(config).run()
File "/usr/local/lib/python2.7/dist-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 389, in run
self.application = self.createOrGetApplication()
File "/usr/local/lib/python2.7/dist-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 454, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- ---
File "/usr/local/lib/python2.7/dist-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 465, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/usr/local/lib/python2.7/dist-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/application/service.py", line 403, in loadApplication
application = sob.loadValueFromFile(filename, 'application', passphrase)
File "/usr/local/lib/python2.7/dist-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/persisted/sob.py", line 210, in loadValueFromFile
exec fileObj in d, d
File "txoffer.py", line 1273, in
Master().setServiceParent(application)
File "txoffer.py", line 826, in init
self.validateConfig(self.config)
File "txoffer.py", line 1065, in validateConfig
raise ConfigException("irc nickname must be a string")
builtin.ConfigException: irc nickname must be a string
Failed to load application: irc nickname must be a string
weeaboo@tori:~/txoffer$
Using username "root".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.