Skip to content

Commit b117f57

Browse files
init
0 parents  commit b117f57

File tree

9 files changed

+455
-0
lines changed

9 files changed

+455
-0
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- wip
7+
- master
8+
- preview
9+
- release
10+
pull_request:
11+
branches:
12+
- master
13+
14+
jobs:
15+
compile_pdf:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: "install dependencies"
20+
run: |
21+
set -ex
22+
sudo apt -q update
23+
sudo apt install -y texlive-latex-base texlive-latex-extra latexmk
24+
- name: "Compile PDF"
25+
run: |
26+
set -ex
27+
cd spec
28+
latexmk -pdflatex terminal-unicode-core
29+
- name: "Uploading PDF"
30+
uses: actions/upload-artifact@v2
31+
with:
32+
name: spec
33+
path: spec/terminal-unicode-core.pdf
34+
if-no-files-found: error
35+
36+
compile_md:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v1
40+
- name: "install dependencies"
41+
run: |
42+
set -ex
43+
sudo apt -q update
44+
sudo apt install -y pandoc
45+
- name: "Compile markdown"
46+
run: |
47+
set -ex
48+
cd spec
49+
pandoc -s terminal-unicode-core.tex -o terminal-unicode-core.md
50+
- name: "Uploading markdown"
51+
uses: actions/upload-artifact@v2
52+
with:
53+
name: spec
54+
path: spec/terminal-unicode-core.md
55+
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- preview
7+
- release
8+
9+
jobs:
10+
compile_pdf:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: "install dependencies"
15+
run: |
16+
set -ex
17+
sudo apt -q update
18+
sudo apt install -y texlive-latex-base texlive-latex-extra latexmk
19+
- name: "Compile PDF"
20+
run: |
21+
set -ex
22+
cd spec
23+
latexmk -pdflatex terminal-unicode-core
24+
- name: "Uploading PDF"
25+
uses: actions/upload-artifact@v2
26+
with:
27+
name: spec
28+
path: spec/terminal-unicode-core.pdf
29+
if-no-files-found: error
30+
31+
compile_md:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v1
35+
- name: "install dependencies"
36+
run: |
37+
set -ex
38+
sudo apt -q update
39+
sudo apt install -y pandoc
40+
- name: "Compile markdown"
41+
run: |
42+
set -ex
43+
cd spec
44+
pandoc -s terminal-unicode-core.tex -o terminal-unicode-core.md
45+
- name: "Uploading markdown"
46+
uses: actions/upload-artifact@v2
47+
with:
48+
name: spec
49+
path: spec/terminal-unicode-core.md
50+
if-no-files-found: error
51+
52+
do_release:
53+
name: Create Github release
54+
runs-on: ubuntu-latest
55+
needs: [compile_pdf, compile_md]
56+
steps:
57+
- uses: actions/checkout@v1
58+
# -------------------------------------------------------------
59+
- name: fetch release artifacts
60+
uses: actions/download-artifact@v2
61+
with:
62+
name: spec
63+
# -------------------------------------------------------------
64+
- name: Set Output Variables
65+
id: set_env_var
66+
env:
67+
REPOSITORY: ${{ github.event.repository.name }}
68+
run: |
69+
VERSION=$(grep '^### ' Changelog.md | head -n1 | awk '{print $2}')
70+
SUFFIX=$(grep '^### ' Changelog.md | head -n1 | awk '{print $3}' | tr -d '()')
71+
if [ $REPOSITORY = "master" ]; then IS_PRE='false'; else IS_PRE='true'; fi
72+
if [ $REPOSITORY = "master" ]; then SUFFIX='' ; else SUFFIX='prerelease'; fi
73+
if [ $REPOSITORY != "master" ]; then
74+
TAG_SUFFIX="_prerelease_${GITHUB_RUN_NUMBER}"
75+
else
76+
TAG_SUFFIX=""
77+
fi
78+
RELEASEBODY=$(awk -v RS='^### ' '/^'$VERSION'/ {print $0}' Changelog.md | tail -n+3)
79+
RELEASEBODY="${RELEASEBODY//'%'/'%25'}"
80+
RELEASEBODY="${RELEASEBODY//$'\n'/'%0A'}"
81+
RELEASEBODY="${RELEASEBODY//$'\r'/'%0D'}"
82+
echo "::set-output name=version::${VERSION}"
83+
echo "::set-output name=tag_suffix::${TAG_SUFFIX}"
84+
echo "::set-output name=RUN_ID::${GITHUB_RUN_NUMBER}"
85+
echo "::set-output name=IS_PRERELEASE::${IS_PRE}"
86+
echo "::set-output name=RELEASENAME_SUFFIX::${SUFFIX}"
87+
echo "::set-output name=RELEASEBODY::${RELEASEBODY}"
88+
# -------------------------------------------------------------
89+
- name: Create Github release page
90+
id: create_release
91+
uses: actions/create-release@v1
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
with:
95+
tag_name: v${{ steps.set_env_var.outputs.version }}${{ steps.set_env_var.outputs.tag_suffix}}
96+
release_name: Terminal Good Image Protocol ${{ steps.set_env_var.outputs.version }}-${{ steps.set_env_var.outputs.RUN_ID }} ${{ steps.set_env_var.outputs.RELEASENAME_SUFFIX}}
97+
body: |
98+
${{ steps.set_env_var.outputs.RELEASEBODY }}
99+
draft: true
100+
prerelease: ${{ steps.set_env_var.outputs.IS_PRERELEASE }}
101+
# -------------------------------------------------------------
102+
- name: Upload PDF
103+
id: upload-release-pdf
104+
uses: actions/upload-release-asset@v1
105+
env:
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
with:
108+
upload_url: ${{ steps.create_release.outputs.upload_url }}
109+
asset_path: terminal-unicode-core.pdf
110+
asset_name: terminal-unicode-core-${{ steps.set_env_var.outputs.version }}-${{ steps.set_env_var.outputs.RUN_ID }}.pdf
111+
asset_content_type: application/pdf
112+
# -------------------------------------------------------------
113+
- name: Upload markdown
114+
id: upload-release-md
115+
uses: actions/upload-release-asset@v1
116+
env:
117+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118+
with:
119+
upload_url: ${{ steps.create_release.outputs.upload_url }}
120+
asset_path: terminal-unicode-core.md
121+
asset_name: terminal-unicode-core-${{ steps.set_env_var.outputs.version }}-${{ steps.set_env_var.outputs.RUN_ID }}.md
122+
asset_content_type: text/markdown
123+

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.tmp
2+
*.aux
3+
*.log
4+
*.toc
5+
*.pdf
6+
*.out
7+
*.fls
8+
*.fdb_latexmk
9+
*.synctex.gz
10+
.fake
11+
.ionide
12+
/out

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### 0.1.0 (unreleased)
2+
3+
- initial draft

Gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6+
7+
# gem "rails"
8+
gem 'jekyll'

Gemfile.lock

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.7.0)
5+
public_suffix (>= 2.0.2, < 5.0)
6+
colorator (1.1.0)
7+
concurrent-ruby (1.1.7)
8+
em-websocket (0.5.2)
9+
eventmachine (>= 0.12.9)
10+
http_parser.rb (~> 0.6.0)
11+
eventmachine (1.2.7)
12+
ffi (1.13.1)
13+
forwardable-extended (2.6.0)
14+
http_parser.rb (0.6.0)
15+
i18n (1.8.5)
16+
concurrent-ruby (~> 1.0)
17+
jekyll (4.2.0)
18+
addressable (~> 2.4)
19+
colorator (~> 1.0)
20+
em-websocket (~> 0.5)
21+
i18n (~> 1.0)
22+
jekyll-sass-converter (~> 2.0)
23+
jekyll-watch (~> 2.0)
24+
kramdown (~> 2.3)
25+
kramdown-parser-gfm (~> 1.0)
26+
liquid (~> 4.0)
27+
mercenary (~> 0.4.0)
28+
pathutil (~> 0.9)
29+
rouge (~> 3.0)
30+
safe_yaml (~> 1.0)
31+
terminal-table (~> 2.0)
32+
jekyll-sass-converter (2.1.0)
33+
sassc (> 2.0.1, < 3.0)
34+
jekyll-watch (2.2.1)
35+
listen (~> 3.0)
36+
kramdown (2.3.0)
37+
rexml
38+
kramdown-parser-gfm (1.1.0)
39+
kramdown (~> 2.0)
40+
liquid (4.0.3)
41+
listen (3.3.3)
42+
rb-fsevent (~> 0.10, >= 0.10.3)
43+
rb-inotify (~> 0.9, >= 0.9.10)
44+
mercenary (0.4.0)
45+
pathutil (0.16.2)
46+
forwardable-extended (~> 2.6)
47+
public_suffix (4.0.6)
48+
rb-fsevent (0.10.4)
49+
rb-inotify (0.10.1)
50+
ffi (~> 1.0)
51+
rexml (3.2.4)
52+
rouge (3.26.0)
53+
safe_yaml (1.0.5)
54+
sassc (2.4.0)
55+
ffi (~> 1.9)
56+
terminal-table (2.0.0)
57+
unicode-display_width (~> 1.1, >= 1.1.1)
58+
unicode-display_width (1.7.0)
59+
60+
PLATFORMS
61+
ruby
62+
63+
DEPENDENCIES
64+
jekyll
65+
66+
BUNDLED WITH
67+
2.1.4

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# vim:noet
2+
3+
BASENAME = terminal-unicode-core
4+
SOURCE_FILES = spec/$(BASENAME).tex
5+
TARGET_DIR = out
6+
7+
all: ${TARGET_DIR}/${BASENAME}.pdf
8+
9+
clean:
10+
@rm -vf ${TARGET_DIR}/*
11+
12+
${TARGET_DIR}/${BASENAME}.pdf: $(SOURCE_FILES)
13+
@mkdir -p ${TARGET_DIR}
14+
@cd spec && latexmk -pdflatex ${BASENAME}.tex \
15+
-aux-directory=../${TARGET_DIR} -output-directory=../${TARGET_DIR}
16+
17+
.PHONY: all clean

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Terminal Unicode Core Specification
2+
3+
**IMPORTANT: THIS PROJECT IS IN ALPHA STAGE & ACTIVE DEVELOPMENT**
4+
5+
Let's make Unicode support in terminal emulators better - not perfect, but better.
6+
7+
For that I'd like to introduce a small spec that at least tries to tackle **some**
8+
basics that would greatly help user experience.
9+
10+
Of course, the terminal emulator is not enough, terminal applications have
11+
to catch up, too. But without support from terminals, the applications
12+
cannot even start doing so. This draft spec tries to fix that.
13+
14+
## Goal of this repository
15+
16+
It would be nice if this repository serves as a communication hub for improving this spec
17+
that ideally enough terminal emulators will adopt so we could call this the future defacto image protocol
18+
for terminals, so that developers have it easier in the future on how to get images into their
19+
terminal applications.
20+
21+
## How to contribute
22+
23+
Everybodies point of view is valuable, whether terminal emulator developer, terminal application or
24+
toolkit developer, or a user.
25+
26+
While getting this spec in shape, I'd like to get your feedback to find a common
27+
concensus that most of us can agree on with the goal to get an adoption as broad as possible.
28+
29+
Sure, this won't happen in a day or even 2 years. But someone has to start at some point,
30+
so more can follow.
31+
32+
## This spec is NOT
33+
34+
- attempting to bring full Unicode support to the terminal
35+
- planning to get Unicode BiDi support formalized (mlterm could be doing that much better :) )
36+
- tackle every other niche aspect of Unicode.
37+
38+
## This spec will
39+
40+
- Enable users to make use of Ligatures and Emoji without sacrifice.
41+
- Have legacy applications as well as newer ones respecting this spec compatible in one terminal.
42+
43+
## Roadmap
44+
45+
- [x] create CI job for auto-generating PDF/markdown of the latest draft to be downloadable
46+
- [x] create CI job for providing prereleases of the draft specification.
47+
- [ ] Move Changelog into .tex file and let CI's release.yml extract it from there
48+
- [ ] Create Github pages that have an auto-generated PDF/markdown version of this specification.
49+
- [ ] Hopefully get enough terminal and TUI app devs attracted to collaborate in a positive, friendly, and productive manner.
50+
51+
## FAQ
52+
53+
- **Why LaTeX and not Markdown?** Expressivity and the fact that you can convert to Markdown: https://pandoc.org/demos.html
54+
- **Why GitHub and not GitLab on freedesktop?** Better reachability.
55+

0 commit comments

Comments
 (0)