Comments (9)
Hey there, sorry a lot going on. I think it will be supported in future, but not in short time...
from epy.
@SlidingHorn hold up, epy and https://github.com/wustho/epr already support image like you suggested, mate
As you can read in epr documentation https://github.com/wustho/epr#opening-an-image
from epy.
Hej, just a small thing that could be implemented pretty easily:
I use the terminal kitty, and I wrote a small patch which for open_media
displays the images in the terminal:
def open_media(scr, name, bstr):
sfx = os.path.splitext(name)[1]
fd, path = tempfile.mkstemp(suffix=sfx)
try:
with os.fdopen(fd, "wb") as tmp:
# tmp.write(epub.file.read(src))
tmp.write(bstr)
# run(VWR + " " + path, shell=True)
subprocess.call(
+ "kitty +kitten icat --silent " + path,
shell=True,
+ # stdout=subprocess.DEVNULL,
+ # stderr=subprocess.DEVNULL
)
k = scr.getch()
finally:
os.remove(path)
return k
Works perfectly, you could add a --kitty
option to enable this if you want to add it :)
from epy.
nice! i really like this program and its features ^~^ you did a great job on it
from epy.
Thanks, mate! Appreciate it. I actually tried to implement it then. Casually, by checking if my kitty terminal support displaying image. Indeed it display for a second, then flickered and the image is gone.
So I dont bother continue since I have other things going on. Maybe in future when someone else does PR or when I can commit again...
from epy.
Thanks, mate! Appreciate it. I actually tried to implement it then. Casually, by checking if my kitty terminal support displaying image. Indeed it display for a second, then flickered and the image is gone.
So I dont bother continue since I have other things going on. Maybe in future when someone else does PR or when I can commit again...
aw, thats really cool you got it working for even a second though! i do not have much coding knowledge at all, i should get into it more so i can help out in situations like these ;v; i hope the other things you are busyt with aswell goes well ^~^
from epy.
Thanks, mate! Appreciate it. I actually tried to implement it then. Casually, by checking if my kitty terminal support displaying image. Indeed it display for a second, then flickered and the image is gone.
So I dont bother continue since I have other things going on. Maybe in future when someone else does PR or when I can commit again...
If I could offer a suggestion:
Maybe instead of trying to render it inline within the terminal (e.g. via w3m or whatever other method), you could just have links as placeholders that will use xdg-open to open the image in the user's preferred image viewer.
Just a thought! I just installed epy earlier today, and I'm loving it so far.
from epy.
@SlidingHorn hold up, epy and https://github.com/wustho/epr already support image like you suggested, mate
As you can read in epr documentation https://github.com/wustho/epr#opening-an-image
I didn't know that! I'm golden then, lol
from epy.
from epy.
Related Issues (20)
- Is there any way to view images?
- Display Chinese epub Error
- Scroll behavior
- feature request: library
- How can I configure epy to use chafa to view images? HOT 1
- Add to docs in CLI Usage and README that speaker turn on/turn off key is "!"
- [Feature request]View embed image
- [Asking] How to hide underline HOT 3
- [Feature Request] Importing book lists to epy history database HOT 3
- Strange crash in zipfile HOT 10
- AUR epy-git: pkgver() error HOT 11
- Image marker isn't visible on a page with multiple images HOT 5
- [Feature Request] Reset margins when window is fullscreened again
- Valid EPub breaks epy: ERROR: Badly-structured ebook. "There is no item named 'OEBPS/../OEBPF/navigation.ncx' in the archive"
- epy_reader.reader.Reader.input_prompt ???
- Em dash is displayed as a hyphen
- How to set 'space' in keys config? HOT 2
- . HOT 1
- Text gets misaligned when changing monitor scaling on Windows
- Distinguish between different levels of headings (e.g. `<h1>` vs `<h2>`)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epy.