Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-03-2017, 04:02 PM   #1
RobertJSawyer
Guru
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 732
Karma: 3911762
Join Date: Jun 2006
Location: Toronto
Device: Kobo Libra 2, Clara 2E, and Clara HD; Kindle PaperWhite
ebook-viewer and 8.3 DOS short filenames

I love Calibre's ebook-viewer.exe, but I also love old software and sometimes use a DOS file-management shell [ProFinder, which came bundled with WordStar for DOS] that can only pass on short filenames (8.3-style) to other programs, such that an ebook file with this name:

Quantum Night - Robert J. Sawyer.epub

has its named passed on to the Calibre ebook viewer as:

QUANTU~1.EPU

The problem, of course, is the extension .EPU, because the Calibre ebook-viewer.exe doesn't recognize it, and so gives this error message:

ERROR: Could not open ebook
ValueError: No plugin to handle input format: epu

Would it be possible to add the ability for the ebook viewer to recognize .epu as a valid synonym for the extension .epub?

Thank you so, so much!
RobertJSawyer is offline   Reply With Quote
Old 01-03-2017, 04:47 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,954
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
A better way might be for you to associate .EPU with calibre's ebook-viewer.exe via your OS. BTW, the ebook-viewer code is frozen, that means bug fixes only.

BR
BetterRed is offline   Reply With Quote
Advert
Old 01-03-2017, 05:07 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,049
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by BetterRed View Post
A better way might be for you to associate .EPU with calibre's ebook-viewer.exe via your OS. BTW, the ebook-viewer code is frozen, that means bug fixes only.

BR
That won't work. The code for ebook-viewer works on the file extension. It does not check the file. It works on .epub is ePub and .epu is unknown. So unless there's a way to pass .epub instead of .epu, using ProFinder is out. The only way to solve this problem is to modify the code so .epu is ePub.
JSWolf is offline   Reply With Quote
Old 01-03-2017, 05:47 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,954
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by JSWolf View Post
That won't work. The code for ebook-viewer works on the file extension. It does not check the file. It works on .epub is ePub and .epu is unknown. So unless there's a way to pass .epub instead of .epu, using ProFinder is out. The only way to solve this problem is to modify the code so .epu is ePub.
I stand corrected - should have checked. I assumed it would read the file and then decide whether it could do anything with it - like most other programs do.

@RobertJSawyer - sorry for the bum steer. If you set up a file association to the Azardi ebook viewer for .EPU it will work, Readium can also open a .EPU - assuming its a valid ePub of course.

But ADE and the calibre will only open .EPUB's

BR
BetterRed is offline   Reply With Quote
Old 01-03-2017, 09:04 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,409
Karma: 23977332
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The problem with doing that is that in the future .epu might be used for some non-epub file type, in which case trying to open it would be the wrong thing to do.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-04-2017, 01:19 AM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,954
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
.EPU is already known. It's used by commercially available software from DGMR, a civil engineering consultancy based in the Netherlands.

BR
BetterRed is offline   Reply With Quote
Old 01-04-2017, 10:27 AM   #7
RobertJSawyer
Guru
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 732
Karma: 3911762
Join Date: Jun 2006
Location: Toronto
Device: Kobo Libra 2, Clara 2E, and Clara HD; Kindle PaperWhite
Thank you for your replies, everybody.

Of course, I'm NOT looking to have the extension .epu associated via Windows Explorer or the Windows registry with ebook-viewer.exe; that's both inappropriate and unnecessary.

All I was hoping for is that if ebook-viewer.exe encounters a standard Windows/DOS short filename in the 8.3 format as a command-line argument when ebook-viewer.exe is being called, which, as Windows itself will style it, has the .epu extension, that ebook-viewer.exe would recognize it instead of rejecting it. No part of calibre would ever try to steal the file association from any present or future program that used the .epu extension.

Thanks!

Last edited by RobertJSawyer; 01-04-2017 at 10:35 AM.
RobertJSawyer is offline   Reply With Quote
Old 01-04-2017, 12:30 PM   #8
latepaul
Wizard
latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.
 
latepaul's Avatar
 
Posts: 1,265
Karma: 10203040
Join Date: Dec 2011
Device: a variety (mostly kindles and kobos)
The following "wrapper" batch file will convert the 8.3 filename back to the long version and then call ebook-viewer.exe with it:

Code:
@echo off
REM VIEWER.BAT - a wrapper for Calibre's ebook-viewer.exe 
REM 
REM This script expects a filename in 8.3 format, it will 
REM convert it to a long filename and call ebook-viewer

if "%1" == "" (
	echo VIEWER.BAT - Missing filename
	goto :eof
)

REM get the directory name of the filename passed in
FOR /f  "tokens=*" %%A IN ('echo %~dp1') DO (
   set DIR_NAME=%%A
)

REM convert filename to long format
FOR /f  "tokens=*" %%A IN ('dir /b %1') DO (
   set LONG_NAME=%%A
)

REM pass the full filename to ebook-viewer
REM Change the path to Calibre if necessary
"C:\Program Files (x86)\Calibre2\ebook-viewer.exe" "%DIR_NAME%\%LONG_NAME%"
I've knocked this up quickly and done minimal testing. Use at your own risk.
latepaul is offline   Reply With Quote
Old 01-04-2017, 12:48 PM   #9
RobertJSawyer
Guru
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 732
Karma: 3911762
Join Date: Jun 2006
Location: Toronto
Device: Kobo Libra 2, Clara 2E, and Clara HD; Kindle PaperWhite
latepaul, thank you so, so much! This does the trick. I'm very, very grateful for your help!

All best wishes -- and Happy New Year!
RobertJSawyer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pre-Import ebook with Filenames to custom column? yonkyunior Library Management 2 12-26-2015 06:42 PM
DOs and DON'Ts of ebook cover design amoroso Writers' Corner 37 07-27-2011 03:17 AM
[old-topic]ebook-viewer: Open source, crossplatform viewer for EPUB, LIT, MOBI, etc kovidgoyal Calibre 68 05-30-2011 08:46 PM
# user css for viewer.py/ ebook-viewer/ prs-650 tscamera Calibre 0 01-02-2011 06:28 PM
Filenames to metadata, preserving filenames. nitrogun Calibre 5 09-13-2010 10:50 PM


All times are GMT -4. The time now is 12:54 PM.


MobileRead.com is a privately owned, operated and funded community.