aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
Diffstat (limited to 'README.org')
-rw-r--r--README.org69
1 files changed, 66 insertions, 3 deletions
diff --git a/README.org b/README.org
index d6efc6d..a26be98 100644
--- a/README.org
+++ b/README.org
@@ -3,7 +3,7 @@
* Introduction
:PROPERTIES:
- :UPDATED: [2023-10-29 Sun 19:13]
+ :UPDATED: [2023-10-30 Mon 00:02]
:END:
Click trackers are recipient-specific links in email newsletters which
@@ -20,8 +20,71 @@ privacy risk for email recipients, by automatically sending a HEAD
request to all links and collecting the real urls, and at the time
when the recipient actually reads the mails, showing the real urls.
-This is a work in progress, and at this moment only the collection
-part has been implemented, for messages in maildirs.
+* Usage
+ :PROPERTIES:
+ :UPDATED: [2023-10-30 Mon 00:20]
+ :END:
+
+Add to load path and require.
+
+#+begin_src emacs-lisp
+(add-to-list 'load-path "~/.emacs.d/lisp/traclicker")
+(require 'traclicker)
+#+end_src
+
+Configure the maildir boxes (directories with =cur=, =new= and =tmp=
+sub-directories) and senders of emails you want to scan and replace
+click trackers with real links:
+
+#+begin_src emacs-lisp
+(setq tracli-senders '("info@some-org.com"
+ "newsletter@another-org.com"))
+(setq tracli-maildirs '("~/mail/Inbox" "~/mail/Archive"))
+#+end_src
+
+You are ready for an initial scan now. To do an initial scan of all
+mails in these maildirs by these senders, do ~M-x tracli-scan~.
+
+To do an initial scan of emails from say the past 30 days, eval
+
+#+begin_src emacs-lisp
+(tracli-scan
+ (format "%d"
+ (- (string-to-number (format-time-string "%s" (current-time)))
+ (* 60 60 24 30))))
+#+end_src
+
+Or to do a symbolic scan of emails, i.e. just initialise an empty
+database with the current time stamp for future scans, do
+
+#+begin_src emacs-lisp
+(tracli-scan (format-time-string "%s" (current-time)))
+#+end_src
+
+You now have a database at ~tracli-db-file~. You can then run
+~tracli-scan~ periodically
+
+#+begin_src emacs-lisp
+(setq my-tracli-timer
+ (run-at-time
+ "07:00am"
+ 86400 #'tracli-scan))
+#+end_src
+
+or as a hook after running say ~gnus-group-get-new-news~
+
+#+begin_src emacs-lisp
+(add-hook 'gnus-after-getting-new-news-hook #'tracli-scan)
+#+end_src
+
+Whenever you view a mail containing click trackers in the traclicker
+database, run ~M-x tracli-wash-gnus-article~ (by default bound to ~v
+t~ in gnus-summary-mode or gnus-article-mode), and all the click
+tracker urls are replaced by the real urls!
+
+Note that the real urls may still contain tracking query parts like
+utm parameters, but the cleaning of these urls by hand is feasible,
+and a package that does so belongs to a separate project :D
* Copyright and contact
:PROPERTIES: