![]() |
#1 |
New York Editor
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
|
Macros for tag additions?
If this capability already exists, a pointer is welcome. It won't be the first time I've missed something under my nose.
When importing volumes to Calibre, they often have tags already defined. But sometimes they don't, and the user must create them. (Or add tags they prefer to those predefined.) One capability I'd find useful is short macros that expand to longer lists. For instance, I have an assortment of SF stories that were originally published in Galaxy Magazine in the 1950's. The copyrights expired, and the stories have been appearing on Project Gutenberg. The standard tag set I apply to these is "Fiction, General, Science Fiction, Short Fiction, Galaxy Magazine". I'm getting enough that a short way of entering that tag set would be a boon. My thought was a macro, specified with a leading character like @. So @GalMag entered in the Tags field might expand to the tag set above when Calibre processes the entry. There would need to be a macro editor to allow creation, listing, modification, and deletion of tag sets. Does this seem doable and worth doing? ______ Dennis |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
While there is no macro functionality, you can achieve it indirectly ina couple of ways
1) You can create an empty book record witht he standard metadata you want, then use the merge book records function in calibre to copy it from the standard record to the new one 2) You can use a keyboard manager like autohotkey to define macros outside for use in calibre. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | ||
New York Editor
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
|
Quote:
Quote:
Ultimately, I'm looking at saving time in entering standard tag sets, so simplest solution wins. ______ Dennis |
||
![]() |
![]() |
![]() |
#4 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,055
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
calibredb set_metadata [options] id [/path/to/metadata.opf Code:
calibredb add [options] file1 file2 file3 ... |
|
![]() |
![]() |
![]() |
#5 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 309
Karma: 1645952
Join Date: Jun 2012
Device: none
|
One cheap and easy way to do this would be to have a "dummy" text file in Calibre. In the body of the text put your tag sets. Now it's just a matter of copy and paste.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
New York Editor
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
|
Quote:
______ Dennis |
|
![]() |
![]() |
![]() |
#7 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 309
Karma: 1645952
Join Date: Jun 2012
Device: none
|
Quote:
A number of people have recommended having such a dummy file in Calibre for several purposes, including a placeholder for tags that aren't being used by any other books yet. I use one to store odd formats for configuring the Open With plugin. Funnily enough, most of these ideas don't really have any use for the actual contents of the file, which is what gave me the idea of using it for copy/paste snippets. By the way, I prefer Notepad++. ![]() |
|
![]() |
![]() |
![]() |
#8 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 137
Karma: 2156958
Join Date: Jan 2013
Device: Too many random androids to list
|
You could probably do it quickly with the tag mapper. I use it as a sort of text-expansion macro quite often.
Something like tag them all "galmag" as you add them (you can do that automatically, just change the "tags to add on newly imported books" while you're working), and then have the tag mapper replace "galmag" with "Fiction, General, Science Fiction, Short Fiction, Galaxy Magazine" If you add the tag mapper button to a toolbar, then simply opening it and hitting OK will apply all the mapping rules to currently visible books. |
![]() |
![]() |
![]() |
#9 | |||
New York Editor
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
|
Quote:
Quote:
Quote:
If I really want everything including the kitchen sink in an editor, I have Gnu Emacs installed as well. ![]() ______ Dennis |
|||
![]() |
![]() |
![]() |
#10 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 309
Karma: 1645952
Join Date: Jun 2012
Device: none
|
Quote:
Too bad. I don't use either. ![]() |
|
![]() |
![]() |
![]() |
#11 | ||
New York Editor
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
|
Quote:
![]() Quote:
______ Dennis |
||
![]() |
![]() |
![]() |
#12 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Nonreligious: I can't think why anyone would use vi when vim exists.
![]() |
![]() |
![]() |
![]() |
#13 |
New York Editor
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
|
|
![]() |
![]() |
![]() |
#14 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 137
Karma: 2156958
Join Date: Jan 2013
Device: Too many random androids to list
|
All vi is good for is learning to type :wq! really fast, before you accidentally press something else and break your file. Or cause a singularity or trigger the inevitable zombie apocalypse or something worse.
Did you see my tip above about the built in calibre tag mapper? It really does work very well as a macro expander. |
![]() |
![]() |
![]() |
#15 | ||
New York Editor
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
|
Quote:
![]() Quote:
______ Dennis |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
FLP additions? | John F | General Discussions | 20 | 07-07-2015 04:02 PM |
Possible Additions? | ParadiseLost | Calibre | 1 | 03-30-2013 02:01 AM |
Dictionary additions | kamanza | Sigil | 1 | 08-19-2012 04:39 PM |
Macros | obsidianchao | Kindle Developer's Corner | 0 | 07-13-2011 07:42 PM |
iLiad Toolbar changes and additions | M@rcel | iRex Developer's Corner | 2 | 09-04-2008 01:18 PM |