trackma 0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Trackma-0.8.dist-info/DESCRIPTION.rst +3 -0
- Trackma-0.8.dist-info/METADATA +30 -0
- Trackma-0.8.dist-info/RECORD +54 -0
- Trackma-0.8.dist-info/WHEEL +5 -0
- Trackma-0.8.dist-info/entry_points.txt +9 -0
- Trackma-0.8.dist-info/metadata.json +1 -0
- Trackma-0.8.dist-info/top_level.txt +1 -0
- trackma/__init__.py +0 -0
- trackma/accounts.py +145 -0
- trackma/data/anilist.jpg +0 -0
- trackma/data/icon.png +0 -0
- trackma/data/kitsu.png +0 -0
- trackma/data/mal.jpg +0 -0
- trackma/data/shikimori.jpg +0 -0
- trackma/data/vndb.jpg +0 -0
- trackma/data.py +620 -0
- trackma/engine.py +1031 -0
- trackma/extras/AnimeInfoExtractor.py +317 -0
- trackma/extras/__init__.py +1 -0
- trackma/lib/__init__.py +0 -0
- trackma/lib/lib.py +162 -0
- trackma/lib/libanilist.py +519 -0
- trackma/lib/libkitsu.py +518 -0
- trackma/lib/libmal.py +711 -0
- trackma/lib/libshikimori.py +340 -0
- trackma/lib/libvndb.py +387 -0
- trackma/messenger.py +42 -0
- trackma/tracker/__init__.py +0 -0
- trackma/tracker/inotify.py +73 -0
- trackma/tracker/inotifyBase.py +107 -0
- trackma/tracker/plex.py +144 -0
- trackma/tracker/polling.py +57 -0
- trackma/tracker/pyinotify.py +95 -0
- trackma/tracker/tracker.py +224 -0
- trackma/tracker/win32.py +74 -0
- trackma/ui/__init__.py +0 -0
- trackma/ui/cli.py +1046 -0
- trackma/ui/curses.py +1180 -0
- trackma/ui/gtkui.py +2897 -0
- trackma/ui/qt/__init__.py +85 -0
- trackma/ui/qt/accounts.py +301 -0
- trackma/ui/qt/add.py +200 -0
- trackma/ui/qt/delegates.py +115 -0
- trackma/ui/qt/details.py +39 -0
- trackma/ui/qt/mainwindow.py +1487 -0
- trackma/ui/qt/models.py +132 -0
- trackma/ui/qt/qt4ui.py +25 -0
- trackma/ui/qt/settings.py +641 -0
- trackma/ui/qt/themedcolorpicker.py +67 -0
- trackma/ui/qt/thumbs.py +63 -0
- trackma/ui/qt/util.py +45 -0
- trackma/ui/qt/widgets.py +408 -0
- trackma/ui/qt/workers.py +349 -0
- trackma/utils.py +447 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.0
|
|
2
|
+
Name: Trackma
|
|
3
|
+
Version: 0.8
|
|
4
|
+
Summary: Open multi-site list manager
|
|
5
|
+
Home-page: https://github.com/z411/trackma
|
|
6
|
+
Author: z411
|
|
7
|
+
Author-email: z411@krutt.org
|
|
8
|
+
License: GPL-3
|
|
9
|
+
Keywords: list manager,curses,gtk,qt,myanimelist,hummingbird,vndb
|
|
10
|
+
Platform: UNKNOWN
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: Topic :: Internet
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.4
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
17
|
+
Classifier: Operating System :: POSIX
|
|
18
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
19
|
+
Provides-Extra: GTK
|
|
20
|
+
Provides-Extra: Qt
|
|
21
|
+
Provides-Extra: curses
|
|
22
|
+
Provides-Extra: GTK
|
|
23
|
+
Requires-Dist: pygobject; extra == 'GTK'
|
|
24
|
+
Provides-Extra: Qt
|
|
25
|
+
Provides-Extra: curses
|
|
26
|
+
Requires-Dist: urwid; extra == 'curses'
|
|
27
|
+
|
|
28
|
+
UNKNOWN
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Trackma-0.8.dist-info/DESCRIPTION.rst,sha256=OCTuuN6LcWulhHS3d5rfjdsQtW22n7HENFRh6jC6ego,10
|
|
2
|
+
Trackma-0.8.dist-info/METADATA,sha256=T9wbinuNJziYcSi4CzE4B1lT58_FubQoSGj2hmOPeqA,875
|
|
3
|
+
Trackma-0.8.dist-info/RECORD,,
|
|
4
|
+
Trackma-0.8.dist-info/WHEEL,sha256=8Lm45v9gcYRm70DrgFGVe4WsUtUMi1_0Tso1hqPGMjA,92
|
|
5
|
+
Trackma-0.8.dist-info/entry_points.txt,sha256=6Hg_uGp6KbmeYOyY7Ufma1qG_IRx6PLPPNC9_ZiDay8,236
|
|
6
|
+
Trackma-0.8.dist-info/metadata.json,sha256=WvvshysDP6fVcckyxw4ln7veRCxkwx5BtYh8Hw6tzl0,1516
|
|
7
|
+
Trackma-0.8.dist-info/top_level.txt,sha256=d-etPUdcL3za26FAuIUC7kAx7SYP3PbPkV7pa2eB5Y4,8
|
|
8
|
+
trackma/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
trackma/accounts.py,sha256=MnzyvEEco_u6ClJk6bhKwhsMSOc_GCiYevlG1KCSIns,4303
|
|
10
|
+
trackma/data.py,sha256=I9JyO1i9_rpdedqF6zYt0MJCGyBYGh846MqwCWyQ-Vo,21393
|
|
11
|
+
trackma/engine.py,sha256=RjaZZX6FDTbNt7Yu1IfKlWL0BklbeuEN-8NIrUdvflA,41032
|
|
12
|
+
trackma/messenger.py,sha256=ePeLFCxIAlckp0pfaOHzEBmmAT6GEHmUFoZGt85DIWY,1271
|
|
13
|
+
trackma/utils.py,sha256=HLDUPWIFrvpA6ys8he_mejxxu81Ie6NTBg2z_0Oc-AU,13227
|
|
14
|
+
trackma/data/anilist.jpg,sha256=gQwk7TODSXcf3akEmBuHgdN6jr5uV7w-lU_TYsnxEfo,793
|
|
15
|
+
trackma/data/icon.png,sha256=qHNOfL-ll8P4iJi5hFDsRBOWKySHtKxZ4jUnNqzZVI8,8294
|
|
16
|
+
trackma/data/kitsu.png,sha256=UWfDpcLLXfTHlcon47EfMDCz8JSg9b0CErIPCU0v0ks,488
|
|
17
|
+
trackma/data/mal.jpg,sha256=IK4robF25MWqhWKYQcesTyP51Ke5EgP7-h-QFsO6Uus,3580
|
|
18
|
+
trackma/data/shikimori.jpg,sha256=zHqeukJZ9y7ocQBhmJ-XoaV9wQWkCnP54h-bM4hclLQ,470
|
|
19
|
+
trackma/data/vndb.jpg,sha256=p1y8vFKRIdN2h6WvBQEC7uJ8-6M6aAdPsEFs3ZPr3Go,504
|
|
20
|
+
trackma/extras/AnimeInfoExtractor.py,sha256=6fBuGi-6IBaTcXI2DD1cQhFicktkJcFkKCm944JOll8,14326
|
|
21
|
+
trackma/extras/__init__.py,sha256=pwfUvlfmiWeLzwB6MTDzdZWjOIPacbDp02z8Cn6-tE0,65
|
|
22
|
+
trackma/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
+
trackma/lib/lib.py,sha256=uLUzZuCKj9gY87PSpQPNV8csnM4R9rWvxui7mzi2ksU,5384
|
|
24
|
+
trackma/lib/libanilist.py,sha256=G93z-ZVEQf3iU0HtZciP4UEei5oFeznHXrTTwSaAvp0,18430
|
|
25
|
+
trackma/lib/libkitsu.py,sha256=-QQezXBGeUcOL0IfcK317Euec5HKAaY0EqvtuKQBzAo,18039
|
|
26
|
+
trackma/lib/libmal.py,sha256=Ab9WO11l6QnRK0uPDa0DnRYsd0oOVbLPAn0kBgzUgew,27001
|
|
27
|
+
trackma/lib/libshikimori.py,sha256=7MrtPT8nciOGiRQGikB82aTBjQeVhnypbdzAEQUmdJs,11630
|
|
28
|
+
trackma/lib/libvndb.py,sha256=-3SoNCJG7QD9nZ0X4sppl8VZNb7z016XgA5f35U7-l0,12448
|
|
29
|
+
trackma/tracker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
+
trackma/tracker/inotify.py,sha256=e1lqVCBqpNa0ETcU-GOeg94iNFEgvZxEPF3GG0iYGG0,3280
|
|
31
|
+
trackma/tracker/inotifyBase.py,sha256=x0xm7M_Ylkyxmtz3Rd7LzAnY6g8ObUpu5p9yjs7Z7VI,4095
|
|
32
|
+
trackma/tracker/plex.py,sha256=oWa1TMlp8pdvuNbDjnxTg4Q7kfwwOzHWGjLLFdom0nk,5236
|
|
33
|
+
trackma/tracker/polling.py,sha256=tETRNnBuY6nF8qOyFHzj3xQCBFz5wECJLASOum_xFJU,2178
|
|
34
|
+
trackma/tracker/pyinotify.py,sha256=n54HPxRF-P1bpcyyxrTbgaIaVDmdVLcbz5CuEy95nRI,3923
|
|
35
|
+
trackma/tracker/tracker.py,sha256=VpRfMXD1mQbyIB5gp31NABh0pn6VyXqCe7FzUjSOq80,8778
|
|
36
|
+
trackma/tracker/win32.py,sha256=PLU8ElD9esLTtrjbcZCmuuUWOkrFQ-hgbr6y4_LyRcU,3037
|
|
37
|
+
trackma/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
+
trackma/ui/cli.py,sha256=D_PDiTOhuS6vgGhMonhC7wrkcZzyE_KZ2LFIdx-yGMs,35587
|
|
39
|
+
trackma/ui/curses.py,sha256=QjX1-93UwE0Jjw0Xnh8Idy71AUaNdBzTutvrtc9iYKY,40781
|
|
40
|
+
trackma/ui/gtkui.py,sha256=RB-mo9gYVMstZltTh5sNRcHRDclWmEKybwIolSpq1EQ,113797
|
|
41
|
+
trackma/ui/qt/__init__.py,sha256=0JhccaLd9DNu0x4ple2VeGHL8SmlSK8RsQP-zb2jKy4,2384
|
|
42
|
+
trackma/ui/qt/accounts.py,sha256=TSiMBRFKF3uxy0JTh_awmm-OHxorO-iWnoCVY-zBivg,11190
|
|
43
|
+
trackma/ui/qt/add.py,sha256=saXD07spHlXW8NjWtICSWvfWmn9NfFJOx7wijOh7JNQ,7448
|
|
44
|
+
trackma/ui/qt/delegates.py,sha256=P-NRgdnap1LYObmtYFeBFKQAht7CZ2_uLPtCWJ3UIVg,3821
|
|
45
|
+
trackma/ui/qt/details.py,sha256=JSvKhUGLzl0sJsazYrV1WutZPlKFUMIGq8qM4Fr00a8,1407
|
|
46
|
+
trackma/ui/qt/mainwindow.py,sha256=_gZqppRf84i2718zZhYHwsft3z-doaz5dzHgMnaNtsM,62888
|
|
47
|
+
trackma/ui/qt/models.py,sha256=mRbRVx1S5bJYVjf4O94HTJQmaS4XoU8kvSaoYq2MjC0,4166
|
|
48
|
+
trackma/ui/qt/qt4ui.py,sha256=LY6co4yifWFxITjSLOmE1XPD3kNYQXPfuzzq9veFl5A,806
|
|
49
|
+
trackma/ui/qt/settings.py,sha256=tvB93ramoY0_r-_Uxt_23VXcttB09ZWave14mhHmntw,30407
|
|
50
|
+
trackma/ui/qt/themedcolorpicker.py,sha256=mWgGwSwSS9ATZxIAJfpkqnE7FXf_fb3fkOgTOVf3jnQ,2566
|
|
51
|
+
trackma/ui/qt/thumbs.py,sha256=1LVrh5F35M89IY-GhrH-NvLNA8vcI2N2f3Vl8m-FMTs,2070
|
|
52
|
+
trackma/ui/qt/util.py,sha256=1BeAFw1natUDcJoG_KXv4kKQOrm1pnpiac1VM2XvHaY,1555
|
|
53
|
+
trackma/ui/qt/widgets.py,sha256=Z2Kl7PihwHKF4Xqwc5QAnDYcFtktsDEq6ppQWAJPj5U,14983
|
|
54
|
+
trackma/ui/qt/workers.py,sha256=ftSvlQjtw09bGFKI-g7PwrOMykaomnATFz-Fqpy6huk,10577
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"classifiers": ["Development Status :: 3 - Alpha", "Intended Audience :: End Users/Desktop", "Topic :: Internet", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Operating System :: POSIX", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)"], "extensions": {"python.commands": {"wrap_console": {"trackma": "trackma.ui.cli:main", "trackma-curses": "trackma.ui.curses:main [curses]"}, "wrap_gui": {"trackma-gtk": "trackma.ui.gtkui:main [gtk]", "trackma-qt": "trackma.ui.qt:main [qt]", "trackma-qt4": "trackma.ui.qt.qt4ui:main [qt]"}}, "python.details": {"contacts": [{"email": "z411@krutt.org", "name": "z411", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/z411/trackma"}}, "python.exports": {"console_scripts": {"trackma": "trackma.ui.cli:main", "trackma-curses": "trackma.ui.curses:main [curses]"}, "gui_scripts": {"trackma-gtk": "trackma.ui.gtkui:main [gtk]", "trackma-qt": "trackma.ui.qt:main [qt]", "trackma-qt4": "trackma.ui.qt.qt4ui:main [qt]"}}}, "extras": ["GTK", "Qt", "curses"], "generator": "bdist_wheel (0.30.0)", "keywords": ["list", "manager", "curses", "gtk", "qt", "myanimelist", "hummingbird", "vndb"], "license": "GPL-3", "metadata_version": "2.0", "name": "Trackma", "run_requires": [{"extra": "GTK", "requires": ["pygobject"]}, {"extra": "curses", "requires": ["urwid"]}], "summary": "Open multi-site list manager", "version": "0.8"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
trackma
|
trackma/__init__.py
ADDED
|
File without changes
|
trackma/accounts.py
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import pickle
|
|
2
|
+
from trackma import utils
|
|
3
|
+
|
|
4
|
+
class AccountManager():
|
|
5
|
+
"""
|
|
6
|
+
This is the account manager.
|
|
7
|
+
|
|
8
|
+
It provides a generic way for the user interface to query for the
|
|
9
|
+
available registered accounts, and add or delete accounts.
|
|
10
|
+
|
|
11
|
+
This class returns an Account Dictionary used by
|
|
12
|
+
the :class:`Engine` to start.
|
|
13
|
+
"""
|
|
14
|
+
accounts = {'default': None, 'next': 1, 'accounts': dict()}
|
|
15
|
+
|
|
16
|
+
def __init__(self):
|
|
17
|
+
utils.make_dir(utils.to_config_path())
|
|
18
|
+
self.filename = utils.to_config_path('accounts.dict')
|
|
19
|
+
self._load()
|
|
20
|
+
|
|
21
|
+
def _load(self):
|
|
22
|
+
if utils.file_exists(self.filename):
|
|
23
|
+
with open(self.filename, 'rb') as f:
|
|
24
|
+
self.accounts = pickle.load(f)
|
|
25
|
+
|
|
26
|
+
def _save(self):
|
|
27
|
+
is_new = not utils.file_exists(self.filename)
|
|
28
|
+
with open(self.filename, 'wb') as f:
|
|
29
|
+
if is_new:
|
|
30
|
+
utils.change_permissions(self.filename, 0o600)
|
|
31
|
+
pickle.dump(self.accounts, f, protocol=2)
|
|
32
|
+
|
|
33
|
+
def add_account(self, username, password, api):
|
|
34
|
+
"""
|
|
35
|
+
Registers a new account with the specified
|
|
36
|
+
*username*, *password*, and *api*.
|
|
37
|
+
|
|
38
|
+
The *api* must be one of the available APIs
|
|
39
|
+
found in the utils.available_libs dict.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
available_libs = utils.available_libs.keys()
|
|
43
|
+
|
|
44
|
+
if not username:
|
|
45
|
+
raise utils.AccountError('Empty username.')
|
|
46
|
+
if not password:
|
|
47
|
+
raise utils.AccountError('Empty password.')
|
|
48
|
+
if api not in available_libs:
|
|
49
|
+
raise utils.AccountError('That API doesn\'t exist.')
|
|
50
|
+
|
|
51
|
+
account = {'username': username,
|
|
52
|
+
'password': password,
|
|
53
|
+
'api': api,
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
nextnum = self.accounts['next']
|
|
57
|
+
self.accounts['accounts'][nextnum] = account
|
|
58
|
+
self.accounts['next'] += 1
|
|
59
|
+
self._save()
|
|
60
|
+
|
|
61
|
+
def edit_account(self, num, username, password, api, friends=[]):
|
|
62
|
+
"""
|
|
63
|
+
Updates data for account *num* with the specified
|
|
64
|
+
*username*, *password*, and *api*.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
available_libs = utils.available_libs.keys()
|
|
68
|
+
|
|
69
|
+
if not username:
|
|
70
|
+
raise utils.AccountError('Empty username.')
|
|
71
|
+
if not password:
|
|
72
|
+
raise utils.AccountError('Empty password.')
|
|
73
|
+
if api not in available_libs:
|
|
74
|
+
raise utils.AccountError('That API doesn\'t exist.')
|
|
75
|
+
|
|
76
|
+
account = {'username': username,
|
|
77
|
+
'password': password,
|
|
78
|
+
'api': api,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
self.accounts['accounts'][num].update(account)
|
|
82
|
+
self._save()
|
|
83
|
+
|
|
84
|
+
def delete_account(self, num):
|
|
85
|
+
"""
|
|
86
|
+
Deletes the account number **num**.
|
|
87
|
+
"""
|
|
88
|
+
self.accounts['default'] = None
|
|
89
|
+
del self.accounts['accounts'][num]
|
|
90
|
+
|
|
91
|
+
# Reset index if there are no accounts left
|
|
92
|
+
if not self.accounts['accounts']:
|
|
93
|
+
self.accounts['next'] = 1
|
|
94
|
+
|
|
95
|
+
self._save()
|
|
96
|
+
|
|
97
|
+
def purge_account(self, num):
|
|
98
|
+
"""
|
|
99
|
+
Renames stale cache files for account number **num**.
|
|
100
|
+
"""
|
|
101
|
+
account = self.accounts['accounts'][num]
|
|
102
|
+
userfolder = utils.to_data_path("%s.%s" % (account['username'], account['api']))
|
|
103
|
+
utils.make_dir(userfolder + '.old')
|
|
104
|
+
utils.regex_rename_files('(.*.queue)|(.*.info)|(.*.list)|(.*.meta)', userfolder, userfolder + '.old')
|
|
105
|
+
|
|
106
|
+
def get_account(self, num):
|
|
107
|
+
"""
|
|
108
|
+
Returns the account dict **num**.
|
|
109
|
+
"""
|
|
110
|
+
return self.accounts['accounts'][num]
|
|
111
|
+
|
|
112
|
+
def get_accounts(self):
|
|
113
|
+
"""
|
|
114
|
+
Returns an iterator of available accounts.
|
|
115
|
+
"""
|
|
116
|
+
return self.accounts['accounts'].items()
|
|
117
|
+
|
|
118
|
+
def get_default(self):
|
|
119
|
+
"""
|
|
120
|
+
Returns the default account number, if set.
|
|
121
|
+
Otherwise returns None.
|
|
122
|
+
"""
|
|
123
|
+
num = self.accounts['default']
|
|
124
|
+
if num is not None:
|
|
125
|
+
try:
|
|
126
|
+
return self.accounts['accounts'][num]
|
|
127
|
+
except KeyError:
|
|
128
|
+
return None
|
|
129
|
+
else:
|
|
130
|
+
return None
|
|
131
|
+
|
|
132
|
+
def set_default(self, val):
|
|
133
|
+
"""
|
|
134
|
+
Sets a new default account number.
|
|
135
|
+
"""
|
|
136
|
+
self.accounts['default'] = val
|
|
137
|
+
self._save()
|
|
138
|
+
|
|
139
|
+
def unset_default(self):
|
|
140
|
+
"""
|
|
141
|
+
Unsets the default account number.
|
|
142
|
+
"""
|
|
143
|
+
self.accounts['default'] = None
|
|
144
|
+
|
|
145
|
+
|
trackma/data/anilist.jpg
ADDED
|
Binary file
|
trackma/data/icon.png
ADDED
|
Binary file
|
trackma/data/kitsu.png
ADDED
|
Binary file
|
trackma/data/mal.jpg
ADDED
|
Binary file
|
|
Binary file
|
trackma/data/vndb.jpg
ADDED
|
Binary file
|