Skip to content

Commit

Permalink
Explain how to use the Fandom link option
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyzz committed Feb 15, 2022
1 parent a2b5ac5 commit 9775516
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
25 changes: 12 additions & 13 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
'<a href="https://spacy.io/models/en">spaCy model</a> size')
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9775516

Please sign in to comment.