403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.21
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/dialogs/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/calibre/calibre/gui2/dialogs/__pycache__/add_from_isbn.cpython-312.pyc
�

�f;���dZdZdZddlZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZddlmZddlmZmZmZGd	�d
e�Zy)zGPL v3z(2010, Kovid Goyal <kovid@kovidgoyal.net>zrestructuredtext en�N)�QApplication�	QCheckBox�QDialog�QDialogButtonBox�QHBoxLayout�QIcon�QLabel�	QLineEdit�QPlainTextEdit�QPushButton�Qt�QVBoxLayout)�	iswindows)�
check_isbn)�error_dialog�gprefs�question_dialogc�6�eZdZdd�Zd�Zd�Zed��Zd�Zy)�AddFromISBNNc��tj||�|j�trdnd}|jjt
|jj��|z�g|_g|_	g|_
y)Nz%C:\Users\kovid\e-books\some_book.epubz#/Users/kovid/e-books/some_book.epub)r�__init__�setup_uir�label�setText�str�text�isbns�books�set_tags)�self�parent�paths   �6/usr/lib/calibre/calibre/gui2/dialogs/add_from_isbn.pyrzAddFromISBN.__init__se������v�&��
�
��>G�:�5�	
��
�
���3�t�z�z���0�1�$�6�7���
���
���
�c� �|jdd�|jtd��|jt	j
d��t
|�x|_}t�x|_	}|j|�ttjjtjjz|�x|_}|j!tjj�j#td��|j%|�|j&j)|j*�|j,j)|j.�ft
�x|_}|j|�t3|�x|_}|j7t8j:j<�|j%|�t?td�|�x|_ }|j%|�|jBj)|jD�ft
�x|_#}|j|�tItd�|�x|_%}|j%|�|jMd�f|jOd	�tItd
�|�x|_(}|j%|�tS|�x|_*}|j#djWtYjZdg���|j]|�|j%|�t_td
�|�x|_0}|jctYjZdd��|j%|�|jed�y)Ni�i�zAdd books by ISBNzadd_book.pngz&OKz&Paste from clipboarda&<p>Enter a list of ISBNs in the box to the left, one per line. calibre will automatically create entries for books based on the ISBN and download metadata and covers for them.</p>
<p>Any invalid ISBNs in the list will be ignored.</p>
<p>You can also specify a file that will be added with each ISBN. To do this enter the full path to the file after a <code>&gt;&gt;</code>. For example:</p>
<p><code>9788842915232 &gt;&gt; %s</code></p><p>To use identifiers other than ISBN use key:value syntax, For example:</p>
<p><code>amazon:B001JK9C72</code></p>T�z%&Tags to set on created book entries:z, �add from ISBN tagsz5Check for books with the same ISBN already in library�add from ISBN dup checkF�
)3�resize�setWindowTitle�_�
setWindowIconr�icr�lr�h�	addLayoutr�StandardButton�Ok�Cancel�bb�buttonr�	addWidget�accepted�connect�accept�rejected�reject�llr�isbn_box�setFocusr
�FocusReason�OtherFocusReasonr�paste_button�clicked�paste�lllr	r�setWordWrap�
addSpacing�la2r
�add_tags�joinr�get�setBuddyr�_check_for_existing�
setChecked�
addStretch)	r r/r0r5�i�b�la�le�ces	         r#rzAddFromISBN.setup_ui!s������C������A�1�2�3����5�8�8�N�3�4� ��&�&���� �]�"����	���A��'�(8�(G�(G�(J�(J�K[�Kj�Kj�Kq�Kq�(q�sw�x�x���"�
�	�	�"�1�1�4�4�5�=�=�a��h�G�	���B�����,�,�T�[�[�9�2�;�;�;N�;N�t�{�{�;[�[�!�m�#���!�	���A��*�4�0�0��
��	�
�
�2�>�>�2�2�3�	���A�� +�A�.E�,F�� M�M���A�	���A���	�	�)�)�$�*�*�5�5�#�
�%���1�	���A�� ��
4�	"
��	�		��
�R�	
���B������-�-�	���R���q�!H�I�4�P�P���2�	���B��&�t�_�,��
��
�
�
�4�9�9�V�Z�Z�(<�b�A�B�C�
���B��	���B��(1�!�4k�2l�nr�(s�s�� �2�
�
�
�f�j�j�!:�E�B�C�	���B��	���R�r$c�H�tj�}|j�}t|j	��j�}|rUt|jj��j�}|dz|z}|jj|�yy)N�
)	r�instance�	clipboardrr�stripr>�toPlainText�setPlainText)r �args�app�c�txt�old�news       r#rDzAddFromISBN.pasteMs{���#�#�%���M�M�O���!�&�&�(�m�!�!�#����d�m�m�/�/�1�2�8�8�:�C���*�s�"�C��M�M�&�&�s�+�r$c�6�|jj�S�N)rM�	isChecked)r s r#�check_for_existingzAddFromISBN.check_for_existingVs���'�'�1�1�3�3r$c
�*�t|jj��j�j	d�}tt
d|D�cgc]}|j���c}��}|td<|jtd<||_	t�}t|jj��j�j�D�]�}|j�}|s�|j	d�}t|�dkDr|ddj|dd�zg}|D�cgc]}|j���}}|ds�td|dvr|dj!d�ddd�\}}nd	|d}}d}	t|�dkDrS|drNt#j$|dt"j&�r't"j(j+|d�r|d}	|d	k(r�t-|d�}
|
�\|
j/�}
|
|j0vs��8|j0j3|
�|j4j3|
|	d	d
����t|j7|d����|dk7s���|j4j3||d|	d|i����|r_|j4r2t9|t;d
�t;d�dj|�d��s"yt=|t;d�t;d�d��St?j@|g|���ycc}wcc}w)N�,r'r(z>>�r��:�isbn)rkr"�r"rlzSome invalid ISBNsz�Some of the ISBNs you entered were invalid. They will be ignored. Click "Show details" to see which ones. Do you want to proceed?rVT)�det_msg�show_copy_buttonzAll invalid ISBNsz>All the ISBNs you entered were invalid. No books can be added.)�show)!rrIrrY�split�list�filterrrer�setr>rZ�
splitlines�lenrJ�	partition�os�access�R_OKr"�isfiler�upperr�appendr�addrr,rrr:)r r\�tags�x�bad�line�parts�prefix�valr"rks           r#r:zAddFromISBN.acceptZs����4�=�=�%�%�'�(�.�.�0�6�6�s�;���F�4�T�!:��!�'�'�)�!:�;�<��'+��#�$�,0�,C�,C��(�)���
��e����
�
�1�1�3�4�:�:�<�G�G�I�	N�D��:�:�<�D����J�J�t�$�E��5�z�A�~��q��D�I�I�e�A�B�i�$8�8�9��(-�.�1�Q�W�W�Y�.�E�.���8���e�A�h��#�A�h�0�0��5�c��c�:����$�e�A�h����D��5�z�A�~�%��(�r�y�y��q��2�7�7�/K�PR�PW�PW�P^�P^�_d�ef�_g�Ph��Q�x�����!�%��(�+���#��:�:�<�D��4�:�:�-��
�
�)�)�$�/��
�
�)�)�4��6�*R�S��G�G�E�!�H�%��V�#��J�J�%�%�v�s�F�D�"�V�&L�M�;	N�<��z�z�&�t�Q�/C�-D��3�4�=A�Y�Y�s�^�%)�	+�
�#�D�!�,?�*@��-�.�48�:�:�	���t�#�d�#��_";��/s�L�3Lrc)	�__name__�
__module__�__qualname__rrrD�propertyrer:�r$r#rrs+��
�*�X,��4��4�1$r$r)�__license__�
__copyright__�
__docformat__rw�qt.corerrrrrrr	r
rrr
r�calibre.constantsr�calibre.ebooks.metadatar�calibre.gui2rrrrr�r$r#�<module>r�sI����:�
�%�
�	�����
(�.�>�>�x$�'�x$r$

Youez - 2016 - github.com/yon3zu
LinuXploit