Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Feb 3, 2024
2 parents 6128c8e + 45078eb commit 990da58
Show file tree
Hide file tree
Showing 38 changed files with 1,890 additions and 1,386 deletions.
56 changes: 0 additions & 56 deletions .env.production.sample

This file was deleted.

10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help improve asciinema
about: Create a report to help improve asciinema server
title: ''
labels: ''
assignees: ''
Expand All @@ -9,11 +9,13 @@ assignees: ''

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

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 [email protected].
This is a 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 instance running at asciinema.org, contact [email protected].

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

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

-----

Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ npm-debug.log
.iex-history
.m2
.projectile
/.env
/.env.production
/.vagrant
/config/custom.exs
/priv/native
Expand Down
97 changes: 46 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,69 @@
# asciinema web app
# asciinema server

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

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

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

## Setting up your own asciinema web app instance

asciinema terminal recorder uses [asciinema.org](https://asciinema.org) as its
default host for the recordings. It's free, public service (all uploaded
recordings are __private by default__ though).
[asciinema.org](https://asciinema.org) is a public asciinema server instance
managed by the asciinema team, offering free hosting for terminal recordings,
available to everyone. Check [asciinema.org/about](https://asciinema.org/about)
to learn more about this instance.

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

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

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

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

ASCIINEMA_API_URL=https://your.asciinema.host asciinema rec
## Donations

## Security
Sustainability of asciinema development relies on donations and sponsorships.

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

## Sponsors
asciinema is sponsored by:

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

## Consulting

I offer consulting services for asciinema project. See https://asciinema.org/consulting for more information.

## Contributing

Check out our [Contributing](http://asciinema.org/contributing) page, which
describes multiple ways you can help this project.

If you decide to contribute with the code then please
read [CONTRIBUTING.md](https://github.com/asciinema/asciinema-server/blob/main/CONTRIBUTING.md), which covers submitting bugs,
requesting new features, preparing your code for a pull request, etc.

## Authors

asciinema is developed by [Marcin Kulik](http://ku1ik.com) with the help of
many great open source contributors.

For a complete list of the many individuals that contributed to the project,
please refer to
[GitHub's list of contributors](https://github.com/asciinema/asciinema-server/contributors).
If you're interested in hosting, maintenance or customization of asciinema
server, check [asciinema consulting
services](https://docs.asciinema.org/consulting/).

## Copyright

© 2011 Marcin Kulik.

All code is licensed under the Apache License, Version 2.0. See LICENSE file for details.
All code is licensed under the Apache License, Version 2.0. See LICENSE file for
details.
5 changes: 5 additions & 0 deletions assets/css/_user_login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
width: 250px;
margin-right: 10px;
}

.hpf-wrapper {
position: absolute;
left: -9999px;
}
}

.username-form {
Expand Down
6 changes: 6 additions & 0 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ $(function() {
if ($('meta[name=referrer][content=origin]').length > 0) {
$('a[href*=http]').attr('rel', 'noreferrer');
}

document.querySelectorAll('#download-txt').forEach(link => {
link.addEventListener('click', () => {
link.href = window.location.origin + window.location.pathname + '.txt';
})
});
});


Expand Down
20 changes: 18 additions & 2 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,24 @@ if config_env() in [:prod, :dev] do
config :asciinema, Asciinema.PngGenerator.Rsvg, font_family: rsvg_font_family
end

if gc_days = env.("ASCIICAST_GC_DAYS") do
config :asciinema, :asciicast_gc_days, String.to_integer(gc_days)
if limit = env.("UPLOAD_SIZE_LIMIT") do
config :asciinema, AsciinemaWeb.Plug.Parsers.MULTIPART, length: String.to_integer(limit)
end

if ttls = env.("UNCLAIMED_RECORDING_TTL") do
ttls =
case String.split(ttls, ",", parts: 2) do
[hide_ttl] ->
[hide: String.to_integer(hide_ttl)]

[delete_ttl, delete_ttl] ->
[delete: String.to_integer(delete_ttl)]

[hide_ttl, delete_ttl] ->
[hide: String.to_integer(hide_ttl), delete: String.to_integer(delete_ttl)]
end

config :asciinema, :unclaimed_recording_ttl, ttls
end

if String.downcase("#{env.("CRON")}") in ["0", "false", "no"] do
Expand Down
50 changes: 0 additions & 50 deletions docker-compose.yml

This file was deleted.

Loading

0 comments on commit 990da58

Please sign in to comment.