Skip to content
Open
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
4 changes: 4 additions & 0 deletions published/Data Model for Asset Location/1/0/docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: Data Model for Asset Location
title: 'Data Model for Asset Location'
version: 'v1.0'
start_page: ROOT:index.adoc
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";
@import "https://cdn.jsdelivr.net/gh/asciidoctor/[email protected]/data/stylesheets/asciidoctor-default.css";

h1, h2, h3, h4, h5, h6, #toctitle,
.sidebarblock > .content > .title {
color: rgba(0, 0, 0, 0.8);
}

#toc {
background:-color #ffffff;
}

#toctitle {
color: #0028cd;
}

a {
color: #17418a;
}

a:hover, a:focus {
color: rgb(8, 24, 117);
}

h1, h2, h3, .sidebarblock > .content > .title, h4, h5, h6 {
color: #3149cc;
}

.subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title {
color: #303030;
}

:not(pre):not([class^=L])>code {
background-color: #e0e0e0;
}

table thead, table tfoot {
background: #f7f8f7;
background-color: rgb(247, 248, 247);
background-position-x: 0%;
background-position-y: 0%;
background-repeat: repeat;
background-attachment: scroll;
background-image: none;
background-size: auto;
background-origin: padding-box;
background-clip: border-box;
}

/* Problem handling with long strings in the tables */
/* This seems no appropriate or last resort (sliders)
table {
display: block;
width: max-content;
max-width: 100%;
overflow-x: auto;
}
*/

/* This seems to work: */
table {
word-wrap: anywhere;
}

.huge {
font-family: 'Open Sans';
font-size: 3em;
line-height: 1.1em;
}

.large {
font-family: 'Open Sans';
font-size: 1.8em;
line-height: 1.1em;
}

.normal {
font-family: 'Open Sans';
font-size: 1em;
line-height: 1.1em;
}

.white {
color: #ffffff;
}

.redboxoneround {
padding: 0.3em 1em 0.3em 1em;
margin: 0.5em 0 0.5em 0;
font-family: 'Open Sans';
font-size: 2em;
color: #ffffff;
line-height: 1.1em;
letter-spacing: 0.1em;
background-color: #fe4f0e;
border-radius: 0 0.35em 0 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run -it -v .:/documents/ asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-diagram -a toc=left -a stylesheet=asciidoc-style-idta.css *.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run -it -v .:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf -r asciidoctor-diagram -r ./extended.rb -a toc=macro -a pdf-theme=my-theme.yml -a env-pdf *.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run -it -v .:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf -r asciidoctor-diagram -a toc=macro -a pdf-theme=my-theme.yml -a env-pdf *.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is taken from the extension examples from the asciidoctor-pdf repository.
# https://github.com/asciidoctor/asciidoctor-pdf/blob/main/docs/modules/extend/examples/pdf-converter-numbered-paragraphs.rb


class PDFConverterNumberedParagraphs < (Asciidoctor::Converter.for 'pdf')
register_for 'pdf'

def init_pdf doc
doc
.find_by(context: :paragraph) {|candidate| [:document, :section].include? candidate.parent.context }
.each_with_index {|paragraph, idx| paragraph.set_attr 'number', idx + 1 }
super
end

def convert_paragraph node
if (paragraph_number = node.attr 'number')
float do
label = %(#{paragraph_number}.#{::Prawn::Text::NBSP})
label_width = rendered_width_of_string label
bounding_box [-label_width, cursor], width: label_width do
ink_prose label, color: 'CCCCCC', align: :right, margin: 0, single_line: true
end
end
end
super
end
end
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
extends: default-for-print

title-page:
text_align: left
margin-inner: -1cm
margin-outer: -1cm
title:
top: 8cm
font_size: 42
font_style: bold
font_color: D9D9D9
line_height: 1.2
subtitle:
margin-top: 1cm
font_size: 42
font_color: D9D9D9
font_style: normal
line_height: 1.0
authors:
margin-top: 1cm
font_size: 18
font_color: D9D9D9
font_style: normal
line_height: 1
revision:
margin-top: 1cm
font_size: 18
font_color: D9D9D9
font_style: normal
line_height: 1
background-image: image:SMT-template-cover.svg[fit=cover]
logo:
top: 21.7cm
align: right
image: image:idta-smt-badge.png[pdfwidth=48%]
page:
layout: portrait
margin: [1.5cm, 2cm, 1.5cm, 2cm]
size: A4
base:
font-color: #333333
font-family: Helvetica
font-size: 10
line-height-length: 11.5
line-height: $base-line-height-length / $base-font-size
role:
removed:
font-style: italic
text-decoration: line-through
text-decoration-color: #FF0000
huge:
font-family: Helvetica
font-size: 24
large:
font-family: Helvetica
font-size: 16
normal:
font-family: Helvetica
font-size: 12
white:
font-color: #ffffff
redboxoneround:
border-radius: [0.3cm, 0cm, 0cm, 0cm]
font-family: Helvetica
font-size: 16
letter-spacing: $base-font-size * 1.1
font-color: #ffffff
background-color: #fe4f0e
heading:
font-color: #3149cc
font-size: 17
font-family: Helvetica
line-height: 1.2
margin-bottom: 10
link:
font-color: #17418a
list:
indent: $base-font-size * 1.2

table:
font-size: 10
border-width: 0.5
grid-width: 0.5
border-color: #707070
grid-color: #707070

pre:
font-color: #ff0000

code:
font-color: #505050
font-style: bold
font-size: 11
font-weight: 600

literal:
font-color: #3149cc
font-style: bold
font-size: 12
font-weight: 800
image:
# align: center
# problem: caption not able to center
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# from: https://stackoverflow.com/questions/62350872/powershell-file-watcher-register-objectevent-wait-for-file-to-complete-copying

# IMPORTANT: Copy this file to the folder being watchd (typically one level above) and run

Clear-Host
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop

$fileSystemWatcherDirPath = '.'
$fileSystemWatcherFilter = '*.zip'

$fileSystemWatcher = [System.IO.FileSystemWatcher]::new($fileSystemWatcherDirPath , $fileSystemWatcherFilter)
$fileSystemWatcher.IncludeSubdirectories = $true
$fileSystemWatcher.EnableRaisingEvents = $true
$fileSystemWatcher.NotifyFilter = [System.IO.NotifyFilters]::FileName -bor [System.IO.NotifyFilters]::DirectoryName -bor [System.IO.NotifyFilters]::LastWrite # [System.Linq.Enumerable]::Sum([System.IO.NotifyFilters].GetEnumValues())

# Create syncronized hashtable
# $syncdFsItemEventHashT = [hashtable]::Synchronized([hashtable]::new())
$global:syncdFsItemEventHashT = @{}

$fileSystemWatcherAction = {
try {
$fsItemEvent = [pscustomobject]@{
EventIdentifier = $Event.EventIdentifier
SourceIdentifier = $Event.SourceIdentifier
TimeStamp = (Get-Date) # $Event.TimeGenerated
FullPath = $Event.SourceEventArgs.FullPath
ChangeType = $Event.SourceEventArgs.ChangeType
}

# Collecting event in synchronized hashtable (overrides existing keys so that only the latest event details are available)
# $syncdFsItemEventHashT = @{}
Write-Host $fsItemEvent.FullPath
Write-Host $syncdFsItemEventHashT
$syncdFsItemEventHashT[$fsItemEvent.FullPath] = $fsItemEvent
} catch {
Write-Host ($_ | Format-List * | Out-String ) -ForegroundColor red
}
}

# Script block which processes collected events and do further actions like copying for backup, etc...
# That scriptblock was initially used to test "Start-Job". Unfortunately it's not possible to access and modify the synchronized hashtable created within this scope.
$fSItemEventProcessingJob = {
$keys = [string[]]$syncdFsItemEventHashT.psbase.Keys

foreach ($key in $keys) {
$fsEvent = $syncdFsItemEventHashT[$key]

try {

Write-Host "Event has TS = ", $fsEvent.TimeStamp

if ( ( (Get-Date) - $fsEvent.TimeStamp ).TotalSeconds -gt 3) {

Write-Host "Finally processing: ", $fsEvent.FullPath
$syncdFsItemEventHashT.Remove($key)

# do the work
Remove-Item 'new' -Recurse -ErrorAction SilentlyContinue
Expand-Archive -Path $fsEvent.FullPath -DestinationPath new
Set-Location .\new\
Start-Process -FilePath 'compile-html.bat' -Wait
Start-Process -FilePath @(Get-ChildItem *.html)[0]
Set-Location ..
}

} catch {
Write-Host ($_ | Format-List * | Out-String ) -ForegroundColor red
}
}
}

[void] (Register-ObjectEvent -InputObject $fileSystemWatcher -EventName 'Created' -SourceIdentifier 'FSCreated' -Action $fileSystemWatcherAction)
[void] (Register-ObjectEvent -InputObject $fileSystemWatcher -EventName 'Changed' -SourceIdentifier 'FSChanged' -Action $fileSystemWatcherAction)
[void] (Register-ObjectEvent -InputObject $fileSystemWatcher -EventName 'Renamed' -SourceIdentifier 'FSRenamed' -Action $fileSystemWatcherAction)
[void] (Register-ObjectEvent -InputObject $fileSystemWatcher -EventName 'Deleted' -SourceIdentifier 'FSDeleted' -Action $fileSystemWatcherAction)

Write-Host "Watching for changes in '$fileSystemWatcherDirPath'.`r`nPress CTRL+C to exit!"
try {
do {
Wait-Event -Timeout 1

if ($syncdFsItemEventHashT.Count -gt 0) {
Write-Host "`r`n"
Write-Host ('-' * 50) -ForegroundColor Green
Write-Host "Collected events in hashtable queue:" -ForegroundColor Green
$syncdFsItemEventHashT.Values | Format-Table | Out-String
}

# Process hashtable items and do something with them (like copying, ..)
.$fSItemEventProcessingJob

# Garbage collector
[GC]::Collect()

} while ($true)

} finally {
# unregister
Unregister-Event -SourceIdentifier 'FSChanged'
Unregister-Event -SourceIdentifier 'FSCreated'
Unregister-Event -SourceIdentifier 'FSDeleted'
Unregister-Event -SourceIdentifier 'FSRenamed'

# dispose
$FileSystemWatcher.Dispose()
Write-Host "`r`nEvent Handler removed."
}
Loading