View Full Version : multiple copies


nirax
11-20-2009, 12:30 AM
first of all let me thank you for this excellent addon. However there are a few issues I would like to draw your attention to.

1. this addon creates a copy of the file in profile directory. moreover if that file (the copy) is accessed, one more copy of it created. for someone who has many EPUBs, this will result in multiple copies of the same file leading to unneccessary wastage of space. instead of copying the file it is desirable to create a shortcut (or soft link).

2. this addon has changed the default behaviour of EPUB files to directly open ... this is a problem if one wants to download the file to his PC in a preferred location. you may say that "right click -> save link" would rectify the problem. however some sites (manybooks.net) do not send a permalink to the file but instead dynamically generate data from a script. so it becomes impossible to download the file. sure it is downloaded in the profile directory (but the download is not logged in the download manager!!) but it is a pain in the ass to go to the profile directory in case one wants to copy in in a USB-stick or open with another reader.

I hope the above is counted as genuine concern. i think it would be a nice idea to have a 'options' configurator where one can set how to handle files got directly from internet and files opened from PC.

Niraj

mikelv
11-20-2009, 04:53 AM
Hi Niraj,

thanks for your feedback!

first of all let me thank you for this excellent addon. However there are a few issues I would like to draw your attention to.

1. this addon creates a copy of the file in profile directory. moreover if that file (the copy) is accessed, one more copy of it created. for someone who has many EPUBs, this will result in multiple copies of the same file leading to unneccessary wastage of space. instead of copying the file it is desirable to create a shortcut (or soft link).

You are right and you are not the first who mentioned it ;). I'll change it that way: if you open the same ePub file again (the ePub book id is checked) via File open or you download it, no additional copy will be made, but the old version will be overwritten. Additionally I could remove the original ePub-file because it's no longer needed after it has been process by EPUBReader.


2. this addon has changed the default behaviour of EPUB files to directly open ... this is a problem if one wants to download the file to his PC in a preferred location. you may say that "right click -> save link" would rectify the problem. however some sites (manybooks.net) do not send a permalink to the file but instead dynamically generate data from a script. so it becomes impossible to download the file. sure it is downloaded in the profile directory (but the download is not logged in the download manager!!) but it is a pain in the ass to go to the profile directory in case one wants to copy in in a USB-stick or open with another reader.

I hope the above is counted as genuine concern. i think it would be a nice idea to have a 'options' configurator where one can set how to handle files got directly from internet and files opened from PC.

Niraj
To be honest: it was one of the hardest parts to get it working, that not the "open" dialog pops up, but the file is downloaded and processed ;). In my opinion this is one of the main benefits when you use EPUBReader. The downside of this is, like you mentioned, that the original ePub-file is only stored in the profiles directory. Due to security reasons it's not possible for an addon to store the file anywhere else.

It would be easy to change it that way, that one can configure, what should be happen when you click on an ePub-file on a website. If you don't like that the file is processed by EPUBReader directly, the Firefox "open" dialog would open and you could store the file where you want.

What do other people think about that solution? Any other ideas?

Michael

nirax
11-20-2009, 05:14 AM
actually the fact that it automatically opens up EPUBs is a great benefit. anybody who has used CHM reader addon will know what i am talking about.

but the conflict comes for files downloaded from the web. can the addon be configured in such a way that it asks the user (for download or direct display) if a web-based EPUBs is opened, but local files are opened directly inside browser.

Niraj

Dave_S
11-20-2009, 05:15 AM
It would be easy to change it that way, that one can configure, what should be happen when you click on an ePub-file on a website. If you don't like that the file is processed by EPUBReader directly, the Firefox "open" dialog would open and you could store the file where you want.


For me, the Firefox "open" dialog would be preferable, since I would read some EPUB books on my portable reader and some others on EPUBReader.

DaleDe
11-20-2009, 11:45 AM
Another choice might be to offer a save copy command in the ePUB library manager that could allow the user to easily move or copy the ePUB file that is saved in the profile area.

Dale

mikelv
11-21-2009, 07:27 AM
In my opinion the best solution is the idea from Dale. I'll combine it with the idea of April (http://www.mobileread.com/forums/showthread.php?t=62839):

I'll add a save buttom at the bottom of the epub and in the library page.

In first step EPUBReader opens the ePub automatically, if you like it, you can save it additionally to a location of your choice.

mbovenka
11-21-2009, 08:00 AM
In first step EPUBReader opens the ePub automatically, if you like it, you can save it additionally to a location of your choice.

Cool! :thumbsup: I had the problem with ePubs downloaded from my Fictionwise Bookshelf; this will fix that nicely. :thanks:

cklammer
12-18-2009, 04:21 AM
What do other people think about that solution? Any other ideas?

Michael

Calculate for each every epub file a CRC32 checksum and store it and the file size of the epub file directly after download. Now when you download a new epub you just need to compare tboth he CRC32 and filesize of the new epub with your database records. If you find a match than it is very, very, very likely that one or more of the epubfiles in the collection and the newly downloaded epubfile are identical then you just have to act accordingly (warn the user or whatever).

mrmikel
12-18-2009, 06:14 AM
My choice would be for it to act like when I open a PDF and a dialog box comes up with open with... and save to.

I have been downloading a number of epubs off of archive and they are not ready to use. I will need to use sigil and notepad ++ to civilize them. So a dialog box that had open with as the default option and save as the second option would be my choice.

If it were configurable that would be the best of all. That would allow current behavior which is great for ready to read epubs and the behavior which I mentioned which would be more useful for those downloading epubs that need work.

mikelv
12-18-2009, 11:13 AM
Calculate for each every epub file a CRC32 checksum and store it and the file size of the epub file directly after download. Now when you download a new epub you just need to compare tboth he CRC32 and filesize of the new epub with your database records. If you find a match than it is very, very, very likely that one or more of the epubfiles in the collection and the newly downloaded epubfile are identical then you just have to act accordingly (warn the user or whatever).
I think the best idea would be to use the identifier of the ePub. Idential identifier = identical epub.

Sabardeyn
12-18-2009, 11:49 PM
Alright, I've got to raise some questions here regarding using CRCs and/or identifiers.

If the CRC is based on the epub file, and the epub file included bookmark information, than the CRC will never be valid. Because every time a bookmark is added, removed or changed, the CRC will be altered.

Identifiers pose a similar problem because it implies that books never change. And the problem is that ebooks are changing. Ebooks are starting to have versions, just like software, due to corrections in page order, typos, etc. However, in most instances no version information or release note is being offered. Changes are being implemented without warning or anyone's knowledge. So effectively two people could have the exact same book. Except, they're different. Until some kind of major snafu occurs with a mis-quotation, things will be awkward. (Which is why I'm really rooting for the widespread appeal of e-textbooks and other non-fiction writings which need clear and accurate citations.)

Because of both of these issues, I would prefer that the user be asked where they want to save a file. Barring that, perhaps a user setting with a default Save To... path? At least then the user knows where to find any downloaded files.

mikelv
12-19-2009, 06:35 AM
Alright, I've got to raise some questions here regarding using CRCs and/or identifiers.

If the CRC is based on the epub file, and the epub file included bookmark information, than the CRC will never be valid. Because every time a bookmark is added, removed or changed, the CRC will be altered.

Identifiers pose a similar problem because it implies that books never change. And the problem is that ebooks are changing. Ebooks are starting to have versions, just like software, due to corrections in page order, typos, etc. However, in most instances no version information or release note is being offered. Changes are being implemented without warning or anyone's knowledge. So effectively two people could have the exact same book. Except, they're different. Until some kind of major snafu occurs with a mis-quotation, things will be awkward. (Which is why I'm really rooting for the widespread appeal of e-textbooks and other non-fiction writings which need clear and accurate citations.)

Because of both of these issues, I would prefer that the user be asked where they want to save a file. Barring that, perhaps a user setting with a default Save To... path? At least then the user knows where to find any downloaded files.

Thanks for your feedback Sabardeyn!

For me these are two different topics: how can a unique book be identified and where should the epub-files be stored.

Identification
I did already talk to Jon Noring who is one of the main contributors to the ePub specification. He said that the identifier is the way to go to distinguish between different books. This would mean, if you load a book, it's checked if you loaded already another book with the same identifier, if this is the case, the stored book is overriden with the new loaded book.

And you are right, there is no version information in the book. But this is something EPUBReader can't solve, this has to be solved in the ePub specification.

Store location
Due to security reasons the profile directory of Firefox is the only place where EPUBReader can store the ePub-files. As I know that many people want to store their epubs in another directory because they want to transfer them e.g. to their netbook, I've added the possibility to save the epubs at a location of your choice (via the save button at the bottom or in the ePub-library).

cklammer
12-21-2009, 12:25 PM
Store location
Due to security reasons the profile directory of Firefox is the only place where EPUBReader can store the ePub-files. As I know that many people want to store their epubs in another directory because they want to transfer them e.g. to their netbook, I've added the possibility to save the epubs at a location of your choice (via the save button at the bottom or in the ePub-library).

Ahem, under Linux/Unix there is theoretically a way to circumvent this by using a symlink to another storage location. It is a geek solution, though, and not in the cards for Window$ users. And it is considered kinda crude.

Just my 0.02$

What I'd love to see is generating meaningful human-readable file names when re-saving epub files via the "save" button. E.g. using the following pattern:

<last name>, <first name> - <title>

mikelv
12-21-2009, 03:07 PM
Ahem, under Linux/Unix there is theoretically a way to circumvent this by using a symlink to another storage location. It is a geek solution, though, and not in the cards for Window$ users. And it is considered kinda crude.

Just my 0.02$

You are right, but like you said, this is limited to Unix. I'll check again if the storage problem can be solved in another way.


What I'd love to see is generating meaningful human-readable file names when re-saving epub files via the "save" button. E.g. using the following pattern:

<last name>, <first name> - <title>

Good idea. We already discussed this, but I just forgot to put this on the change list. I add it now.

cklammer
12-21-2009, 10:47 PM
Identification
I did already talk to Jon Noring who is one of the main contributors to the ePub specification. He said that the identifier is the way to go to distinguish between different books. This would mean, if you load a book, it's checked if you loaded already another book with the same identifier, if this is the case, the stored book is overriden with the new loaded book.


May I ask: What is the plan if an ePub does not have a valid identifier resp. the identifier is not set or set to zero/null?

Because you will have to deal with stuff like that. Creating mix-ups like that is part and parcel of being Human, after all.

mikelv
12-22-2009, 09:22 AM
May I ask: What is the plan if an ePub does not have a valid identifier resp. the identifier is not set or set to zero/null?

In this case it will happen, what happens in the moment: if you load the epub again, a second entry will be added to the library page.

I've already checked many epubs. Even the worst formatted have got an identifier, so I'm pretty sure, that this happens only very rarely :).