Entry tags:
Another calibre question
HI, I have a calibre conversion question fandom people might understand better than MobileRead forumers.
I had the fanfiction downloader program called Graffer installed on my comp. I was happy with it because it would download fics from multiple sources and produced clean html files. Unfortunately it's creator gave up on the program and it is no longer updated, and it has stopped working for several major archives.
My work on converting my fics via calibre is slow, ad I often want to chuck my comp out the window, that's how frustrated calibre makes me feel. I was expecting import and conversion to be fairly straightforward, but calibre kept messing up the authors. I finally loked at the html coding and discovered that Graffer added a line in the metadata section which calibre would read as author name, but was actually the name of the programmer: <meta name='author' content='Grzegorz Hordynski' />
I wet to MobileRead to see if I can find a way to change this line in the html file automatically through bulk convert, but couldn't figure out the instructions or the regexes. I've been having a back and forth conversation with a member who doesn't understand what I'm after, so does anyone here know how to set up calibre so that it changes the programmer's name into the correct author name for selected ebooks in the actual html file, not just in the metadata?
I had the fanfiction downloader program called Graffer installed on my comp. I was happy with it because it would download fics from multiple sources and produced clean html files. Unfortunately it's creator gave up on the program and it is no longer updated, and it has stopped working for several major archives.
My work on converting my fics via calibre is slow, ad I often want to chuck my comp out the window, that's how frustrated calibre makes me feel. I was expecting import and conversion to be fairly straightforward, but calibre kept messing up the authors. I finally loked at the html coding and discovered that Graffer added a line in the metadata section which calibre would read as author name, but was actually the name of the programmer: <meta name='author' content='Grzegorz Hordynski' />
I wet to MobileRead to see if I can find a way to change this line in the html file automatically through bulk convert, but couldn't figure out the instructions or the regexes. I've been having a back and forth conversation with a member who doesn't understand what I'm after, so does anyone here know how to set up calibre so that it changes the programmer's name into the correct author name for selected ebooks in the actual html file, not just in the metadata?
no subject
http://www.flagfic.com/
It supports
fanfiction.net
fictionpress.com
twilighted.net
adifferentforest.com
thewriterscoffeeshop.com
twiwrite.net
ficwad.com
adultfanfiction.net
fictionalley.org
harrypotterfanfiction.com
mediaminer.org
And will soon support
tthfanfic.org
wraithbait.com
hpfandom.net
archive.skyehawke.com
archiveofourown.org
And allows downloads in
EPUB
MobiPocket
PDF
HTML
no subject
The problem is I have a massive amount of fics I saved from LJ and DW as single html or as full we pages for fics posted for BigBangs and fest exchanges because they had accompanying artwork. I don't have the time to edit all those files individually, and was hoping to do it with calibre.
no subject
no subject
no subject
no subject
FLAG / AO3 DOwnloader
(Anonymous) 2011-10-06 02:54 am (UTC)(link)I don't claim to understand the strange desires of FLAG's users, but I do try to keep them happy :-).
Re: FLAG / AO3 DOwnloader
"I don't claim to understand the strange desires of FLAG's users, but I do try to keep them happy :-)."
Sounds like a plan. A psychological approach would probably only yield further unanswerable questions. :)
Re: FLAG / AO3 DOwnloader
(Anonymous) 2011-10-06 04:56 am (UTC)(link)That was my thinking - happy users that confuse me are infinitely better than annoyed users who feel over-analysed!
no subject
no subject
no subject
no subject
no subject
But you probably wouldn't need Graffer anyway; this is the coding it inserts into the downloaded html file, and the thing I'm trying to replace is the programmer's name with the name of the author:
The MobleRead thread in question is Importing and converting html files.
no subject
1) Do all of the html files you're trying to convert have the author information in them somewhere? In the text, as part of the filename, somewhere?
2) Is the location of the author's name consistent for all of the files?
3) Is it the information actually marked as author, or is it just in the text somewhere, like the example you gave above?
no subject
OK, here are the answers:
1) I name my files differently depending on whether it's just a single story from an author I liked and saved, in which case I put the name of the author in the file name (Author - Name of fic.html). If I have several fics from the same author, I create a folder for that author and keep all their fics there. In that case, I don't include their name in the file (Name of fic.html, or if it's a series, Series Name 01 Name of fic.html etc). There's usually boththe author name and fic title in the file itself, before the text. i.e. Fic name by Author, often followed by additional information about the fic itself (disclaimers, warning and such - the usual descriptions authors post with their stories).
2) I mostly use the Author name - Fic title format in naming my files, especialy those I saved as html, web page, or copy/pasted from LJ or whatever other source, though there were several that were named Fic name by Author before I changed the configuration of Fanfic Downloader. I still need to rename the rest of those.
3) I'm unclear on what you mean by this? Marked, as in marked in the html coding, or marked as in, Author: So and so, Title: Such and such? in the fic header?
I was hoping all this renaming and correcting would be something I would be able to do automatically and in bulk via calibre because I really don't have the time to do it manually. I wanted to convert files of various formats to a single format, and have them contain metadata about the files, maybe even a cover for each fandom that would show up on my reader. But the more I use calibre, the more I hate it. I dislike it's duplication of imported files, its several levels deep subfolders. Now it seems that files have to be perfect before they can be imported and converted.
Let me know if there are other things I need to clarify.
no subject
To remove the programmer's name from the Graffer-grabbed files: grab a good text editor (like NoteTab) and use it to do a multi-file search and replace on the meta tag. That'll clear that out so you don't have to deal with it when you find a library program you do like to use and want to import your files.
To mass rename batch files without having to figure out the regexes, use AF5 Rename your files. It's a fairly logical interface for doing just one thing: renaming files using patterns. :)
no subject
I just recently discovered that I can open several files in Notepad++ ad do a search and replace. I was hoping search&replace would be something I could do on a larger number of files without actually having to open them (hence thinking I could use calibre for that), but it seems I won't be able to do that (not with my level of technical knowledge).
I've got two free renaming programs I installed (um, Ant Renamer I think, and Bulk Rename Utility), and so far I've figured out how to prefix the name of the author folder in which I keep my fics written by that one author; what I can't figure out is how to rename a files like
Author - 01 Title.html
Author - 02 Title.html
Author - 03 Title.html
to
Author - 01 - Title.html
Author - 02 - Title.html
Author - 03 - Title.html
Do you see what I mean? How do I tell the renamer to add a dash and a space without touching the number?
no subject
It's pretty easy to open multiple files at once in NoteTab and do the search and replace. Depending on how old or new your machine is, you can open files in bunches so it doesn't overwhelm computer's memory, but really, that's the fastest way to do that sort of thing without having to learn or deal with any of the scripting languages that would do what you need. And honestly, even though you have to open all the files, it doesn't take any longer. :) Plus, it sounds like it's much more your speed, and would cause the least amount of headache for you. :)
With the file renaming, sure, I know exactly what you mean. Download the program I gave you the link to (AF5 Rename your files) and read the help files--it easily does that sort of thing without making it complicated. (I've used that program for years--it's a very straightforward tool.)
no subject
no subject
no subject
What Operating System are you on? Dou you already have Python installed, by any chance?
no subject
I'm on Windows 7, and I have zero knowledge of Python and Shell script. I am under such tight schedule at work that I have no time to learn either script, and any time I can set aside for reading is precious. I am only doing this because my reader would present me with wrong author information when I transferred the files. I wanted to know what was causing it, and looked at the html code. It then kind of blew up from there. :)
no subject
If you don't find another solution to your problem and if you are willing to install Python, I'd write that script for you.
OTOH, I just looked at the bulk conversion thing of Calibre, and the Search & Replace looks exactly like what you need. Your regular expression would most likely just be the offensive tag as is if it stays exactly the same in all files:
<meta name='author' content='Grzegorz Hordynski' />
Leave the replacement string empty. If that doesn't work, try
<meta name='author' content='Grzegorz Hordynski' \/>
(With a backslash before the slash to tell calibre that you mean the character slash. The slash might have a special meaning in regular expressions which you don't want here.)
no subject
:back a while later:
It populates the Author(s) column correctly, but it does nothing to the file itself. When I look into the zip file created by calibre, that bloody line is still there. It is supposed to be able to change the content of the file. I know, because I read tutorials on MR that show how to remove repeating headers and footers. Why am I not able to change this one bloody line in the html file???
And it doesn't convert all books I selected, just the first one, and renames the fic in an insane fashion - I start with a file in an author folder numbered by the order in which events happen in these six connected fics, and calibre rearranges the order the way it sees fit. When I convert the fic, it renames it to Title by Author - Author.epub. WTF is that?
Just to make my workflow a little clearer, here's the setup of my fandom folders (I'll use Harry Potter as the example):
My fandoms > Harry Potter > Fics > Individual authors > Author folder > Title. html (or number Title.html if they make up a series)
My fandoms > Harry Potter > Fics > Various authors > Author name - Title.html
So I imported the books from the very first author folder, I clicked on Convert books, Bulk convert, went to Search & Replace, entered the offending line, entered text I wanted to replace it with, hit OK and the conversion was done only on first book. The rest were disregarded, and the resulting epub was named Title by Author - Author.epub (Title by Author is the first line of the fic, fllowed by a short synopsis and story word count, and the original link. The fic was downloaded from fanfiction.net)
no subject
Re the "Title by author - Author.epub" -- is maybe the title tag in the meta info of the html set to "Title by author"? You might want to try removing that with the bulk import search and replace, too. It's going to fallback on filename for title, then, I think. If you convert one author folder at a time, you can just edit the author back in via bulk editing of meta tags.
no subject
and from the file when opened normally:
Darling by agelade
A canon-compliant retelling of book 7, mostly from Draco's point of view. There's a good reason the Malfoys weren't immediately arrested after V was defeated, and it's not because his parents suddenly got lovey-dovey. Canon compliant, canon ships.
Story word count: 33355
Original link
no subject
no subject
<title>.*?</title>
no subject
So tell me at least how do I replace the author tag with the correct author name? That at least should be the same for each selected story.
no subject
no subject
So let's go with actual examples:
I start with Harry Potter > Fics > Individual authors >agelade
The stories are:
01 Darling.htm
02 Daring Coda The Same.htm
03 Darling Coda The Portrait.htm
04 Darling Coda 12th August, 2004.htm
05 Darling Coda The Notion of Bluffing.htm
06 Darling Coda Stars
Upon importing end conversion, I end up with
Calibre Library > agelade > Darling by agelade (272) > Darling by agelade - agelade.epub
Calibre Library > agelade > Darling Coda_ 12th August, 2004 by agela (275) > Darling Coda_ 12th August, 2004 by agela - agelade.epub
Calibre Library > agelade > Darling Coda_ Stars by agelade (277) > Darling Coda_ Stars by agelade - agelade.epub
Calibre Library > agelade > Darling Coda_ The Notion of Bluffing by (276) > Darling Coda_ The Notion of Bluffing by - agelade.epub
Calibre Library > agelade > Darling Coda_ The Portrait by agelade (274) > Darling Coda_ The Portrait by agelade - agelade.epub
Calibre Library > agelade > Darling Coda_ The Same by agelade (273) > Darling Coda_ The Same by agelade - agelade.epub
So I have to rename all my fics BEFORE importing to calibre following a certain scheme (which is what, exactly? How do I organize my files so that calibre populates authors and series in a correct way? And that is doubling the work; it was supposed to automate things for me, not make me work twice as hard to fix it before conversion. What if I had imported my entire Fandoms flder???)
herve leger
(Anonymous) 2011-12-06 08:05 am (UTC)(link)no subject
So what the hell is it about this program that's got everyone singing praises to it? Honestly, I have had nothing but trouble with it from the first time I tried this, but this is really the lowest point so far.
no subject
(Anonymous) 2011-10-06 07:06 pm (UTC)(link)no subject
I think you would panic too if you thought that your 4GB card which contains favorite stories, postgraduate notes, music and video files was deleted and didn't know the reason.
And please do explain to me how complaining about a feature that doesn't work for you even though it works for others is entitlement? Even if a program is free, there's no law saying you cannot complain about it because you haven't paid for it. If nobody complained about a problem they had, there would be no improvement.
I am fully prepared to be told I missed something blindingly obvious, and be called an idiot and a fool. It might be that there's something wrong with my installation. If that does happen, I will post an apology here and on MobileRead. But please, tell me your name so that I can apologize to you personally as well.