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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
# git-permalink
Git extension to generate web permalinks of files in a repository.
It knows about many of the existing code forges, but allows for URL
template overrides to be used on custom domains or deployments via git
config.
## Usage
```shell
# setup example "remembering" repository
$ git clone git://euandreh.xyz/remembering
$ cd remembering/
```
Now inside the repository folder, running `git permalink` will try build the web URL of the given file use `xdg-open` to launch the browser (or whatever is configured):
```shell
$ git permalink tests/ranking.sh
Opening https://git.euandreh.xyz/remembering/tree/tests/ranking.sh?id=44533e2df144e7749a382e298aea53ca11a2239e
$ git permalink tests/ranking.sh 23
Opening https://git.euandreh.xyz/remembering/tree/tests/ranking.sh?id=44533e2df144e7749a382e298aea53ca11a2239e#n23
```
Or if you just want to output the link without invoking `xdg-open`, you can use the `-p` flag:
```shell
$ git permalink -p tests/ranking.sh 23
https://git.euandreh.xyz/remembering/tree/tests/ranking.sh?id=44533e2df144e7749a382e298aea53ca11a2239e#n23
```
## Installation
```shell
$ make
$ [sudo] make install
```
You can pass `PREFIX` or `DESTDIR` to `make` if you'd like:
```shell
$ make PREFIX=$HOME/.local
$ make PREFIX=$HOME/.local install
```
There are no dependencies or requirements, only standard tools such as
`sed`, `mkdir`, etc.
## Documentation
The documentation is available via installed manpages or online: [`git-permalink.1`] ([pt], [fr], [eo]).
[`git-permalink.1`]: https://euandreh.xyz/git-permalink/en/git-permalink.1.html
[pt]: https://euandreh.xyz/git-permalink/pt/git-permalink.1.html
[fr]: https://euandreh.xyz/git-permalink/fr/git-permalink.1.html
[eo]: https://euandreh.xyz/git-permalink/eo/git-permalink.1.html
## Contributing
Extra tools used for development are:
- [ShellCheck] for validating scripts;
- [po4a] and [gettext] for i18n and l10n support;
- [pandoc] and Perl for generating the documentation HTML and website.
[ShellCheck]: https://www.shellcheck.net/
[po4a]: https://po4a.org/index.php.en
[gettext]: https://www.gnu.org/software/gettext/
[pandoc]: https://pandoc.org/
For running the extra development-only checks, run:
```shell
$ make dev-check
```
and for generating the documentation HTML and website, run:
```shell
$ make public
```
Send contributions to the [mailing list] via [`git send-email`](https://git-send-email.io/).
## Links
- [homepage](https://euandreh.xyz/git-permalink/)
- [source code](https://git.euandreh.xyz/git-permalink/)
- [bug tracking](https://euandreh.xyz/git-permalink/TODOs.html)
- [mailing list]
- [CI logs](https://euandreh.xyz/git-permalink/ci.html)
- [CHANGELOG](https://euandreh.xyz/git-permalink/CHANGELOG.html)
[mailing list]: https://lists.sr.ht/~euandreh/public-inbox?search=%5Bgit-permalink%5D
## Releases
- [v0.2.2](https://git.euandreh.xyz/git-permalink/commit/?id=v0.2.2) [git-permalink-v0.2.2.tar.gz](https://git.euandreh.xyz/git-permalink/snapshot/git-permalink-v0.2.2.tar.gz) ([sig](https://git.euandreh.xyz/git-permalink/snapshot/git-permalink-v0.2.2.tar.gz.asc)), released in 2021-06-25
- [v0.2.1](https://git.euandreh.xyz/git-permalink/commit/?id=v0.2.1) [git-permalink-v0.2.1.tar.gz](https://git.euandreh.xyz/git-permalink/snapshot/git-permalink-v0.2.1.tar.gz) ([sig](https://git.euandreh.xyz/git-permalink/snapshot/git-permalink-v0.2.1.tar.gz.asc)), released in 2021-06-25
- [v0.2.0](https://git.euandreh.xyz/git-permalink/commit/?id=v0.2.0) [git-permalink-v0.2.0.tar.gz](https://git.euandreh.xyz/git-permalink/snapshot/git-permalink-v0.2.0.tar.gz) ([sig](https://git.euandreh.xyz/git-permalink/snapshot/git-permalink-v0.2.0.tar.gz.asc)), released in 2021-06-19
- [v0.1.0](https://git.euandreh.xyz/git-permalink/commit/?id=v0.1.0) [git-permalink-v0.1.0.tar.gz](https://git.euandreh.xyz/git-permalink/snapshot/git-permalink-v0.1.0.tar.gz) ([sig](https://git.euandreh.xyz/git-permalink/snapshot/git-permalink-v0.1.0.tar.gz.asc)), released in 2021-06-13
## License
The code is licensed under [GNU Affero General Public License v3.0 or later][AGPL-3.0-or-later] (AGPL-3.0-or-later).
[AGPL-3.0-or-later]: https://git.euandreh.xyz/git-permalink/tree/COPYING
|