Skip to content

Send a file to your kindle in a single command.

Notifications You must be signed in to change notification settings

leecade/send2kindle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

send to kindle

Send a file to your kindle in a single command.

Installation

npm i -g s2k

Alternatively, you can run it with npx:

npx s2k ...

Or, you can run it with bunx:

bunx s2k ...

Usage

s2k <file> [-t | --title] [-a | --author]

S2K_COOKIE='session-id=...' s2k <file> [-t | --title] [-a | --author]

Note: You can set the environment variable S2K_COOKIE with a bash alias to avoid passing the cookie every time.

alias s2k='S2K_COOKIE="session-id=..." s2k $1'

How to get the cookie

  1. Visit https://www.amazon.com/ and sign in to your account.

  2. Open the Chrome DevTools, go to Application > Storage > Cookies, and find the following cookie names:

    • session-id
    • session-token
    • aws-ubid-main
    • x-main
    • at-main
    • ubid-main

    Copy the values of these cookies and paste them into the S2K_COOKIE environment variable, like this:

    session-id=xxx; session-token=xxx; aws-ubid-main=xxx; x-main=xxx; at-main=xxx; ubid-main=xxx;
    

Note: Please don't worry, I will not keep or upload your cookies.

About

Send a file to your kindle in a single command.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published