valiha: watercolor painting of my cat Lola (Default)
valiha ([personal profile] valiha) wrote in [community profile] ebooks2011-10-06 08:12 pm
Entry tags:

Renaming utilities and naming conventions for calibre

Pertaining to my previous post, does anyone have any experience with bulk renaming utilities? Which one would you recommend? 

And as for renaming the files, how would I go about renaming a file like 01 Title.html to Author - 01 - Title.html? 

Also, if you can offer advice on what naming conventions to use to prepare a file for importing to calibre, I'd be very grateful.
yhlee: Alto clef and whole note (middle C). (Default)

[personal profile] yhlee 2011-10-06 06:23 pm (UTC)(link)
Hey--I'm so sorry to hear about all the troubles you've had with Calibre. (I've read your previous post.) I've used it and find it really annoying but didn't have nearly the level of trouble you have had.

Anyway, I think renaming like this is probably very straightforward to do with a script in Python or similar, if you're willing to install Python. (I found this very easy on a Mac, but I don't know what you're using or what your tolerance for technical things is.)

I'm not a programmer myself, but I might be able to persuade my husband to write a script to handle this. No guarantees, but: Is there somewhere consistent in the file the script could look to find the author in your current set of files, or would you be providing that as an input to the script? Even better, could you email me one of your html files so I can show it to him and think about how to make this easy for you? I'm at requiescat at cityofveils dot com.

If this is not helpful, my apologies, and I hope someone else will be able to help you!
kate_nepveu: sleeping cat carved in brown wood (Default)

[personal profile] kate_nepveu 2011-10-06 08:52 pm (UTC)(link)
Better File Rename, which is not free but does 10 files at a time in trial mode. http://www.publicspace.net/windows/BetterFileRename/download.html

But it would depend on where the author name was in the file name or folder name already, to give you step-by-step instructions.
kate_nepveu: sleeping cat carved in brown wood (Default)

[personal profile] kate_nepveu 2011-10-06 10:46 pm (UTC)(link)
Well, it's not like I can tell you how to work a program I don't know. Better File Rename has multi-step renaming, including "add folder" to beginning or end, and a preview feature, so you can go through it step-by-step and see the results before you actually commit to them.
yhlee: Alto clef and whole note (middle C). (Default)

[personal profile] yhlee 2011-10-06 11:30 pm (UTC)(link)
Hey--have you gotten one of these working for you?

Preliminary consultation with my husband suggests that what you ask is roughly doable. The next question is authors--in the HTML files you sent me, there's this line

<title> Darling Coda: The Portrait by agelade </title>

Do you happen to know if all your files have the author in this format, "by [authorname]" right before </title>? Because if so, I think a script could pull it out and put the author's name in the rename automatically. That's assuming you want [authorname] left in that format. If you rename things to be like [LastWesternName FirstWesternName] when the title bit has it as [FirstWesternName LastWesternName], you may run into trouble because the program won't be able to tell the difference between [FirstWesternName LastWesternName] that needs to flip to [LastWesternName FirstWesternName], and on the other hand [Twoword Fanficwritername] (e.g., this is probably real somewhere but is a made-up example, Brightly Burning), which doesn't flip but stays [Twoword Fanficwritername]. If you see what I mean?

The alternative is to write the script so that it works on a folder full of fics all by the same author, and then the script could prompt you to type in the author name just as you want it to appear. This would be more work, but might have better results depending on how you want to organize your collection. This might also be the only way if your fanfics do not all have the author in the title field like in the files you sent me.

Also, I would STRONGLY advise you to make a copy of a representative selection of your fanfic files, and test any program on those copies so that you don't risk your actual files. (Spoken from having messed up my own files in the past! Nothing like a typo in grep...)

Anyway, husband indicates this is possible but I don't know how long it would take, and if you have a better solution you should go with that instead. Let me know!
kate_nepveu: sleeping cat carved in brown wood (Default)

[personal profile] kate_nepveu 2011-10-07 03:06 pm (UTC)(link)
If you're working author-by-author, in my preferred program's workflow I could tell it "add dash and a space after X characters," since the author name would the same # of characters for each fic by that author. Perhaps yours has something like that?
kate_nepveu: sleeping cat carved in brown wood (Default)

[personal profile] kate_nepveu 2011-10-07 03:16 pm (UTC)(link)
Yup!

(Whuff, BRU looks complicated to me. But if you like it, then hey! There's a reason that there are different tools out there, after all.)
yhlee: Alto clef and whole note (middle C). (Default)

[personal profile] yhlee 2011-10-07 04:34 pm (UTC)(link)
Howdy--it looks like you've found a working solution, so best wishes and I hope your files are quickly sorted!
kate_nepveu: sleeping cat carved in brown wood (Default)

[personal profile] kate_nepveu 2011-10-07 03:07 pm (UTC)(link)
Oh, that's easy--tell it to delete the last five characters / the first instance of ", The" from the file name, then add "The " after the first instance of " - ". Just have to think about it step-by-step.
kate_nepveu: sleeping cat carved in brown wood (Default)

[personal profile] kate_nepveu 2011-10-07 03:33 pm (UTC)(link)
Mine has "add folder to beginning / end" somewhere in the first set of options in the dropdown menu of actions--program is at home so I'm going by memory, but I definitely checked it yesterday.

File rename

(Anonymous) 2016-07-02 04:25 am (UTC)(link)
I also recommend file rename. the following website do that:
Read Online ebooks (http://ebookspdfepub.com)

Re: File rename

(Anonymous) 2016-07-02 04:30 am (UTC)(link)
That's a very good website. I also recommend (http://ebookspdfepub.com)