I don't think calibredb can do it natively and I don't know how to do it in the windows cmd line. However, a simple python script can convert the output to a comma separated list.
To use it:
- Put this script in some file such as newlines_to_commas.py
Code:
import sys
ans = []
for line in sys.stdin:
ans.append(line.strip())
print(','.join(ans[1:]))
- Run your command storing the output into a file.
Code:
calibredb list -f id --with-library "C:\Users\Dirk\Calibre-Bibliothek" --search 'date:<10daysago' > file_with_newlines.txt
- Run the script. If you don't have python installed then use calibre-debug as the python interpreter.
Code:
calibre-debug newlines_to_commas.py < file_with_newlines.txt > file_without_newlines.txt
If you have python installed then use
Code:
python newlines_to_commas.py < file_with_newlines.txt > file_without_newlines.txt
- The comma-separated list is now in file_without_newlines.txt