fix examples
All checks were successful
Python CI / test (push) Successful in 9m48s

This commit is contained in:
Duncan Tourolle 2025-11-06 18:01:22 +01:00
parent c90e9ec580
commit 6bb43db8d5
3 changed files with 11 additions and 8 deletions

View File

@ -81,24 +81,24 @@ Here are animated demonstrations of the EbookReader's key features:
<tr>
<td align="center">
<b>Page Navigation</b><br>
<img src="examples/gifs/ereader_page_navigation.gif" width="300" alt="Page Navigation"><br>
<img src="docs/images/ereader_page_navigation.gif" width="300" alt="Page Navigation"><br>
<em>Forward and backward navigation through pages</em>
</td>
<td align="center">
<b>Font Size Adjustment</b><br>
<img src="examples/gifs/ereader_font_size.gif" width="300" alt="Font Size"><br>
<img src="docs/images/ereader_font_size.gif" width="300" alt="Font Size"><br>
<em>Dynamic font size scaling with position preservation</em>
</td>
</tr>
<tr>
<td align="center">
<b>Chapter Navigation</b><br>
<img src="examples/gifs/ereader_chapter_navigation.gif" width="300" alt="Chapter Navigation"><br>
<img src="docs/images/ereader_chapter_navigation.gif" width="300" alt="Chapter Navigation"><br>
<em>Jump directly to chapters by title or index</em>
</td>
<td align="center">
<b>Bookmarks & Positions</b><br>
<img src="examples/gifs/ereader_bookmarks.gif" width="300" alt="Bookmarks"><br>
<img src="docs/images/ereader_bookmarks.gif" width="300" alt="Bookmarks"><br>
<em>Save and restore reading positions anywhere in the book</em>
</td>
</tr>

View File

@ -45,7 +45,7 @@ To generate these animations with your own EPUB file:
```bash
cd examples
python generate_ereader_gifs.py path/to/your/book.epub gifs/
python generate_ereader_gifs.py path/to/your/book.epub ../docs/images/
```
This will create all four GIF animations in the specified output directory.
@ -91,10 +91,10 @@ These GIFs are embedded in the main [README.md](../../README.md) to showcase the
To embed in Markdown:
```markdown
![Page Navigation](examples/gifs/ereader_page_navigation.gif)
![Page Navigation](docs/images/ereader_page_navigation.gif)
```
To embed in HTML with size control:
```html
<img src="examples/gifs/ereader_page_navigation.gif" width="300" alt="Page Navigation">
<img src="docs/images/ereader_page_navigation.gif" width="300" alt="Page Navigation">
```

View File

@ -12,6 +12,9 @@ The GIFs are saved to the examples/ directory and can be included in documentati
Usage:
python generate_ereader_gifs.py path/to/book.epub [output_dir]
Example:
python generate_ereader_gifs.py ../tests/data/test.epub ../docs/images
"""
import sys
@ -211,7 +214,7 @@ def main():
if len(sys.argv) < 2:
print("Usage: python generate_ereader_gifs.py path/to/book.epub [output_dir]")
print("\nExample:")
print(" python generate_ereader_gifs.py ../tests/data/test.epub ./gifs")
print(" python generate_ereader_gifs.py ../tests/data/test.epub ../docs/images")
sys.exit(1)
epub_path = sys.argv[1]