diff --git a/README.md b/README.md index c71ca25..6eaa2a3 100644 --- a/README.md +++ b/README.md @@ -75,10 +75,12 @@ https://user-images.githubusercontent.com/21101839/124686751-39f3aa00-df06-11eb- - Set preferences - - Enable "Fetch X-Ray people descriptions from Wikipedia" option for nonfiction books and novels that have character pages on Wikipedia. A quote from the book will be used if it's disabled or the page is not found. + - Enable "Fetch X-Ray people descriptions from Wikipedia" option for nonfiction books and novels that have character pages on Wikipedia. A quote from the book will be used if it's disabled or the page is not found. - Larger spaCy model has higher [Named-entity recognition](https://en.wikipedia.org/wiki/Named-entity_recognition) precision therefore improves X-Ray quality, more details at https://spacy.io/models/en + - Enter a Fandom link to get X-Ray descriptions from Fandom, delete the link to search Wikipedia. + https://user-images.githubusercontent.com/21101839/124685798-90f87f80-df04-11eb-8eb6-dee012de6cab.mov - Connect Kindle to calibre, select one book or multiple books then click the plugin icon or menu. diff --git a/config.py b/config.py index d3cc6ee..c4f756c 100644 --- a/config.py +++ b/config.py @@ -30,19 +30,6 @@ def __init__(self): self.search_people_box.setChecked(prefs['search_people']) vl.addWidget(self.search_people_box) - fandom_hl = QHBoxLayout() - fandom_label = QLabel('Fandom URL') - fandom_hl.addWidget(fandom_label) - self.fandom_url = QLineEdit() - self.fandom_url.setText(prefs['fandom']) - self.fandom_url.setPlaceholderText('https://x.fandom.com') - fandom_re = QRegularExpression(r'https:\/\/\w+\.fandom\.com') - fandom_validator = QRegularExpressionValidator(fandom_re) - self.fandom_url.setValidator(fandom_validator) - - fandom_hl.addWidget(self.fandom_url) - vl.addLayout(fandom_hl) - model_size_hl = QHBoxLayout() model_size_label = QLabel( 'spaCy model size') @@ -80,6 +67,18 @@ def __init__(self): zh_wiki_hl.addWidget(self.zh_wiki_box) vl.addLayout(zh_wiki_hl) + fandom_hl = QHBoxLayout() + fandom_label = QLabel('Fandom URL') + fandom_hl.addWidget(fandom_label) + self.fandom_url = QLineEdit() + self.fandom_url.setText(prefs['fandom']) + self.fandom_url.setPlaceholderText('https://x.fandom.com') + fandom_re = QRegularExpression(r'https:\/\/\w+\.fandom\.com') + fandom_validator = QRegularExpressionValidator(fandom_re) + self.fandom_url.setValidator(fandom_validator) + fandom_hl.addWidget(self.fandom_url) + vl.addLayout(fandom_hl) + donate_button = QPushButton('Tree-fiddy?') donate_button.clicked.connect(self.donate) vl.addWidget(donate_button)