View Single Post
Old 09-18-2016, 05:50 AM   #1
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,235
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
[FileType Plugin] GetFileName

This plugin allows you to store the name of your imported file in a custom column.

Special Notes:
  • Requires calibre 2.49.1 or later
  • It only stores the name when a new book is added to the library, not when a file is added to an existing book.
  • No menu or toolbar entry. Customization is accessed through Preferences -> Plugin
  • The last one version will try to migrate the configuration, as it's now based on file and not on the database.

Installation Notes:
  1. Install from Preferences -> Get New Plugins, or download the attached zip file and install the plugin manually
  2. Restart Calibre
  3. Configure the plugins from Preferences -> Plugins

Configuration Notes:
  • The plugin uses up to four custom columns, these should be created via Preferences -> Add your own custom columns before configuring the plugin.
    • The column type of three of them must be capable of storing text and the other one of storing dates. The drop down selectors will only offer columns of the proper type - i.e. no numbers, Yes/no, etc.
    • A custom column name must be specified in the File Name variable.
    • The File Extension and File Folder variables are optional, i.e. they can be left empty.
  • Configure the plugin for each library where you want to store the originating file name.
    • Leave it unconfigured if you don't want to use on a specific library (eg News Clippings).
    • The configuration, including column names, can be different for each library.
    • The column name can be different across libraries
  • If the File Extension column name is not specified, then the full file name (base name.extension) is stored in the File Name column.
    Otherwise, the base name is stored in the File Name column, and the extension is stored in the File Extension column.
  • If "Include folder" is checked, and File Folder column name is not specified, then the complete file name including the folder path is stored in the File Name column, with or without extension, depends on File Extension setting.
    Otherwise, the folder path is stored in the File Folder column, and the file name is stored in the File Name column, with or without extension, depends on File Extension setting.

Version History:
Spoiler:

Version 0.1.1 - 18 Nov 2020
Error reported by halloleo importing pdf
Version 0.2.0 - 11 Jul 2022
Migration to QT6 (Thanks davidfor)
Fixed bug getting date
Version 0.1.0 - 25 Sep 2020
Ported to python 3
Version 0.0.12 - 12 Dec 2018
Configuration included in json file instead of database.
Version 0.0.12 - 26 Feb 2017
Some books without file name when added in big batch.
Configuration problems.
Version 0.0.11 - 14 Feb 2017
All the file types are supported now.
Version 0.0.10 - 30 Jan 2017
It does not allow to configure non treated options.
Version 0.0.9 - 26 Jan 2017
Corrected (hopefully) bug when file path is not stored.
Included Spanish translation.
Version 0.0.8 - 25 Jan 2017
Date of last modification of the file is stored
Corrected (hopefully) bug when Kindle books with extensions distinct of ".azw" are not stored.
Version 0.0.7 - 26 Dec 2016
Original file directory is stored
Corrected (hopefully) bug when dots are included in file name
Version 0.0.6 - 13 Nov 2016
File name is not stored in Copy to Library
Version 0.0.5 - 04 Oct 2016
File path can be stored.
Version 0.0.4 - 25 Sep 2016
Name and extension can fulfill different columns
Version 0.0.3 - 20 Sep 2016
Name not fulfilled when adding an empty book
Version 0.0.2 - 19 Sep 2016
Comments column accepted as valid destination
Version 0.0.1 - 18 Sep 2016
Initial release
Attached Files
File Type: zip GetFileName.zip (22.6 KB, 31945 views)

Last edited by Terisa de morgan; 07-11-2022 at 04:37 AM. Reason: Release 0.0.13 added
Terisa de morgan is offline   Reply With Quote