blob: 15915b13bd5e9bc9016ef562c179979f374b31bf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#+title: url-rewrite
#+author: Yuchen Pei
#+language: en
* Introduction
:PROPERTIES:
:UPDATED: [2023-10-30 Mon 21:45]
:END:
~url-rewrite~ is an elisp library for rewriting URLs. Usecases include
redirecting to an random alternative client (e.g. invidious and
nitter), removing tracking queries (e.g. utm parameters), replace a
link by its redirect url which is encoded in one of its queries,
converting a zoom link to a dial-in number, etc, etc.
* Usage
:PROPERTIES:
:UPDATED: [2023-10-30 Mon 21:41]
:END:
One way to use it would be utilising the collection of building block
functions for URL rewriting, like ~url-rw-replace-random-host~ and
~url-rw-remove-query~.
Another, more streamlined usage would be:
1. Declare rewriting rules in ~url-rw-rules~ (see
~url-rw-example-rules~ for example)
2. Then declare some ad-hoc rewriting functions and add them to
~url-rw-extra-rewriters~. An example is
~url-rw-example-zoom-to-dial~.
3. Eval ~(url-rw-refresh)~ to populate the rewrite function list
~url-rw-rewriters~.
4. The function ~url-rw~ can now be used on any url you wish to
rewrite.
* Copyright and contact
:PROPERTIES:
:UPDATED: [2023-10-30 Mon 21:39]
:END:
~url-rewrite~ is maintained by Yuchen Pei <id@ypei.org> and covered by
[[https://www.gnu.org/licenses/agpl-3.0.en.html][GNU AGPLv3+]]. You may find the license text in a file named
COPYING.agpl3 in the project tree. For comments, bug reports or
patches, please use the mailing list [[https://lists.sr.ht/~ycp/gym][~ycp/gym@lists.sr.ht]].
|