Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit for adoc version of STIX v2.1.1 #316

Merged
merged 2 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 29 additions & 0 deletions .github/workflows/builddocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Process spec into docbook, html, and docx formats
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build docs
working-directory: spec/drafts/v2.1.1
run: |
sudo apt-get install -y pandoc asciidoctor asciidoc-common wkhtmltopdf
asciidoctor -v --failure-level INFO -a stylesheet=stix.css stix-v2.1.1.adoc
asciidoctor -b docbook -v --failure-level INFO -a stylesheet=stix.css stix-v2.1.1.adoc
pandoc -r docbook -t docx -o temp-v2.1.1.docx stix-v2.1.1.xml
# This shows how to build the pdf automatically, but disabling it because the pdf generated is nearly 300 MB
# wkhtmltopdf --enable-local-file-access stix-v2.1.1.html stix-v2.1.1.pdf
zip stix-wgdraft.zip temp-v2.1.1.docx stix-v2.1.1.xml stix-v2.1.1.html #stix-v2.1.1.pdf
- uses: actions/upload-artifact@v3
with:
name: stix-wgdraft.zip
path: spec/drafts/v2.1.1/stix-wgdraft.zip
6 changes: 6 additions & 0 deletions spec/drafts/v2.1.1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ignore generated html files,
*.html
# ignore generated xml files,
*.xml
# ignore generated pdf files,
*.pdf
26 changes: 26 additions & 0 deletions spec/drafts/v2.1.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# EXPERIMENTAL DRAFT

This is the STIX specification in asciidoc format. This is an experiment and *IS NOT* an official version of the STIX specification.

Specification development in asciidoc has multiple advantages over editing the document in an online graphical editor.
* transparency - every document change is publicly visible as a git commit.
* ease of maintenance - style changes and changes to common text can be quickly and automatically made rather than editing each instance individually by hand.
* ease of validation - link checkers and other tools can be automated to ensure document currrency. Code examples can be held externally to document so that they can be validated by the stix-validator automatically, so that errors don't creep into the documented examples.
* ease of use - commonly consumed values, such as vocabulary overviews can be held in included documents and consumed directly rather than extracted from the document.

Generate HTML
```bash
asciidoctor -v --failure-level INFO -a stylesheet=stix.css stix-v2.1.1.adoc
```

Generate DocBook
```bash
asciidoctor -b docbook -v --failure-level INFO -a stylesheet=stix.css stix-v2.1.1.adoc
```

Generate docx
```bash
pandoc -r docbook -t docx -o temp-v2.1.1.docx stix-v2.1.1.xml
```
Open the coversheet and import the temp-v2.1.1.docx file.
(Insert, Object, Text from File)
459 changes: 459 additions & 0 deletions spec/drafts/v2.1.1/css/stix.css

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/drafts/v2.1.1/images/oasis-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/drafts/v2.1.1/stix-v2.1.1-csd01.docx
Binary file not shown.
13,946 changes: 13,946 additions & 0 deletions spec/drafts/v2.1.1/stix-v2.1.1.adoc

Large diffs are not rendered by default.