![]() |
#1 |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: Jul 2012
Device: sony prs-t1
|
![]()
I have a number of templates I do not use anymore.
Can I delete them? If Yes, can anybody tell me how? |
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85000000
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Yes, but which type of templates? They are used in a number of places.
|
![]() |
![]() |
![]() |
#3 |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: Jul 2012
Device: sony prs-t1
|
It is in the Save to Disk template.
But by restore default I will lose the templates I want to keep. I was hoping it is possible to delete only one template. |
![]() |
![]() |
![]() |
#4 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85000000
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Restore default only works on the particular Preference setting you show. So by going to:
Preferences ==> Import/Export ==> saving books to disk You will restore the default only for Saving books to disk. same goes for any other Restore defaults button; they exist in every single Preferences submenu (except for plugins and Sharing books by email, which are grayed out) but it only restores the default of the submenu view you have open. Also, the replacement text I gave you for per-device templates is also the default for saving to disk and the universal send to device template; I only told you to use this instead of restore default because the only way to restore the default (that I know of) is to remove the profile from the configuration folder, which is needlessly complex. TL;DR -- restore default will only delete the currently-viewed template, or just use Code:
{author_sort}/{title} - {authors} |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: Jul 2012
Device: sony prs-t1
|
thanx, i will try that.
|
![]() |
![]() |
![]() |
#6 |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: Jul 2012
Device: sony prs-t1
|
this is not working :-(
when I replace the text of the themplate with your code, it just adds it. Any other tips? |
![]() |
![]() |
![]() |
#7 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85000000
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Did you delete what was already there??
There is no earthly reason for it to only append that template fragment. Also, you could just use the Restore default button... |
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: Jul 2012
Device: sony prs-t1
|
What I did step by step:
Copied your text (Ctrl+C) Preferences Saving books to disk select the template I want to delete Teplate editor delete the text in the top part Past your text (Ctrl + V) OK Apply Close Preferences When I go back to the preferences, your text is the first template I see in the list. What am I doing wrong? |
![]() |
![]() |
![]() |
#9 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85000000
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Wait a minute -- so it IS using my template, but you are seeing old templates as a dropdown, and you want to get rid of the dropdown history?
|
![]() |
![]() |
![]() |
#10 |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: Jul 2012
Device: sony prs-t1
|
Yes, dat would be nice.
|
![]() |
![]() |
![]() |
#11 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,238
Karma: 47704482
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
|
They don't really hurt anything
![]() To purge obsolete export templates, you will lose all settings for the export type Post 2 https://www.mobileread.com/forums/sho...38&postcount=2listed the different kinds All the user templates are in the calibre configuration folder: save_to_disk.py others (sample) device_drivers_FOLDER_DEVICE_FOR_CONFIG.py device_drivers_HANLINV5.py Deleting the specific file will reload the Default the next time the configure device setting option is used |
![]() |
![]() |
![]() |
#12 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85000000
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Actually theducks, custom device drivers don't seem to have template history.
And the Save to Disk DOES have history, but it's not actually located in save_to_disk.py anyway. @imans314, you will need to copy out your templates, restore, then add back in the ones you want to keep. Or you could: Go to your calibre configuration folder. This will be located at %APPDATA%\calibre, or you can go to calibre Preferences ==> Advanced ==>Miscellaneous, and click the button that says "open calibre configuration directory", then close calibre after the config folder pops up. Open gui.py in a text editor. Notepad may or may not work, there is a chance the file will use linux line breaks which notepad cannot read, if so, you may need to install notepad++ or similar. There will be a set of values similar to this from my gui.py: Code:
# save to disk template history # Previously used Save to Disk templates save_to_disk_template_history = cPickle.loads('\x80\x02]q\x01(XG\x00\x00\x00{author_sort:sublist(0,1,&)}/{title}/{title} - {authors:sublist(0,1,&)}q\x02X)\x00\x00\x00{author_sort}/{title}/{title} - {authors}q\x03e.') Code:
cPickle.loads('bunch-of-values-separated-by-hex-data') Code:
cPickle.loads('bunch-of-values-separated-by-hex-data-minus-what-you-don't-want') I will hazard a GUESS, an educated guess, how it works, but no guarantees whatsoever: Using the data from "main_search_history = cPickle.loads('{data}')" I get this, with the start codes in blue and separators in red, leaving actual searches standing out in black: Spoiler:
In send_to_device_template_history = cPickle.loads I have: Spoiler:
Leaving the start code aside, we seem to have q\x01 incremented from 01-19, then 1a in the end code, or else 01-07, then 08 in the end code, then the end code ends, followed in the middle codes by 2 pieces: X\{random}\ where {random} is a one-symbol unique identifier (I don't see any patterns). This one symbol may be written in hex, though. This is followed by x00\x00\x00 otherwise known as null, three times. So, if you delete any search terms/templates in black, then switch all the incremented section backward to compensate for the section you removed, it might work properly. But if you start playing around with this, you may want to back up the config folder first. It would be easier to just re-enter all the values. Last edited by eschwartz; 11-24-2013 at 05:17 PM. |
![]() |
![]() |
![]() |
#13 |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: Jul 2012
Device: sony prs-t1
|
I think I am going for the restore version, the other looks very difficult.
|
![]() |
![]() |
![]() |
#14 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85000000
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
![]() |
![]() |
![]() |
#15 |
Junior Member
![]() Posts: 1
Karma: 58
Join Date: Mar 2020
Device: kindle fire hd
|
Old thread but always handy if people are looking for this answer:
go to your calibre folder located @ C:\Users\%username%\AppData\Roaming\calibre open gui.py.json and search for"save_to_disk_template_history": [ you should find something like this: just delete the templates that you no longer need and restart calibre "save_to_disk_template_history": [ "{author_sort}/{title} - {authors}", "{author}/{title} - {Authors}", "{author}/{Series}/[{series_index:0>2s}-{Series}] - {title} - {Authors}", "{author}/{Series}/{series_index:0>2s}-{Series} - {title} - {Authors}", "{Author}/{Authors} - {title}", "{Authors}/{Authors} - {title} - [{Series} {series_index:0>2s}]", "{#mytag}/{Series}/{authors} - {title} - [{Series} {series_index:0>2s}]", "{Authors}/{Authors} - [{Series} {series_index:0>2s}] - {title}", "{author}", "{#mytag}/{Series}/{authors} - [{Series} {series_index:0>2s}] - {title}" |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with template language | Pepin33 | Calibre | 8 | 11-11-2012 09:32 AM |
Help with template | KALKITO | Library Management | 1 | 07-02-2012 03:54 PM |
Changes in template evaluation in V0.8.43 | chaley | Library Management | 1 | 03-16-2012 04:12 PM |
Template help needed | Soxendom | Calibre | 2 | 01-05-2012 12:30 PM |
Delete files in PC not equal to delete in Sony reader 505 | sheilalayoli | Sony Reader | 5 | 07-12-2009 04:13 PM |