- Download and pin books at https://read.amazon.com, and use epubor KCR converter to convert them into epubs.
- Download audio books at https://audible.com, with aax format.
- Obtain your activation bytes with the instruction of this post.
- Install ffmpeg with brew.
- Install audible-converter with npm. (File name will be extended automatically)
audible-converter "*.aax" -a <your-activation-bytes>
- Install atomicparsley with brew. (to add artwork to converted m4a files) Bash script to add artworks to m4a files:
for f in *.m4a
do
atomicparsley "$f" --artwork "${f//m4a/png}"
done
find . -type f \! -name “*temp*” -delete
for f in *.m4a
do
g=${f//-temp*./.}
mv "$f" "$g"
done
-
Install recoll on a remote vps(ubuntu). (aliyun problem:https://yq.aliyun.com/articles/392293)
-
Install recoll-webui python3 mod, with this guide.
-
Use rsync and crontab to sync local and remote server. (add local ~/.ssh/id_rsa.pub content to the server ~/.ssh/authorized_keys to use rsync in ctrontab.)
-
modify
/etc/hosts
. -
add custom search to alfred.
Python ipynb for download aax from audible.com programatially:
from selenium import webdriver
import random
import time
URL = "https://audible.com"
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--window-size=1920,1080')
chromedriver_path = '/usr/local/bin/chromedriver'
driver = webdriver.Chrome(chromedriver_path, options=chrome_options)
driver.get(URL)
time.sleep(random.randint(2,5))
def login():
driver.find_element_by_class_name("ui-it-sign-in-link ").click()
time.sleep(random.randint(2,5))
driver.find_element_by_id("ap_email").send_keys("<your-login-email-address>")
time.sleep(random.randint(2,5))
driver.find_element_by_id ("ap_password").send_keys("<your-password>")
time.sleep(random.randint(2,5))
driver.find_element_by_id("signInSubmit").click()
login()
time.sleep(random.randint(2,5))
driver.find_element_by_link_text("Library").click()
time.sleep(random.randint(2,5))
links = driver.find_elements_by_css_selector("a.bc-button-text")
# how many books do you want download?
import wget
book = 1
for i in range(0, book):
wget.download(links[i].get_attribute('href'))
print(links[i].get_attribute('href'))
print('done')
driver.close()
Shell script I use to convert aax:
#! /bin/bash
mkdir ~/Public/temp
mv ~/Downloads/*.aax ~/Public/temp
cd ~/Public/temp
echo $PWD
audible-converter "*.aax" -a <your-code-here>
for f in *.m4a
do
atomicparsley "$f" --artwork "${f//m4a/png}"
done
echo "deleting files not containing 'temp'..."
find . -type f \! -name "*temp*" -delete
echo "renaming files..."
for f in *.m4a
do
g=${f//-temp*./.}
mv "$f" "$g"
done
ls -a
echo "move *.m4a to ~/Dropbox/amazon-kindle-audible-files/m4a/ ..."
mv *.m4a ~/Dropbox/amazon-kindle-audible-files/m4a/
cd ~/
rm -rf ~/Public/temp
echo "Done!"
Saving time with finding ur code: https://audible-tools.github.io/