Rename and clean up a little
parent
697cb22e09
commit
28d6c654e4
|
@ -6,8 +6,7 @@ __pycache__/
|
||||||
.vscode
|
.vscode
|
||||||
pokemon
|
pokemon
|
||||||
tmp
|
tmp
|
||||||
poos.epub
|
ptoos.epub
|
||||||
test.epub
|
|
||||||
|
|
||||||
# C extensions
|
# C extensions
|
||||||
*.so
|
*.so
|
||||||
|
|
|
@ -42,7 +42,7 @@ def patch_chapter(chapter: epub.EpubHtml, pokemon_lookup: Dict[str, Pokemon]):
|
||||||
tag = soup.new_tag("a")
|
tag = soup.new_tag("a")
|
||||||
tag.string = word
|
tag.string = word
|
||||||
tag.attrs["href"] = f"np_pokedex.xhtml#{POKEMON_ID_PREFIX}{key}"
|
tag.attrs["href"] = f"np_pokedex.xhtml#{POKEMON_ID_PREFIX}{key}"
|
||||||
# tag.attrs["style"] = "color:black;text-decoration:none"
|
tag.attrs["style"] = "color:black;text-decoration:none"
|
||||||
return tag
|
return tag
|
||||||
|
|
||||||
def patch_string(section: NavigableString) -> List:
|
def patch_string(section: NavigableString) -> List:
|
||||||
|
|
|
@ -16,6 +16,6 @@ def main():
|
||||||
try:
|
try:
|
||||||
ptoos_epub = sys.argv[1]
|
ptoos_epub = sys.argv[1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
ptoos_epub = "poos.epub"
|
ptoos_epub = "ptoos.epub"
|
||||||
pokemon = src.pokemon.get_pokemon()
|
pokemon = src.pokemon.get_pokemon()
|
||||||
src.epub.patch(ptoos_epub, pokemon)
|
src.epub.patch(ptoos_epub, pokemon)
|
||||||
|
|
Loading…
Reference in New Issue