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§
- send_
files_ to_ kindle - Parameters:username: The amazon username as strpassword: The amazon password as strfiles: A list of files to be uploaded as String Vecfile_timeout: Seconds assigned to each file before uploading times outurl: The amazon url to be useddaemon: Whether to run the geckodriver daemon or not. If not, it will have to be run externallydebugging_mode: For development purposes, enables GUI on the browser, does not send the files and prompts for user input to end the processDescription: Send the files to the kindle app and devices associated with the username and password amazon accountNotes: 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.
- send_
to_ kindle - Parameters:username: The amazon username as strpassword: The amazon password as strf: A path to a file or directory to be uploaded as strext: A file format extension to filter the files to be uploaded as strfile_timeout: Seconds assigned to each file before uploading times outurl: The amazon url to be useddaemon: Whether to run the geckodriver daemon or not. If not, it will have to be run externallydebugging_mode: For development purposes, enables GUI on the browser, does not send the files and prompts for user input to end the processDescription: Send the files to the kindle app and devices associated with the username and password amazon accountNotes: 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