Using calibre from the command line
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Using calibre from the command line, in debian testing, how can I insert a tag with the syntax being
ebook-meta ebook_file --tags rhubarb
but for a range of files, but all by the same author so just need the tag of his/her name?
This is used for indexing and sorting out books on a Kindle.
shell command-line calibre
add a comment |
up vote
2
down vote
favorite
Using calibre from the command line, in debian testing, how can I insert a tag with the syntax being
ebook-meta ebook_file --tags rhubarb
but for a range of files, but all by the same author so just need the tag of his/her name?
This is used for indexing and sorting out books on a Kindle.
shell command-line calibre
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Using calibre from the command line, in debian testing, how can I insert a tag with the syntax being
ebook-meta ebook_file --tags rhubarb
but for a range of files, but all by the same author so just need the tag of his/her name?
This is used for indexing and sorting out books on a Kindle.
shell command-line calibre
Using calibre from the command line, in debian testing, how can I insert a tag with the syntax being
ebook-meta ebook_file --tags rhubarb
but for a range of files, but all by the same author so just need the tag of his/her name?
This is used for indexing and sorting out books on a Kindle.
shell command-line calibre
shell command-line calibre
edited Nov 20 at 22:27
Rui F Ribeiro
38.2k1475125
38.2k1475125
asked Sep 1 '13 at 4:31
boudiccas
143211
143211
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
The easiest way, assuming all the relevant files are in the same directory, is:
for f in *; do ebook-meta "$f" --tags rhubarb
If the files can be in various sub directories, use find
(this assumes that the only files in all sub directories are ebooks. Since this is likely not true, you should use something additional like -name "*.ebook"
or whatever extension your ebooks have):
find . -type f -exec ebook-meta '' --tags rhubarb ;
@ChrisDown argh, thanks, forgot the quotes which were the whole point of the answer.
– terdon♦
Sep 1 '13 at 14:32
@~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C @~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C Doesn't work, but I cant see why. Any ideas please?
– boudiccas
Sep 1 '13 at 15:11
find . -type f exec ebook-meta '' --tags wilbur-smith ; find: paths must precede expression: exec Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
– boudiccas
Sep 1 '13 at 15:12
There was a '-' missing before 'exec'.
– Dubu
Sep 1 '13 at 17:14
@user205787 as Dubu pointed out, I had forgotten the-
before-exec
, try again with the modified answer.
– terdon♦
Sep 1 '13 at 17:20
|
show 1 more comment
up vote
0
down vote
You must have the ebooks of an author in a directory. cd
to this directory an run:
for var in $(ls); do ebook-meta $var --tags rhubarb; done
if the filename has spaces, you must modify the IFS (Internal Field Separator):
oldIFS=$IFS
IFS='n'
for var in $(ls); do ebook-meta $var --tags rhubarb; done
IFS=$oldIFS
Or the same in a single command:
oldIFS=$IFS && IFS='n' && for var in $(ls); do ebook-meta $var --tags rhubarb; done && IFS=$oldIFS
Thanks for this but its not working, this is part of the puitput -
– boudiccas
Sep 1 '13 at 6:27
Thanks for this but its not working, this is part of the output - the output is too long for here but its at paste.debian.net/33088 . I think that theres some problem with the 'cli.py' module itself
– boudiccas
Sep 1 '13 at 6:36
4
NEVER parsels
, and twice never when working with file names that are likely to have spaces.
– terdon♦
Sep 1 '13 at 14:13
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
The easiest way, assuming all the relevant files are in the same directory, is:
for f in *; do ebook-meta "$f" --tags rhubarb
If the files can be in various sub directories, use find
(this assumes that the only files in all sub directories are ebooks. Since this is likely not true, you should use something additional like -name "*.ebook"
or whatever extension your ebooks have):
find . -type f -exec ebook-meta '' --tags rhubarb ;
@ChrisDown argh, thanks, forgot the quotes which were the whole point of the answer.
– terdon♦
Sep 1 '13 at 14:32
@~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C @~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C Doesn't work, but I cant see why. Any ideas please?
– boudiccas
Sep 1 '13 at 15:11
find . -type f exec ebook-meta '' --tags wilbur-smith ; find: paths must precede expression: exec Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
– boudiccas
Sep 1 '13 at 15:12
There was a '-' missing before 'exec'.
– Dubu
Sep 1 '13 at 17:14
@user205787 as Dubu pointed out, I had forgotten the-
before-exec
, try again with the modified answer.
– terdon♦
Sep 1 '13 at 17:20
|
show 1 more comment
up vote
2
down vote
The easiest way, assuming all the relevant files are in the same directory, is:
for f in *; do ebook-meta "$f" --tags rhubarb
If the files can be in various sub directories, use find
(this assumes that the only files in all sub directories are ebooks. Since this is likely not true, you should use something additional like -name "*.ebook"
or whatever extension your ebooks have):
find . -type f -exec ebook-meta '' --tags rhubarb ;
@ChrisDown argh, thanks, forgot the quotes which were the whole point of the answer.
– terdon♦
Sep 1 '13 at 14:32
@~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C @~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C Doesn't work, but I cant see why. Any ideas please?
– boudiccas
Sep 1 '13 at 15:11
find . -type f exec ebook-meta '' --tags wilbur-smith ; find: paths must precede expression: exec Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
– boudiccas
Sep 1 '13 at 15:12
There was a '-' missing before 'exec'.
– Dubu
Sep 1 '13 at 17:14
@user205787 as Dubu pointed out, I had forgotten the-
before-exec
, try again with the modified answer.
– terdon♦
Sep 1 '13 at 17:20
|
show 1 more comment
up vote
2
down vote
up vote
2
down vote
The easiest way, assuming all the relevant files are in the same directory, is:
for f in *; do ebook-meta "$f" --tags rhubarb
If the files can be in various sub directories, use find
(this assumes that the only files in all sub directories are ebooks. Since this is likely not true, you should use something additional like -name "*.ebook"
or whatever extension your ebooks have):
find . -type f -exec ebook-meta '' --tags rhubarb ;
The easiest way, assuming all the relevant files are in the same directory, is:
for f in *; do ebook-meta "$f" --tags rhubarb
If the files can be in various sub directories, use find
(this assumes that the only files in all sub directories are ebooks. Since this is likely not true, you should use something additional like -name "*.ebook"
or whatever extension your ebooks have):
find . -type f -exec ebook-meta '' --tags rhubarb ;
edited Sep 1 '13 at 17:19
Dubu
2,3661122
2,3661122
answered Sep 1 '13 at 14:17
terdon♦
126k31243418
126k31243418
@ChrisDown argh, thanks, forgot the quotes which were the whole point of the answer.
– terdon♦
Sep 1 '13 at 14:32
@~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C @~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C Doesn't work, but I cant see why. Any ideas please?
– boudiccas
Sep 1 '13 at 15:11
find . -type f exec ebook-meta '' --tags wilbur-smith ; find: paths must precede expression: exec Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
– boudiccas
Sep 1 '13 at 15:12
There was a '-' missing before 'exec'.
– Dubu
Sep 1 '13 at 17:14
@user205787 as Dubu pointed out, I had forgotten the-
before-exec
, try again with the modified answer.
– terdon♦
Sep 1 '13 at 17:20
|
show 1 more comment
@ChrisDown argh, thanks, forgot the quotes which were the whole point of the answer.
– terdon♦
Sep 1 '13 at 14:32
@~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C @~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C Doesn't work, but I cant see why. Any ideas please?
– boudiccas
Sep 1 '13 at 15:11
find . -type f exec ebook-meta '' --tags wilbur-smith ; find: paths must precede expression: exec Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
– boudiccas
Sep 1 '13 at 15:12
There was a '-' missing before 'exec'.
– Dubu
Sep 1 '13 at 17:14
@user205787 as Dubu pointed out, I had forgotten the-
before-exec
, try again with the modified answer.
– terdon♦
Sep 1 '13 at 17:20
@ChrisDown argh, thanks, forgot the quotes which were the whole point of the answer.
– terdon♦
Sep 1 '13 at 14:32
@ChrisDown argh, thanks, forgot the quotes which were the whole point of the answer.
– terdon♦
Sep 1 '13 at 14:32
@~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C @~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C Doesn't work, but I cant see why. Any ideas please?
– boudiccas
Sep 1 '13 at 15:11
@~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C @~/kindle-backup/34-wilbur-smith-Kindle-Collection]$ [9570]>; for f in *; do ebook-meta "$f" --tags wilbur-smith > ^C Doesn't work, but I cant see why. Any ideas please?
– boudiccas
Sep 1 '13 at 15:11
find . -type f exec ebook-meta '' --tags wilbur-smith ; find: paths must precede expression: exec Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
– boudiccas
Sep 1 '13 at 15:12
find . -type f exec ebook-meta '' --tags wilbur-smith ; find: paths must precede expression: exec Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
– boudiccas
Sep 1 '13 at 15:12
There was a '-' missing before 'exec'.
– Dubu
Sep 1 '13 at 17:14
There was a '-' missing before 'exec'.
– Dubu
Sep 1 '13 at 17:14
@user205787 as Dubu pointed out, I had forgotten the
-
before -exec
, try again with the modified answer.– terdon♦
Sep 1 '13 at 17:20
@user205787 as Dubu pointed out, I had forgotten the
-
before -exec
, try again with the modified answer.– terdon♦
Sep 1 '13 at 17:20
|
show 1 more comment
up vote
0
down vote
You must have the ebooks of an author in a directory. cd
to this directory an run:
for var in $(ls); do ebook-meta $var --tags rhubarb; done
if the filename has spaces, you must modify the IFS (Internal Field Separator):
oldIFS=$IFS
IFS='n'
for var in $(ls); do ebook-meta $var --tags rhubarb; done
IFS=$oldIFS
Or the same in a single command:
oldIFS=$IFS && IFS='n' && for var in $(ls); do ebook-meta $var --tags rhubarb; done && IFS=$oldIFS
Thanks for this but its not working, this is part of the puitput -
– boudiccas
Sep 1 '13 at 6:27
Thanks for this but its not working, this is part of the output - the output is too long for here but its at paste.debian.net/33088 . I think that theres some problem with the 'cli.py' module itself
– boudiccas
Sep 1 '13 at 6:36
4
NEVER parsels
, and twice never when working with file names that are likely to have spaces.
– terdon♦
Sep 1 '13 at 14:13
add a comment |
up vote
0
down vote
You must have the ebooks of an author in a directory. cd
to this directory an run:
for var in $(ls); do ebook-meta $var --tags rhubarb; done
if the filename has spaces, you must modify the IFS (Internal Field Separator):
oldIFS=$IFS
IFS='n'
for var in $(ls); do ebook-meta $var --tags rhubarb; done
IFS=$oldIFS
Or the same in a single command:
oldIFS=$IFS && IFS='n' && for var in $(ls); do ebook-meta $var --tags rhubarb; done && IFS=$oldIFS
Thanks for this but its not working, this is part of the puitput -
– boudiccas
Sep 1 '13 at 6:27
Thanks for this but its not working, this is part of the output - the output is too long for here but its at paste.debian.net/33088 . I think that theres some problem with the 'cli.py' module itself
– boudiccas
Sep 1 '13 at 6:36
4
NEVER parsels
, and twice never when working with file names that are likely to have spaces.
– terdon♦
Sep 1 '13 at 14:13
add a comment |
up vote
0
down vote
up vote
0
down vote
You must have the ebooks of an author in a directory. cd
to this directory an run:
for var in $(ls); do ebook-meta $var --tags rhubarb; done
if the filename has spaces, you must modify the IFS (Internal Field Separator):
oldIFS=$IFS
IFS='n'
for var in $(ls); do ebook-meta $var --tags rhubarb; done
IFS=$oldIFS
Or the same in a single command:
oldIFS=$IFS && IFS='n' && for var in $(ls); do ebook-meta $var --tags rhubarb; done && IFS=$oldIFS
You must have the ebooks of an author in a directory. cd
to this directory an run:
for var in $(ls); do ebook-meta $var --tags rhubarb; done
if the filename has spaces, you must modify the IFS (Internal Field Separator):
oldIFS=$IFS
IFS='n'
for var in $(ls); do ebook-meta $var --tags rhubarb; done
IFS=$oldIFS
Or the same in a single command:
oldIFS=$IFS && IFS='n' && for var in $(ls); do ebook-meta $var --tags rhubarb; done && IFS=$oldIFS
edited Sep 1 '13 at 5:29
answered Sep 1 '13 at 5:03
mavillan
1,42441525
1,42441525
Thanks for this but its not working, this is part of the puitput -
– boudiccas
Sep 1 '13 at 6:27
Thanks for this but its not working, this is part of the output - the output is too long for here but its at paste.debian.net/33088 . I think that theres some problem with the 'cli.py' module itself
– boudiccas
Sep 1 '13 at 6:36
4
NEVER parsels
, and twice never when working with file names that are likely to have spaces.
– terdon♦
Sep 1 '13 at 14:13
add a comment |
Thanks for this but its not working, this is part of the puitput -
– boudiccas
Sep 1 '13 at 6:27
Thanks for this but its not working, this is part of the output - the output is too long for here but its at paste.debian.net/33088 . I think that theres some problem with the 'cli.py' module itself
– boudiccas
Sep 1 '13 at 6:36
4
NEVER parsels
, and twice never when working with file names that are likely to have spaces.
– terdon♦
Sep 1 '13 at 14:13
Thanks for this but its not working, this is part of the puitput -
– boudiccas
Sep 1 '13 at 6:27
Thanks for this but its not working, this is part of the puitput -
– boudiccas
Sep 1 '13 at 6:27
Thanks for this but its not working, this is part of the output - the output is too long for here but its at paste.debian.net/33088 . I think that theres some problem with the 'cli.py' module itself
– boudiccas
Sep 1 '13 at 6:36
Thanks for this but its not working, this is part of the output - the output is too long for here but its at paste.debian.net/33088 . I think that theres some problem with the 'cli.py' module itself
– boudiccas
Sep 1 '13 at 6:36
4
4
NEVER parse
ls
, and twice never when working with file names that are likely to have spaces.– terdon♦
Sep 1 '13 at 14:13
NEVER parse
ls
, and twice never when working with file names that are likely to have spaces.– terdon♦
Sep 1 '13 at 14:13
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f89033%2fusing-calibre-from-the-command-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown