| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/calibre/calibre/gui2/store/ |
Upload File : |
#!/usr/bin/env python3
# License: GPLv3 Copyright: 2019, Kovid Goyal <kovid at kovidgoyal.net>
import json
from base64 import standard_b64encode
from itertools import count
counter = count()
class WebStoreDialog:
def __init__(
self, gui, base_url, parent=None, detail_url=None, create_browser=None
):
self.id = next(counter)
self.gui = gui
self.base_url = base_url
self.detail_url = detail_url
self.window_title = None
self.tags = None
def setWindowTitle(self, title):
self.window_title = title
def set_tags(self, tags):
self.tags = tags
def exec(self):
data = {
'base_url': self.base_url,
'detail_url': self.detail_url,
'window_title': self.window_title,
'tags': self.tags,
'id': self.id
}
data = json.dumps(data)
if not isinstance(data, bytes):
data = data.encode('utf-8')
data = standard_b64encode(data)
if isinstance(data, bytes):
data = data.decode('ascii')
args = ['store-dialog', data]
self.gui.job_manager.launch_gui_app(args[0], kwargs={'args': args})
exec_ = exec