Expand description

Send to Kindle

send-to-kindle is a command-line utility and rust library for sending files to your kindle app or devices by (ab)using the www.amazon.com/sendtokindle web interface.

For this reason, it should be used with caution. Getting suspended by Amazon’s spam prevention systems is always a possibility. USE send-to-kindle AT YOUR OWN RISK!

Command-line tool basic usage

cargo run -- --username <username> --password <password> --directory <path_to_books>
--extension epub

The --directory flag can be swapped with the --file flag to just send a single file. If an extension is provided, it will ensure that the selected file has the requested extension.

For more info on the command-line utility and flags for corner cases, use the --help flag.

Library usage

Just two functions are provided: One for a list of strings representing the files to be uploaded (send_files_to_kindle), and one for a path to a file or directory that can be filtered using a string for the files’ extension (send_to_kindle). (epub, azw3, mobi etc).

For more info, click on each function’s definition and read the extensive documentation there.

Structs

Functions

  • Parameters:
  • username: The amazon username as str
  • password: The amazon password as str
  • files: A list of files to be uploaded as String Vec
  • file_timeout: Seconds assigned to each file before uploading times out
  • url: The amazon url to be used
  • daemon: Whether to run the geckodriver daemon or not. If not, it will have to be run externally
  • debugging_mode: For development purposes, enables GUI on the browser, does not send the files and prompts for user input to end the process
  • Description: Send the files to the kindle app and devices associated with the username and password amazon account
  • Notes: It is recommended to use the Args::default or Args::new functions to ensure some sane defaults and easier setup. Please note that the files vector of strings is not included in the Args struct and it is expected to be constructed separately.
  • Parameters:
  • username: The amazon username as str
  • password: The amazon password as str
  • f: A path to a file or directory to be uploaded as str
  • ext: A file format extension to filter the files to be uploaded as str
  • file_timeout: Seconds assigned to each file before uploading times out
  • url: The amazon url to be used
  • daemon: Whether to run the geckodriver daemon or not. If not, it will have to be run externally
  • debugging_mode: For development purposes, enables GUI on the browser, does not send the files and prompts for user input to end the process
  • Description: Send the files to the kindle app and devices associated with the username and password amazon account
  • Notes: It is recommended to use the Args::default or Args::new functions to ensure some sane defaults and easier setup. Please note that the f str should be selected either from the file or directory field of the Args struct. f is filtered based on the ext parameter and the a vector of strings is constructed and passed to send_files_to_kindle