Skip to content

Instantly share code, notes, and snippets.

@6uclz1
Created March 12, 2018 14:02
Show Gist options
  • Save 6uclz1/731734f22bea57b6a75f8cbf934959b8 to your computer and use it in GitHub Desktop.
Save 6uclz1/731734f22bea57b6a75f8cbf934959b8 to your computer and use it in GitHub Desktop.
Kindle for Mac の電子書籍を epub に変換するスクリプト
#/bin/bash
# Kindle for Mac の電子書籍を epub に変換するスクリプト
# 参考 https://qiita.com/mgoldchild/items/165f63bc2e006c81bf58
# 'brew cask install calibre' でインストール推奨
IFS=$'\n'
for azw_files in `\find $HOME/Library/Application\ Support/Kindle/My\ Kindle\ Content -type f -name '*.azw'`; do
echo $azw_files
calibredb add $azw_files
done
for calibre_files in `\find $HOME/Calibre\ Library -type f -name '*.azw3'`; do
echo $calibre_files
ebook-convert $calibre_files $HOME/Calibre\ Library/converted/${calibre_files##*/}.epub
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment