Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
a4c5390
Update README.md
barnasc May 3, 2024
b7a1c5f
Merge pull request #9 from barnasc/main
barnasc Jul 14, 2024
e06cd2e
Merge branch 'master'
barnasc Jul 16, 2024
c63558f
Merge pull request #10 from barnasc/main
barnasc Jul 16, 2024
6bceecb
Merge branch 'master'
barnasc Aug 9, 2024
61421a2
Merge pull request #11 from barnasc/main
barnasc Aug 9, 2024
1519e5d
Merge branch 'master'
barnasc Aug 12, 2024
176715b
Merge branch 'master'
barnasc Aug 12, 2024
6956c65
Merge pull request #12 from barnasc/main
barnasc Aug 12, 2024
011f0b0
Merge branch 'main' into main
barnasc Aug 15, 2024
fbd57d9
Revert "Merge branch 'main' into main"
barnasc Aug 15, 2024
82d327a
Revert "Merge pull request #12 from barnasc/main"
barnasc Aug 15, 2024
283170e
Update README.md
barnasc Aug 15, 2024
8a2f7da
Merge branch 'master'
barnasc Aug 29, 2024
daac857
Merge branch 'main' of https://github.com/barnasc/tc-documentation
barnasc Aug 29, 2024
7ca38d7
Revert "Revert "Merge pull request #12 from barnasc/main""
barnasc Aug 29, 2024
542ade4
Merge pull request #14 from barnasc/main
barnasc Aug 29, 2024
d67cba5
Merge branch 'master'
barnasc Sep 2, 2024
bdd3b74
Merge pull request #15 from barnasc/main
barnasc Sep 2, 2024
e982be4
fix sudo issue
barnasc Nov 5, 2024
8f3c0fe
Merge pull request #16 from barnasc/main
barnasc Nov 5, 2024
c7a6b77
move books into separate tree
barnasc Nov 21, 2024
20a8fcd
split flow from documentation sources
barnasc Nov 21, 2024
3033e64
support creation of docker image
barnasc Nov 23, 2024
a29501e
Merge pull request #1 from barnasc/main
barnasc Nov 23, 2024
b7b78b0
fix section numbering
barnasc Nov 24, 2024
b234b0d
extract toc from document
barnasc Nov 26, 2024
e3e4585
update readme
barnasc Nov 26, 2024
40851bc
Merge pull request #2 from barnasc/main
barnasc Nov 26, 2024
b02b0ea
use jsdom for toc generation
barnasc Nov 26, 2024
3713b45
Merge pull request #3 from barnasc/main
barnasc Nov 26, 2024
09afaa6
fix toc generation issue, update prince
barnasc Nov 27, 2024
e8faf67
introduce no-toc filter
barnasc Nov 27, 2024
5ab1c83
only generate toc when placeholder; improve section numbering
barnasc Nov 28, 2024
deab8de
fix numbering with inline codeblock
barnasc Nov 28, 2024
341e454
disable puppeteer in dockerfile
barnasc Nov 28, 2024
d9f56c9
support .md in xrefs
barnasc Nov 28, 2024
e81b0bb
change to user adf
barnasc Dec 2, 2024
d4fd950
Merge pull request #4 from barnasc/main
barnasc Dec 2, 2024
82d82d9
support irregular toc list
barnasc Dec 4, 2024
4069258
support list of tables and figures
barnasc Dec 20, 2024
eebaabf
style and formatting updates
barnasc Aug 7, 2024
667de69
Merge branch 'master' of https://github.com/barnasc/accellera-style-g…
barnasc Dec 20, 2024
cbd41ea
resolve merge conflict
barnasc Dec 20, 2024
72aa41b
restore ebw dirs
barnasc Dec 20, 2024
0d2242e
Merge adf branch
barnasc Dec 20, 2024
33f8b0e
add books
barnasc Dec 20, 2024
84f5dac
update docker scripts
barnasc Dec 20, 2024
46db744
restore ebw commands
barnasc Dec 20, 2024
b0fabf3
fix ebw collections
barnasc Dec 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
## 2024-3-14

* Clean-up as part of Accellera Style Guide

## 2024-11-21

* Separate Accellera Documentation Flow from documentation sources
115 changes: 115 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Dockerfile to create a ready-to-use docker image containing
# the Accelllera Documentation Flow using the Electric Book templates

FROM ubuntu:22.04

# Main dependency installation
RUN apt-get update && apt-get install -y \
software-properties-common \
make \
gcc \
build-essential \
git \
wget \
libgif7 \
libpixman-1-0 \
libffi-dev \
libreadline-dev \
zlib1g-dev \
graphicsmagick \
ruby-full

# Dependencies specifically for Puppeteer on unix
#RUN apt-get install -y \
# libasound2 \
# libatk1.0-0 \
# libatk-bridge2.0-0 \
# libcairo2 \
# libdrm2 \
# libgbm1 \
# libnss3 \
# libpango-1.0-0 \
# libxkbcommon-x11-0 \
# libxcomposite1 \
# libxdamage1 \
# libxfixes3 \
# libxrandr2

# Install Microsoft Core Fonts
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
RUN apt-get install ttf-mscorefonts-installer -y

# Add node source for new nodejs, instead of old Ubuntu-installed node.
# https://github.com/nodesource/distributions/wiki/How-to-migrate-to-the-new-repository

# Update local package index
RUN apt-get update
# Install necessary packages for downloading and verifying new repository information
RUN apt-get install -y ca-certificates curl gnupg
# Create a directory for the new repository's keyring, if it doesn't exist
RUN mkdir -p /etc/apt/keyrings
# Download the new repository's GPG key and save it in the keyring directory
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
# Add the new repository's source list with its GPG key for package verification
# Note: `node_20` means Node version 20. Update in future as needed.
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
# Update local package index to recognize the new repository
RUN apt-get update
# Install Node.js from the new repository
RUN apt-get install -y nodejs

# Install program to configure locales
RUN apt-get install -y locales
RUN dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8

# Set default locale for the environment
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Clear apt cache to make image smaller
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

# Install libssl1.1
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb

# Install PrinceXML for printing to PDF
#RUN wget https://www.princexml.com/download/prince_11.4-1_ubuntu18.04_amd64.deb && \
# dpkg -i prince_11.4-1_ubuntu18.04_amd64.deb

# Install pandoc for document conversion
#RUN wget https://github.com/jgm/pandoc/releases/download/2.5/pandoc-2.5-1-amd64.deb && \
# dpkg -i pandoc-2.5-1-amd64.deb

# Update npm
RUN npm install -g npm@latest

# Install Gulp cli app
RUN npm install --global gulp-cli

# Install bundler and jekyll
RUN gem install jekyll bundler

# Install gems.
COPY Gemfile .
RUN bash -lc "bundle install"

# Switch to the user account
RUN useradd -ms /bin/bash adf
USER adf
WORKDIR /home/adf

# Set paths for Ruby gems
RUN echo '# Define Ruby Gems path' >> ~/.bashrc
RUN echo 'export GEM_HOME="$HOME/.rvm/gems/ruby-2.7.6"' >> ~/.bashrc
RUN echo 'export PATH="$HOME/.rvm/gems/ruby-2.7.6:$PATH"' >> ~/.bashrc
RUN bash -lc "source ~/.bashrc"

# Copy all flow elements to container
COPY --chown=adf:adf . .

# Install Accellera Documentation Flow
RUN npm install
118 changes: 118 additions & 0 deletions Dockerfile.nocert
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Dockerfile.nocert to create a ready-to-use docker image containing
# the Accelllera Documentation Flow using the Electric Book templates
# WARNING: This installation will disable TLS certificate checking
# and could lead tp security issues. Instead use the Dockerfile

FROM ubuntu:22.04

# Main dependency installation
RUN apt-get update && apt-get install -y \
software-properties-common \
make \
gcc \
build-essential \
git \
wget \
libgif7 \
libpixman-1-0 \
libffi-dev \
libreadline-dev \
zlib1g-dev \
graphicsmagick \
ruby-full

# Dependencies specifically for Puppeteer on unix
#RUN apt-get install -y \
# libasound2 \
# libatk1.0-0 \
# libatk-bridge2.0-0 \
# libcairo2 \
# libdrm2 \
# libgbm1 \
# libnss3 \
# libpango-1.0-0 \
# libxkbcommon-x11-0 \
# libxcomposite1 \
# libxdamage1 \
# libxfixes3 \
# libxrandr2

# Install Microsoft Core Fonts
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
RUN apt-get install ttf-mscorefonts-installer -y

# Add node source for new nodejs, instead of old Ubuntu-installed node.
# https://github.com/nodesource/distributions/wiki/How-to-migrate-to-the-new-repository

# Update local package index
RUN apt-get update
# Install necessary packages for downloading and verifying new repository information
RUN apt-get install -y ca-certificates curl gnupg
# Create a directory for the new repository's keyring, if it doesn't exist
RUN mkdir -p /etc/apt/keyrings
# Download the new repository's GPG key and save it in the keyring directory
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
# Add the new repository's source list with its GPG key for package verification
# Note: `node_20` means Node version 20. Update in future as needed.
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
# Update local package index to recognize the new repository
RUN apt-get update
# Install Node.js from the new repository
RUN apt-get install -y nodejs

# Install program to configure locales
RUN apt-get install -y locales
RUN dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8

# Set default locale for the environment
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Clear apt cache to make image smaller
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

# Install libssl1.1
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb

# Install PrinceXML for printing to PDF
#RUN wget https://www.princexml.com/download/prince_11.4-1_ubuntu18.04_amd64.deb --no-check-certificate && \
# dpkg -i prince_11.4-1_ubuntu18.04_amd64.deb

# Install pandoc for document conversion
#RUN wget https://github.com/jgm/pandoc/releases/download/2.5/pandoc-2.5-1-amd64.deb --no-check-certificate && \
# dpkg -i pandoc-2.5-1-amd64.deb

# Update npm
RUN npm install -g npm@latest

# Install Gulp cli app
RUN npm install --global gulp-cli

# Install bundler and jekyll
RUN gem install jekyll bundler

# Install gems.
COPY Gemfile .
RUN bash -lc "bundle install"

# Switch to the user account
RUN useradd -ms /bin/bash adf
USER adf
WORKDIR /home/adf

# Set paths for Ruby gems
RUN echo '# Define Ruby Gems path' >> ~/.bashrc
RUN echo 'export GEM_HOME="$HOME/.rvm/gems/ruby-2.7.6"' >> ~/.bashrc
RUN echo 'export PATH="$HOME/.rvm/gems/ruby-2.7.6:$PATH"' >> ~/.bashrc
RUN bash -lc "source ~/.bashrc"

# Copy all flow elements to container
COPY --chown=adf:adf . .

# Install Accellera Documentation Flow
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
RUN npm install
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
# Accellera Style Guide
# Accellera Documentation Flow (ADF)

## Document generation
The Accellera Documentation Flow offers the infrastructure to develop and publish Accellera (Draft) Standards, User Guides and other standard-related documentation. The main output are high-quality documents in Portable Document Format (PDF) compliant with the IEEE SA Standards Style Manual. Future extensions of this flow will also render interactive browser-compatible standards in HTML format.

To render the Accellera Style Guide, use the following command:
The documentation flow is documented in the Accellera Style Guide, which explains the Markdown formatting and styles to create IEEE SA Standards compliant documents.

## Usage

The document sources shall be located in directory `books/<standard-document>/`.

The document metadata (e.g. properties) shall be located in directory `_data/works/<standard-document>/`.

To render a PDF document using the Accellera Documentation Flow, use the following command:

```sh
npm run eb -- output --format screen-pdf --book accellera-style-guide
$ npm run eb -- output --format screen-pdf --book <standard-document>
```

It will generate a PDF in the `_output` directory.
It will generate a PDF document in the `_output` directory.

Please contact the Technical Committee chair in case of questions on the Accellera documentation flow, the required installation procedure or use of the standard document templates.
Please contact the Technical Committee Chair in case of questions on the Accellera Documentation Flow, the required installation procedure or use of the standard document templates.

## Acknowledgment

Special thanks to [Electric Book Works](https://electricbookworks.com/) for the development and support of this technical documentation flow.
Special thanks to [Electric Book Works](https://electricbookworks.com/) for the development and support of the Accellera Documentation Flow.
6 changes: 5 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ canonical-url: "https://electricbookworks.github.io"
# the name of your repo, e.g. /electric-book
# It must start with a slash. Otherwise you can leave it blank. See:
# http://downtothewire.io/2015/08/15/configuring-jekyll-for-user-and-project-github-pages/
baseurl: "/accellera-style-guide"
baseurl: ""

# GitHub Pages repository
# -----------------------
Expand Down Expand Up @@ -113,6 +113,9 @@ exclude:
- package-lock.json
- CNAME
- .sass-cache
- Docker*
- netlify.toml
- setup.sh

# Included as-is in other files, no need to process
- /assets/js/annotation.js
Expand Down Expand Up @@ -148,6 +151,7 @@ exclude:

# Files for formats we're not building here
- /assets/profiles
- /books/*
- /*/package.opf
- /*/toc.ncx
- /*/images/print-pdf
Expand Down
5 changes: 5 additions & 0 deletions _configs/_config.app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ exclude:
- package-lock.json
- CNAME
- .sass-cache
- Docker*
- netlify.toml
- setup.sh

# Included as-is in other files, no need to process
- /assets/js/annotation.js
Expand Down Expand Up @@ -87,3 +90,5 @@ exclude:
- /*/styles/screen-pdf*
- /*/styles/web*
- /*/styles/epub*
- /books/*

4 changes: 4 additions & 0 deletions _configs/_config.epub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ exclude:
- package.json
- package-lock.json
- CNAME
- Docker*
- netlify.toml
- setup.sh

# Included as-is in other files, no need to process
- /assets/js/annotation.js
Expand Down Expand Up @@ -73,6 +76,7 @@ exclude:
- /*/images/screen-pdf
- /*/images/web
- /*/images/app
- /books/*

# Temporarily exclude book files for faster builds
# - assets
Expand Down
4 changes: 4 additions & 0 deletions _configs/_config.live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ exclude:
- eslint.json
- CHANGELOG.md
- /*/images/source
- Docker*
- netlify.toml
- setup.sh

# Included as-is in other files, no need to process
- /assets/js/annotation.js
Expand Down Expand Up @@ -84,6 +87,7 @@ exclude:
- /*/styles/app*
- /*/package.opf
- /*/toc.ncx
- /books/*

# Exclude web images only if you keep_files them below
# - /*/images/web
Expand Down
4 changes: 4 additions & 0 deletions _configs/_config.print-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ exclude:
- package-lock.json
- CNAME
- .sass-cache
- Docker*
- netlify.toml
- setup.sh

# Included as-is in other files, no need to process
- /assets/js/annotation.js
Expand Down Expand Up @@ -91,6 +94,7 @@ exclude:
- /*/images/web
- /*/images/epub
- /*/images/app
- /books/*

# Temporarily exclude these and keep_files them below
# for faster builds where you don't need to refresh these.
Expand Down
4 changes: 4 additions & 0 deletions _configs/_config.screen-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ exclude:
- package-lock.json
- CNAME
- .sass-cache
- Docker*
- netlify.toml
- setup.sh

# Included as-is in other files, no need to process
- /assets/js/annotation.js
Expand Down Expand Up @@ -91,6 +94,7 @@ exclude:
- /*/images/web
- /*/images/epub
- /*/images/app
- /books/*

# Temporarily exclude these and keep_files them below
# for faster builds where you don't need to refresh these.
Expand Down
Loading
Loading