-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tuck1s
committed
Mar 3, 2020
1 parent
2d9d34b
commit 4008755
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# linktool | ||
Command-line tool to encode and decode link URLs, useful during testing. | ||
|
||
``` | ||
./linktool -h | ||
./linktool [encode|decode] encode and decode link URLs | ||
encode | ||
-action string | ||
[open|initial_open|click] (default "open") | ||
-message_id string | ||
message_id (default "0000123456789abcdef0") | ||
-rcpt_to string | ||
rcpt_to (default "any@example.com") | ||
-target_link_url string | ||
URL of your target link (default "https://example.com") | ||
-tracking_url string | ||
URL of your tracking service endpoint (default "http://localhost:8888") | ||
decode url | ||
``` | ||
|
||
Example: encode a URL | ||
``` | ||
./linktool encode -tracking_url http://localhost:8888 -rcpt_to fred@thetucks.com -action click -target_link_url https://thetucks.com -message_id 00000deadbeeff00d1337 | ||
http://localhost:8888/eJxUzLEOQiEMRuF3-WciGAaTTr4JwbaIUSKBMhnf_Ybxnv18P2Q2EBgOltb4gFDN-iTvraotfs8Lfxsc2nyml4AQdqJZHqqlhCDXGG9wGNw3VYbK_fT-jwAAAP__f2Mg1g== | ||
``` | ||
|
||
Decode a URL | ||
``` | ||
./linktool decode http://localhost:8888/eJxUzLEOQiEMRuF3-WciGAaTTr4JwbaIUSKBMhnf_Ybxnv18P2Q2EBgOltb4gFDN-iTvraotfs8Lfxsc2nyml4AQdqJZHqqlhCDXGG9wGNw3VYbK_fT-jwAAAP__f2Mg1g== | ||
JSON: {"act":"c","t_url":"https://thetucks.com","msg_id":"00000deadbeeff00d1337","rcpt":"fred@thetucks.com"} | ||
Equivalent to encode -tracking_url http://localhost:8888 -rcpt_to fred@thetucks.com -action click -target_link_url https://thetucks.com -message_id 00000deadbeeff00d1337 | ||
``` |