Commit fc17f996 authored by jorge's avatar jorge

first commit

parents
Pipeline #10377029 passed with stages
in 1 minute and 58 seconds
Thumbs.db
.DS_Store
.gradle
build/
.idea
*.iml
*.ipr
*.iws
.project
.settings
.classpath
image: gradle:3.4
pages:
script:
- ./gradlew bake asciidoctor
- mkdir public
- cp -R build/jbake/* public
artifacts:
paths:
- public
only:
- master
buildscript {
dependencies {
classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6'
}
}
plugins {
id 'org.jbake.site' version '1.0.0'
id 'org.asciidoctor.convert' version '1.5.3'
}
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'groovy'
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
dependencies {
compile 'org.eclipse.jetty.aggregate:jetty-all:7.6.15.v20140411'
compile localGroovy()
}
asciidoctorj {
version = '1.5.5'
}
asciidoctor {
sources{
include 'index.adoc'
}
outputs.upToDateWhen { false }
backends 'epub3'
options doctype: 'book'
attributes \
'build-gradle': file('build.gradle'),
'sourcedir': project.sourceSets.main.java.srcDirs[0],
'endpoint-url': 'http://example.org',
'source-highlighter': 'coderay',
'imagesdir': 'images',
'toc': 'left',
'icons': 'font',
'setanchors': '',
'idprefix': '',
'idseparator': '-',
'docinfo1': ''
}
task serveApp(type: JavaExec, dependsOn:['bake']){
group 'build'
description 'Serve app'
main = 'ServeApp'
classpath = sourceSets.main.runtimeClasspath
}
jbake {
configuration['site.host'] = project.hasProperty('siteHost') ? project.siteHost : 'https://groovy-lang.gitlab.io/101-scripts'
configuration['site.title'] = project.hasProperty('siteTitle') ? project.title : '101 Groovy scripts'
}
#Sun Jul 30 09:47:56 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
/*
* This settings file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
* In a single project build this file can be empty or even removed.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user guide at https://docs.gradle.org/3.3/userguide/multi_project_builds.html
*/
/*
// To declare projects as part of a multi-project build use the 'include' method
include 'shared'
include 'api'
include 'services:webservice'
*/
rootProject.name = 'groovy-lang.gitlab.io'
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.js"></script>
[[i18n]]
= Asciidoctor Playground: _i18n_ Noto Šerif
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>
:username: mojavelinux
:source: http://www.impallari.com/testing
[abstract]
Grumpy wizards make toxic brew for the evil Queen and Jack.
But they feared not, for they had the many tongues of Noto Serif on their side.
== Diacritics
À Á Â Ã Ä Å Ā Ă Ą Ǻ Ȁ Ȃ Æ Ǽ Ć Ç Ĉ Ċ Č Ď Đ Ð Ḍ DZ Dz DŽ Dž È É Ê Ë Ē Ĕ Ė Ę Ẽ Ě Ẹ Ȅ Ȇ Ə Ǵ Ĝ Ğ Ġ Ģ Ĥ Ħ Ḥ Ĭ Ì Í Î Ï İ Ĩ Ī Į Ị Ȉ Ȋ IJ Ĵ Ķ Ĺ Ļ Ľ Ŀ Ł LJ Lj Ñ Ń Ņ Ň Ṅ Ŋ NJ Nj Ò Ó Ô Õ Ö Ō Ŏ Ő Ø Ǿ Ǫ Ọ Ȍ Ȏ Œ Þ Ŕ Ŗ Ř Ṛ Ȑ Ȓ Ś Ŝ Š Ș Ş Ṣ Ŧ Ť Ț Ţ Ṭ Ù Ú Û Ü Ũ Ū Ŭ Ů Ű Ų Ụ Ȕ Ȗ Ẁ Ẃ Ẅ Ŵ Ý Ŷ Ÿ Ỳ Ỹ Ź Ż Ž Ẓ
à á â ã ä å ā ă ą ǻ ȁ ȃ æ ǽ ć ç ĉ ċ č ď đ ð ḍ dz dž è é ê ë ē ĕ ė ę ě ẽ ẹ ȅ ȇ ə ǵ ĝ ğ ġ ģ ĥ ħ ḥ ì í î ï ĩ ī į ĭ ị ȉ ȋ ij ĵ ķ ĸ ĺ ļ ľ ŀ ł lj ń ʼn ņ ň ñ ṅ ŋ nj ò ó ô õ ö ø ō ŏ ő ǿ ǫ ọ ȍ ȏ œ þ ŕ ŗ ř ṛ ȑ ȓ ś ŝ š ș ş ṣ ß ŧ ť ț ţ ṭ ù ú û ü ũ ū ŭ ů ű ų ụ ȕ ȗ µ μ ẁ ẃ ẅ ŵ ý ÿ ŷ ỳ ỹ ź ż ž ẓ
[lowergreek]
. one
. two
. three
=== Azeri
Zəfər, jaketini də papağını da götür, bu axşam hava çox soyuq olacaq.
=== Catalan
Jove xef, porti whisky amb quinze glaçons d'hidrogen, coi!
=== Croatian
Gojazni đačić s biciklom drži hmelj i finu vatu u džepu nošnje.
=== Czech
Nechť již hříšné saxofony ďáblů rozzvučí síň úděsnými tóny waltzu, tanga a quickstepu
=== Danish
Høj bly gom vandt fræk sexquiz på wc
=== Dutch
Lynx c.q. vos prikt bh: dag zwemjuf!
=== Esperanto
Eble ĉiu kvazaŭ-deca fuŝĥoraĵo ĝojigos homtipon
=== Estonian
Põdur Zagrebi tšellomängija-följetonist Ciqo külmetas kehvas garaažis
=== Filipino
Ang buko ay para sa tao dahil wala nang pwedeng mainom na gatas.
=== Finnish
Törkylempijävongahdus Albert osti fagotin ja töräytti puhkuvan melodian
=== French
Buvez de ce whisky que le patron juge fameux
=== West Frisian
Alve bazige froulju wachtsje op dyn komst
=== German
Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich
=== Hungarian
Jó foxim és don Quijote húszwattos lámpánál ülve egy pár bűvös cipőt készít
=== Icelandic
Kæmi ný öxi hér, ykist þjófum nú bæði víl og ádrepa.
=== Irish
D'fhuascail Íosa Úrmhac na hÓighe Beannaithe pór Éava agus Ádhaimh
=== Italian
In quel campo si trovan funghi in abbondanza.
=== Latvian
Muļķa hipiji turpat brīvi mēģina nogaršot celofāna žņaudzējčūsku.
=== Lithuanian
Įlinkdama fechtuotojo špaga sublykčiojusi pragręžė apvalų arbūzą
=== Norwegian
Vår sære Zulu fra badeøya spilte jo whist og quickstep i min taxi.
=== Polish
Jeżu klątw, spłódź Finom część gry hańb!
=== Portuguese
Luís argüia à Júlia que «brações, fé, chá, óxido, pôr, zângão» eram palavras do português.
=== Romanian
Muzicologă în bej vând whisky și tequila, preț fix.
=== Serbian (also applies to Croatian and Bosnian)
Gojazni đačić s biciklom drži hmelj i finu vatu u džepu nošnje.
=== Slovak
Kŕdeľ ďatľov učí koňa žrať kôru.
=== Slovenian
Šerif bo za vajo spet kuhal domače žgance. Piškur molče grabi fižol z dna cezijeve hoste.
=== Spanish
El veloz murciélago hindú comía feliz cardillo y kiwi. ¡qué figurota exhibe! La cigüeña tocaba el saxofón ¿Detrás del palenque de paja?
=== Swedish
Yxskaftbud, ge vår WC-zonmö IQ-hjälp.
=== Turkish
Fahiş bluz güvencesi yağdırma projesi çöktü.
== More
=== Bulgarian
Ах чудна българска земьо, полюшквай цъфтящи жита.
=== Greek
Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
=== Japanese
いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす 色は匂へど 散りぬるを 我が世誰ぞ 常ならむ 有為の奥山 今日越えて 浅き夢見じ 酔ひもせず(ん)
=== Korean
키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.
=== Russian
Съешь же ещё этих мягких французских булок, да выпей чаю.
=== Ukrainian
Жебракують філософи при ґанку церкви в Гадячі, ще й шатро їхнє п'яне знаємо.
= Asciidoctor EPUB3: Sample Book
Author Name
v1.0, 2014-04-15
:doctype: book
:producer: Asciidoctor
:keywords: Asciidoctor, samples, e-book, EPUB3, KF8, MOBI, Asciidoctor.js
:copyright: CC-BY-SA 3.0
// NOTE anthology adds support for an author per chapter; use book for a single author
:publication-type: anthology
:idprefix:
:idseparator: -
:imagesdir: images
//:front-cover-image: image:front-cover.jpg[Front Cover,1050,1600]
ifeval::["{scripts}" == "multilingual"]
include::i18n.adoc[]
endif::[]
include::sample-content.adoc[]
include::../../jbake/content/blog/2013/fourth-post.adoc[]
[#sample-content]
= Asciidoctor Playground: Sample Content
Sarah White <https://github.com/graphitefriction[@graphitefriction]>
:username: graphitefriction
:description: This guide describes the Asciidoctor attributes, values, and layout options available for producing a customized and polished document.
:keywords: AsciiDoc, Asciidoctor, syntax, reference
:language: asciidoc
[abstract]
This sample guide describes several Asciidoctor attributes, values, and layout options available for producing a customized and polished document.
== Text size and justification
* *http://guides.github.com/overviews/forking[Fork] the repository* and clone it locally.
Connect your local to the original _upstream_ repository by adding it as a remote.
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
== Block titles
You can assign a title to any paragraph, list, delimited block, or block macro.
In most cases, the title is displayed immediately above the content.
If the content is a figure or image, the title is displayed below the content.
A block title is defined on a line above the element.
The line must begin with a dot (`.`) and be followed immediately by the title text with no spaces inbetween.
Here's an example of a list with a title:
.A titled list
====
.TODO list
- Learn the AsciiDoc syntax
- Install Asciidoctor
- Write my novel
====
== Metadata
In addition to a title, lists and blocks can be assigned metadata, including:
* Id (i.e., anchor)
* Style (first unnamed block attribute)
* Named block attributes
* Options
Here's an example of a quote block with metadata:
[source]
----
.Gettysburg Address <1>
[#gettysburg] <2>
[quote, Abraham Lincoln, Soldiers' National Cemetery Dedication] <3> <4> <5>
____
Four score and seven years ago our fathers brought forth on this continent a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war,
testing whether that nation,
or any nation so conceived and so dedicated,
can long endure.
...
Fourscoreandsevenyearsagoourfathersbroughtforthonthiscontinentanewnation...
____
----
<1> Title: Gettysburg Address
<2> Id: gettysburg
<3> Style: quote
<4> attribution: Abraham Lincoln (Named block attribute)
<5> citetitle: Dedication of the Soldiers' National Cemetery (Named block attribute)
TIP: A block can have multiple block attribute lines.
The attributes will be aggregated.
If there is a name conflict, the last attribute defined wins.
Some metadata is used as supplementary content, such as the title, whereas other metadata controls how the block is rendered, such as the style.
== Delimited blocks
The AsciiDoc syntax provides a set of components for including non-paragraph text--such as block quotes, source code listings, sidebars and tables--in your document.
These components are referred to as _delimited blocks_ because they are surrounded by delimiter lines.
Within the boundaries of a delimited block, you can enter any content or blank lines.
The block doesn't end until the ending delimiter is found.
The delimiters around the block determine the type of block, how the content is processed and rendered, and what elements are used to wrap the content in the output.
=== Optional delimiters
If the content is contiguous (not interrupted by blank lines), you can forgo the use of the block delimiters and instead use the block style above a paragraph to repurpose it as one of the delimited block types.
NOTE: This format is often used for single-line listings or quotes.
.Single line listing block
[source]
----
[listing]
sudo yum install asciidoc
----
.Single line quote block
[source]
----
[quote]
Never do today what you can put off 'til tomorrow.
----
== Admonitions
There are certain statements that you may want to draw attention to by taking them out of the content's flow and labeling them with a priority.
These are called admonitions.
Asciidoctor provides five built-in admonition style labels:
Tip:: Used for giving the reader helpful advice.
Note:: Used to communicate related or follow-up information.
Important:: Used to remind the reader to do a critical step or task.
Warning:: Used to inform the reader of potential risks.
Caution:: Also used to inform the reader of potential risks, take your pick.
When you want to call attention to a single paragraph, start the first line of the paragraph with the label you want to use.
The label must be uppercase and followed by a colon (`:`).
WARNING: Wolpertingers are known to nest in server racks.
Enter at your own risk.
When you want to apply an admonition label to complex content, set the label as a style attribute on a delimited block.
Admonition labels are commonly set on example blocks.
This behavior is referred to as _masquerading_.
The label must be uppercase when set as an attribute on a block.
[IMPORTANT]
.Feeding the Werewolves
====
While werewolves are hardy community members, keep in mind the following dietary concerns:
. They are allergic to cinnamon.
. More than two glasses of orange juice in 24 hours makes them howl in harmony with alarms and sirens.
. Celery makes them sad.
====
== Quotes, Prose Excerpts, and Verses
Quotes, prose excerpts and verses share the same syntax structure, including:
* style attribute, either `quote` or `verse`
* name of who the content is attributed to
* bibliographical information of the book, speech, play, etc., where the content was drawn from
* excerpt text
.Anatomy of a basic quote
----
[quote, attribution, citation title and information]
Quote or excerpt text
----
For content that doesn't require the preservation of line breaks, set the +quote+ attribute in the first position of the attribute list.
Next, set the attribution and relevant citation information.
However, these positional attributes are optional.
If the quote is a single line or paragraph, you can place the attribute list directly on top of the text.
.after landing the cloaked Klingon bird of prey in Golden Gate park
[quote, James Kirk, Star Trek IV: The Voyage Home]
Everybody remember where we parked.
For those of you who want a little bit of culture in this document, here's an excerpt of a poem by Carl Sandburg.
[verse, Carl Sandburg, Fog]
____
The fog comes
on little cat feet.
It sits looking
over harbor and city
on silent haunches
and then moves on.
____
That's all folks!
This diff is collapsed.
/* Sticky footer styles
-------------------------------------------------- */
html,
body {