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.
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.

no subject
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!
no subject
I don't want to have to install and learn to use any more programs, but at this point I think I will have to. I already downloaded Python for Windows, but I have no idea whether it will even install as a regular Windows program. I am definitely not a programmer of any kind, but I like to think I'm reasonably competent when it comes to technical things where I can follow step by step instructions (although calibre is rapidly changing that view of myself!).
I'll send you the files, they weren't posted under an flock, and maybe somehow we'll find a solution to my problems. If anyone else would like to join in, I certainly wouldn't mind; I've had an offer in the previous post as well. Thank you for volunteering to help!
no subject
no subject
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.
no subject
I save my fics in flders by Fandoms > Fics > Individual authors > Author > fles, or Fandoms > Fics > Various authors > files.
The fist set up is the one I want to try first, since adding the foldername as part of the title would be simpler in that case. I want the folder names to be added as a prefix Author - File.html. But what do I do with fles I now have named as 01 Title.html, 02 Title.html etc? How do I handle increasing numbers and the space?
Also, there are some files with a fairly complicated naming scheme, such as
Book 1 - Title - Part 1 - Subtitle.txt
If I add author name to that, I would get
Author - Book 1 - Title - Part 1 - Subtitle.txt.
How in the world do I bulk rename it, and come up with a save template in calibre for that??
no subject
no subject
no subject
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!
no subject
No, not all my files have authors in this format, because some were plain txt files saved years ago from now-dead archives (my earliest is from 2004), some were fics I saved from LJ or DW or author websites, some downloaded through two different downloaders (Graffer and Fanfiction Downloader). I think it's going to be a massive undertaking, even with automating a part of the process. I will have to figure out which fics were saved in what way, and what tags they have. :headdesk:
I don't rename fanfiction authors to [FirstWesternName LastWesternName] (or vice versa) but keep their fannish pseuds; [FirstWesternName LastWesternName] would only apply to fiction written by professional authors. When I save files myself, I always use the Author - Title.html format. Titles I take from the way the author named them, so I might end up with a fairly complicated naming scheme (e.g. Author - Book 1 - Title - Part 1 - Subtitle.txt). But whether the authors themselves add html tags or simply copy/paste their stories into LJ/DW varies wildly. The cleanest files come from archive downloads because the program adds that information.
I also think the best way to go about it is to do it on an author folder basis and work on the fics by that one author at a time. I can make a copy of it, do whatever renaming I need, then delete the extra files. (And there a folder where I keep fics by what I call various authors - a single story or two I liked out of the entire collection of an author; there all the fics have a different author so those will most likely have to be dealt on a one by one basis.)
Righ now, the way things stand, I think I will have to use two programs: one for renaming the files, and one for making changes to their content. Last night I was poking around Notepad++ and discovered that I can edit several files at once. That will enable me to do bulk corrections even though I'll have to open the files in Notepad++. It's a more time consuming way to do things, but it's the best I can come up right now while I'm trying to work out calibre.
I hope I explained myself, English is not my native language. Thank you for the help and the patience!
no subject
no subject
I'm going to install BFR too and see which one is easier to work with.
OK, that seems like something I can work with, and I'd only have to change the number of characters after which I wanted to ad a dash when I started working on a new author folder. (This would be number of characters counted from the beginning of the file, yes?)
no subject
(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.)
no subject
no subject
no subject
no subject
Author - Story Title, The.html
no subject
no subject
I think this one is for keeps. I can't see whether it can add the folder name as prefix to the file? That's one of the features I liked in BRU, if only the rest of it wasn't so complicated. :(
no subject
no subject
File rename
(Anonymous) 2016-07-02 04:25 am (UTC)(link)Read Online ebooks (http://ebookspdfepub.com)
Re: File rename
(Anonymous) 2016-07-02 04:30 am (UTC)(link)