02-08-2017, 03:30 AM | #1 |
Grand Sorcerer
Posts: 6,279
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Question about file_types in FileType plugin
Hi,
The directive file_types marks the file types a plugin applies too. Is there any way to say that it applies aside of the file type, meaning, for any file? I haven't found info about it nor I've found it in the source code. Thank you very much |
02-08-2017, 05:03 AM | #2 |
creator of calibre
Posts: 44,001
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, there is no way to runa plugin for all file types. If you want to see where it is implement see reread_filetype_plugins() in customize/ui.py
|
Advert | |
|
02-08-2017, 05:21 AM | #3 |
creator of calibre
Posts: 44,001
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The exception is that postadd() is called for all filetypes, since it is a multi-filetype event.
|
02-08-2017, 05:40 AM | #4 |
creator of calibre
Posts: 44,001
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Here is a commit to allow you to specify the '*' file type so that the plugin runs for all file types:
https://github.com/kovidgoyal/calibr...2cf744cace59b7 |
02-08-2017, 05:51 AM | #5 |
Grand Sorcerer
Posts: 6,279
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
Advert | |
|
02-08-2017, 05:53 AM | #6 |
Grand Sorcerer
Posts: 6,279
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
02-08-2017, 05:53 AM | #7 | |
Grand Sorcerer
Posts: 6,279
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] GetFileName | Terisa de morgan | Plugins | 412 | 03-15-2024 01:56 AM |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
Calibre associated with every filetype?! | sej7278 | Calibre | 14 | 08-09-2011 10:36 AM |
Zip Filetype Plugin? | rsingley | Plugins | 7 | 02-11-2011 05:11 PM |
How to register a filetype? | plisken | iRex | 2 | 09-28-2009 07:16 AM |