In brief, I need to do something like this:
- I have a folder with a lot of files and want to process all files with extension .epub.
- All files already follow a naming scheme: Lastname, Firstname – Title.epub or Lastname, Firstname – Series x – Title.epub and I need a parser for Lastname, Firstname, Series (if existing) and Title.
- I have a command-line tool that sets metadata: ebook-meta filename -a “Firstname Lastname” -t Title
There are many snipplets for 1.), however I am in need for input for 2.) and appreciate any help/pointers!
You can start with the following and change it to meet your needs. It compiles, although untested.
Just comment if you need something to be changed.