Skip to content

Commit 990da58

Browse files
committed
Merge branch 'develop'
2 parents 6128c8e + 45078eb commit 990da58

38 files changed

+1890
-1386
lines changed

.env.production.sample

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Bug report
3-
about: Create a report to help improve asciinema
3+
about: Create a report to help improve asciinema server
44
title: ''
55
labels: ''
66
assignees: ''
@@ -9,11 +9,13 @@ assignees: ''
99

1010
To make life of the project maintainers easier please submit bug reports only.
1111

12-
This is bug tracker for asciinema server. If your issue seems to be with another component (cli recorder, js player) then open an issue in related repository. If you're experiencing issue with asciinema server running at asciinema.org then contact admin@asciinema.org.
12+
This is a bug tracker for asciinema server.
13+
If your issue seems to be with another component (cli recorder, js player) then open an issue in related repository.
14+
If you're experiencing issue with asciinema server instance running at asciinema.org, contact admin@asciinema.org.
1315

14-
Ideas, feature requests, help requests, questions and general discussions should be discussed in project's Discussions instead: https://github.com/orgs/asciinema/discussions
16+
Ideas, feature requests, help requests, questions and general discussions should be discussed on the forum: https://discourse.asciinema.org
1517

16-
If you think you've found a bug or regression, go ahead and delete this message and fill in the details below.
18+
If you think you've found a bug or regression, go ahead, delete this message, then fill in the details below.
1719

1820
-----
1921

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ npm-debug.log
4747
.iex-history
4848
.m2
4949
.projectile
50-
/.env
51-
/.env.production
5250
/.vagrant
5351
/config/custom.exs
5452
/priv/native

README.md

Lines changed: 46 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,69 @@
1-
# asciinema web app
1+
# asciinema server
22

3-
asciinema is a free and open source solution for recording terminal sessions
4-
and sharing them on the web.
3+
__asciinema server__ is a server-side component of the asciinema ecosystem.
54

6-
This repository contains the source code of asciinema hosting web app, which
7-
runs at [asciinema.org](https://asciinema.org).
5+
It implements a hosting platform for terminal session recordings. This includes
6+
an API endpoint for uploading recordings, which is used by the [asciinema
7+
CLI](https://docs.asciinema.org/manual/cli/), and offers a familiar web
8+
interface for viewing, browsing, sharing and managing recordings.
89

9-
You can find the source code of asciinema terminal recorder
10-
at [asciinema/asciinema](https://github.com/asciinema/asciinema), and the source
11-
code of asciinema web player
12-
at [asciinema/asciinema-player](https://github.com/asciinema/asciinema-player).
10+
The server is built with [Elixir language](https://elixir-lang.org/) and
11+
[Phoenix framework](https://www.phoenixframework.org/), and embeds asciinema's
12+
virtual terminal, [avt](https://github.com/asciinema/avt), to perform tasks such
13+
as preview generation and recording analysis.
1314

14-
## Setting up your own asciinema web app instance
15-
16-
asciinema terminal recorder uses [asciinema.org](https://asciinema.org) as its
17-
default host for the recordings. It's free, public service (all uploaded
18-
recordings are __private by default__ though).
15+
[asciinema.org](https://asciinema.org) is a public asciinema server instance
16+
managed by the asciinema team, offering free hosting for terminal recordings,
17+
available to everyone. Check [asciinema.org/about](https://asciinema.org/about)
18+
to learn more about this instance.
1919

20+
You can easily [self-host asciinema
21+
server](https://docs.asciinema.org/manual/server/self-hosting/) and use the
22+
[asciinema CLI](https://docs.asciinema.org/manual/cli/) with your own instance.
2023
If you're not comfortable with uploading your terminal sessions to
21-
asciinema.org, or your company's policy prevents you from doing that, you can
22-
set up your own instance for private use. See
23-
our [asciinema server install guide](https://github.com/asciinema/asciinema-server/wiki/Installation-guide).
24+
asciinema.org, if your company policy prevents you from doing so, or if you
25+
simply prefer self-hosting everything, then asciinema has you covered.
2426

25-
Once you have your instance running, point asciinema recorder to it by setting
26-
API URL in `~/.config/asciinema/config` file as follows:
27+
Notable features:
2728

28-
```ini
29-
[api]
30-
url = https://your.asciinema.host
31-
```
29+
- hosting of terminal session recordings in
30+
[asciicast](https://docs.asciinema.org/manual/asciicast/v2/) format,
31+
- perfectly integrated [asciinema
32+
player](https://docs.asciinema.org/manual/player/) for best viewing experience,
33+
- easy [sharing](https://docs.asciinema.org/manual/server/sharing/) of
34+
recordings via secret links,
35+
- easy [embedding](https://docs.asciinema.org/manual/server/embedding/) of the
36+
player, or linking via preview images (SVG),
37+
- privacy friendly - no tracking, no ads,
38+
- visibility control for recordings: unlisted (secret) or public,
39+
- editable recording metadata like title or long description (Markdown),
40+
- configurable terminal themes and font families,
41+
- ability to download pure text version (`.txt`) of a recording.
3242

33-
Alternatively, you can set `ASCIINEMA_API_URL` environment variable:
43+
Refer to [asciinema server docs](https://docs.asciinema.org/manual/server/) for
44+
further details.
3445

35-
ASCIINEMA_API_URL=https://your.asciinema.host asciinema rec
46+
## Donations
3647

37-
## Security
48+
Sustainability of asciinema development relies on donations and sponsorships.
3849

39-
Security of this web app and user data it manages is important.
40-
If you find anything that looks like a potential vulnerability please
41-
read on
42-
[how to report a security issue](https://github.com/asciinema/asciinema-server/blob/main/CONTRIBUTING.md#reporting-security-issues).
50+
Please help the software project you use and love. Become a
51+
[supporter](https://docs.asciinema.org/donations/#individuals) or a [corporate
52+
sponsor](https://docs.asciinema.org/donations/#corporate-sponsorship).
4353

44-
## Sponsors
54+
asciinema is sponsored by:
4555

4656
- [Brightbox](https://www.brightbox.com/)
4757

4858
## Consulting
4959

50-
I offer consulting services for asciinema project. See https://asciinema.org/consulting for more information.
51-
52-
## Contributing
53-
54-
Check out our [Contributing](http://asciinema.org/contributing) page, which
55-
describes multiple ways you can help this project.
56-
57-
If you decide to contribute with the code then please
58-
read [CONTRIBUTING.md](https://github.com/asciinema/asciinema-server/blob/main/CONTRIBUTING.md), which covers submitting bugs,
59-
requesting new features, preparing your code for a pull request, etc.
60-
61-
## Authors
62-
63-
asciinema is developed by [Marcin Kulik](http://ku1ik.com) with the help of
64-
many great open source contributors.
65-
66-
For a complete list of the many individuals that contributed to the project,
67-
please refer to
68-
[GitHub's list of contributors](https://github.com/asciinema/asciinema-server/contributors).
60+
If you're interested in hosting, maintenance or customization of asciinema
61+
server, check [asciinema consulting
62+
services](https://docs.asciinema.org/consulting/).
6963

7064
## Copyright
7165

7266
© 2011 Marcin Kulik.
7367

74-
All code is licensed under the Apache License, Version 2.0. See LICENSE file for details.
68+
All code is licensed under the Apache License, Version 2.0. See LICENSE file for
69+
details.

assets/css/_user_login.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
width: 250px;
44
margin-right: 10px;
55
}
6+
7+
.hpf-wrapper {
8+
position: absolute;
9+
left: -9999px;
10+
}
611
}
712

813
.username-form {

assets/js/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ $(function() {
1919
if ($('meta[name=referrer][content=origin]').length > 0) {
2020
$('a[href*=http]').attr('rel', 'noreferrer');
2121
}
22+
23+
document.querySelectorAll('#download-txt').forEach(link => {
24+
link.addEventListener('click', () => {
25+
link.href = window.location.origin + window.location.pathname + '.txt';
26+
})
27+
});
2228
});
2329

2430

config/runtime.exs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,24 @@ if config_env() in [:prod, :dev] do
184184
config :asciinema, Asciinema.PngGenerator.Rsvg, font_family: rsvg_font_family
185185
end
186186

187-
if gc_days = env.("ASCIICAST_GC_DAYS") do
188-
config :asciinema, :asciicast_gc_days, String.to_integer(gc_days)
187+
if limit = env.("UPLOAD_SIZE_LIMIT") do
188+
config :asciinema, AsciinemaWeb.Plug.Parsers.MULTIPART, length: String.to_integer(limit)
189+
end
190+
191+
if ttls = env.("UNCLAIMED_RECORDING_TTL") do
192+
ttls =
193+
case String.split(ttls, ",", parts: 2) do
194+
[hide_ttl] ->
195+
[hide: String.to_integer(hide_ttl)]
196+
197+
[delete_ttl, delete_ttl] ->
198+
[delete: String.to_integer(delete_ttl)]
199+
200+
[hide_ttl, delete_ttl] ->
201+
[hide: String.to_integer(hide_ttl), delete: String.to_integer(delete_ttl)]
202+
end
203+
204+
config :asciinema, :unclaimed_recording_ttl, ttls
189205
end
190206

191207
if String.downcase("#{env.("CRON")}") in ["0", "false", "no"] do

docker-compose.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)