-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
793 additions
and
117 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
name: Generate PDF using Pandoc | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "create_pdf" | ||
create_pdf: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Pandoc Docker image v3.1.1.0 | ||
container: | ||
image: pandoc/latex:3.1.1.0 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
|
||
# Run the PDF creation script in the container | ||
- uses: docker://pandoc/latex:3.1.1.0 | ||
with: | ||
entrypoint: './pandoc-docker.sh' | ||
|
||
# Create an output with the shortened version of the commit SHA | ||
- id: short_sha | ||
env: | ||
GITHUB_SHA: ${{ github.sha }} | ||
run: echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | ||
|
||
# Create a release with the PDFs as assets and the shortened SHA as the tag name | ||
- uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: v${{ steps.short_sha.outputs.short_sha }} | ||
draft: false | ||
files: | | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# WAYLAND BOOK | ||
|
||
This repository is a clone of the repository for [Wayland Book](https://wayland-book.com/), located at | ||
[~sircmpwn/wayland-book](https://git.sr.ht/~sircmpwn/wayland-book). | ||
|
||
The original author of this work is [Drew DeVault](https://github.com/ddevault). | ||
|
||
## GENERATING A PDF | ||
|
||
Every commit or push to the master branch will generate a PDF that can then be | ||
downloaded under the Releases tab. There are two local scripts available if | ||
that is preferred as well. | ||
|
||
The PDF can also be generated on a local client by cloning this repository and | ||
running `pandoc.sh` in a shell, assuming the dependencies below are installed | ||
locally and accessible. | ||
|
||
The `pandoc-docker.sh` script can be used with the [pandoc/latex Docker images](https://hub.docker.com/r/pandoc/latex) | ||
to similarly generate the same output PDF as the one in the Releases tab. | ||
|
||
## DEPENDENCIES | ||
|
||
The local execution of the script depends on two packages being installed: | ||
|
||
- pandoc | ||
- tex | ||
|
||
Check with your distribution for how to install those packages. | ||
|
||
## CONTRIBUTING | ||
|
||
All issues to report or contributions to be made should be done upstream at the | ||
source content repository linked above. This repository will then be rebased so | ||
that a new PDF can be generated with the changes. The only exception would be | ||
the case where something specific to the PDF generation should be addressed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
\usepackage{enumitem} | ||
\setlistdepth{9} | ||
|
||
\setlist[itemize,1]{label=$\bullet$} | ||
\setlist[itemize,2]{label=$\bullet$} | ||
\setlist[itemize,3]{label=$\bullet$} | ||
\setlist[itemize,4]{label=$\bullet$} | ||
\setlist[itemize,5]{label=$\bullet$} | ||
\setlist[itemize,6]{label=$\bullet$} | ||
\setlist[itemize,7]{label=$\bullet$} | ||
\setlist[itemize,8]{label=$\bullet$} | ||
\setlist[itemize,9]{label=$\bullet$} | ||
\renewlist{itemize}{itemize}{9} | ||
|
||
\setlist[enumerate,1]{label=$\arabic*.$} | ||
\setlist[enumerate,2]{label=$\alph*.$} | ||
\setlist[enumerate,3]{label=$\roman*.$} | ||
\setlist[enumerate,4]{label=$\arabic*.$} | ||
\setlist[enumerate,5]{label=$\alpha*$} | ||
\setlist[enumerate,6]{label=$\roman*.$} | ||
\setlist[enumerate,7]{label=$\arabic*.$} | ||
\setlist[enumerate,8]{label=$\alph*.$} | ||
\setlist[enumerate,9]{label=$\roman*.$} | ||
\renewlist{enumerate}{enumerate}{9} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/sh | ||
|
||
# Install dependencies for successful PDF generations | ||
tlmgr install ctex enumitem float koma-script titling | ||
|
||
# Generate PDFs using pandoc | ||
for filename in pandoc-*yaml; do | ||
# Create variable for language based on filename | ||
language=`echo $filename | cut -d'.' -f1 | cut -d'-' -f2-3` | ||
|
||
# Attempt to create the PDF | ||
echo "Generating ${language} PDF..." | ||
pandoc -d ${filename} | ||
[[ $? -eq 0 ]] && echo "Success! The ${language} PDF has been successfully created!" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
metadata: | ||
title: The Wayland Protocol | ||
author: Drew DeVault | ||
category: "License: Creative Commons Attribution 4.0 International License" | ||
keywords: | ||
- "display server" | ||
- "wayland" | ||
- "xorg" | ||
- "xwayland" | ||
standalone: true | ||
variables: | ||
documentclass: scrbook | ||
header-includes: | ||
- \usepackage{graphicx} | ||
- \usepackage{titling} | ||
- \newcommand{\titlesc}[1]{\textsc{#1}} | ||
- \pretitle{\begin{center}\includegraphics[width=2in]{wayland-logo.png}\\\LARGE\titlesc} | ||
- \posttitle{\end{center}} | ||
lang: en-US | ||
links-as-notes: true | ||
lot: false | ||
lof: false | ||
margin-top: 1.27cm | ||
margin-left: .635cm | ||
margin-right: .635cm | ||
margin-bottom: 1.27cm | ||
numbersections: true | ||
table-of-contents: true | ||
toc-depth: 2 | ||
include-in-header: deeplists.tex | ||
verbosity: ERROR | ||
pdf-engine: xelatex | ||
input-files: | ||
- ./src/introduction.md | ||
- ./src/introduction/high-level-design.md | ||
- ./src/introduction/goals.md | ||
- ./src/introduction/package.md | ||
- ./src/protocol-design.md | ||
- ./src/protocol-design/wire-protocol.md | ||
- ./src/protocol-design/interfaces-reqs-events.md | ||
- ./src/protocol-design/high-level.md | ||
- ./src/protocol-design/design-patterns.md | ||
- ./src/libwayland.md | ||
- ./src/libwayland/util.md | ||
- ./src/libwayland/wayland-scanner.md | ||
- ./src/libwayland/proxies.md | ||
- ./src/libwayland/interfaces.md | ||
# - ./src/libwayland/event-loop.md | ||
# - ./src/libwayland/fds.md | ||
- ./src/wayland-display.md | ||
- ./src/wayland-display/creation.md | ||
- ./src/wayland-display/event-loop.md | ||
- ./src/registry.md | ||
- ./src/registry/binding.md | ||
- ./src/registry/server-side.md | ||
- ./src/surfaces.md | ||
- ./src/surfaces/compositor.md | ||
- ./src/surfaces/shared-memory.md | ||
- ./src/surfaces/dmabuf.md | ||
- ./src/surfaces/roles.md | ||
# - ./src/surfaces/surface-roles.md | ||
- ./src/xdg-shell-basics.md | ||
- ./src/xdg-shell-basics/xdg-surface.md | ||
- ./src/xdg-shell-basics/xdg-toplevel.md | ||
- ./src/xdg-shell-basics/example-code.md | ||
- ./src/surfaces-in-depth.md | ||
- ./src/surfaces-in-depth/lifecycle.md | ||
- ./src/surfaces-in-depth/frame-callbacks.md | ||
- ./src/surfaces-in-depth/damaging-surfaces.md | ||
- ./src/surfaces-in-depth/surface-regions.md | ||
- ./src/surfaces-in-depth/subsurfaces.md | ||
- ./src/surfaces-in-depth/hidpi.md | ||
- ./src/seat.md | ||
- ./src/seat/pointer.md | ||
- ./src/seat/xkb.md | ||
- ./src/seat/keyboard.md | ||
- ./src/seat/touch.md | ||
- ./src/seat/example.md | ||
- ./src/xdg-shell-in-depth.md | ||
- ./src/xdg-shell-in-depth/configuration.md | ||
- ./src/xdg-shell-in-depth/popups.md | ||
- ./src/xdg-shell-in-depth/interactive.md | ||
- ./src/xdg-shell-in-depth/positioners.md | ||
# - ./src/clipboard.md | ||
# - ./src/clipboard/data-offers.md | ||
# - ./src/clipboard/dnd.md | ||
# - ./src/protocol-extensions.md | ||
# - ./src/protocol-extensions/timing.md | ||
# - ./src/protocol-extensions/pointer-constraints.md | ||
# - ./src/protocol-extensions/clipboard.md | ||
# - ./src/protocol-extensions/desktop-shell.md | ||
# - ./src/protocol-extensions/misc.md | ||
# - ./src/protocol-extensions/writing.md | ||
# - ./src/acknowledgements.md | ||
output-file: wayland-book.pdf | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#! /bin/bash | ||
|
||
# Generate PDFs using pandoc | ||
generate_pdfs() { | ||
for filename in pandoc-*yaml; do | ||
# Create variable for language based on filename | ||
IFS=- read _ language <<< "${filename}" | ||
language=${language/.yaml/} | ||
|
||
# Attempt to create the PDF | ||
echo "Generating ${language} PDF..." | ||
pandoc -d "${filename}" | ||
[[ $? -eq 0 ]] && echo "Success! The ${language} PDF has been successfully created!" | ||
done | ||
} | ||
|
||
# Check if dependencies exist | ||
check_dependencies () { | ||
for dependency in "${dependencies[@]}" | ||
do | ||
if ! [ -x "$(command -v ${dependency})" ]; then | ||
echo "Error: $dependency is not installed." >&2 | ||
exit 1 | ||
fi | ||
done | ||
} | ||
|
||
dependencies=("pandoc" "tex") | ||
|
||
check_dependencies | ||
generate_pdfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# Data offers | ||
## Data offers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# Drag & drop | ||
## Drag & drop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.