├── .github ├── CODEOWNERS ├── renovate.json └── FUNDING.yml ├── ascii2svg ├── doc.go └── ascii2svg.go ├── go.mod ├── go.sum ├── CONTRIBUTING.md ├── .gitattributes ├── .gitignore ├── SECURITY.md ├── .dockerignore ├── .golangci.yml ├── main_test.go ├── main.go ├── .goreleaser.yml ├── .editorconfig ├── Makefile ├── .circleci └── config.yml ├── Dockerfile ├── doc.go ├── README.md ├── CODE_OF_CONDUCT.md └── LICENSE /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @moul 2 | -------------------------------------------------------------------------------- /ascii2svg/doc.go: -------------------------------------------------------------------------------- 1 | package ascii2svg // import "moul.io/ascii2svg/ascii2svg" 2 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module moul.io/ascii2svg 2 | 3 | go 1.12 4 | 5 | require gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717 6 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "groupName": "all", 6 | "gomodTidy": true 7 | } 8 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | #github: ["moul"] 2 | patreon: moul 3 | open_collective: moul 4 | custom: 5 | - "https://www.buymeacoffee.com/moul" 6 | - "https://manfred.life/donate" 7 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717 h1:OvXt/p4cdwNl+mwcWMq/AxaKFkhdxcjx+tx+qf4EOvY= 2 | gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717/go.mod h1:cKXr3E0k4aosgycml1b5z33BVV6hai1Kh7uDgFOkbcs= 3 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, you can first discuss the change you wish to make via issue, 4 | email, or any other method with the maintainers of this repository before making a change. 5 | 6 | Please note we have a code of conduct, please follow it in all your interactions with the project. 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Collapse vendored and generated files on GitHub 5 | vendor/* linguist-vendored 6 | */vendor/* linguist-vendored 7 | *.gen.* linguist-generated 8 | *.pb.go linguist-generated 9 | 10 | # Reduce conflicts on markdown files 11 | *.md merge=union 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Temporary files 2 | *~ 3 | *# 4 | .#* 5 | coverage.txt 6 | 7 | # Vendors 8 | node_modules/ 9 | vendor/ 10 | 11 | # Binaries for programs and plugins 12 | dist/ 13 | gin-bin 14 | *.exe 15 | *.exe~ 16 | *.dll 17 | *.so 18 | *.dylib 19 | 20 | # Test binary, build with `go test -c` 21 | *.test 22 | 23 | # Output of the go coverage tool, specifically when used with LiteIDE 24 | *.out 25 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting security issues 2 | 3 | I take security seriously. If you discover a security issue, please bring it to my attention right away! 4 | 5 | ### Reporting a Vulnerability 6 | 7 | Please **DO NOT** file a public issue, instead send your report privately to m+security-report@42.am. 8 | 9 | Security reports are greatly appreciated and I will publicly thank you for it, although I keep your name confidential if you request it. 10 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | ## 2 | ## Specific to .dockerignore 3 | ## 4 | 5 | .git/ 6 | Dockerfile 7 | contrib/ 8 | 9 | ## 10 | ## Common with .gitignore 11 | ## 12 | 13 | # Temporary files 14 | *~ 15 | *# 16 | .#* 17 | 18 | # Vendors 19 | node_modules/ 20 | vendor/ 21 | 22 | # Binaries for programs and plugins 23 | dist/ 24 | gin-bin 25 | *.exe 26 | *.exe~ 27 | *.dll 28 | *.so 29 | *.dylib 30 | 31 | # Test binary, build with `go test -c` 32 | *.test 33 | 34 | # Output of the go coverage tool, specifically when used with LiteIDE 35 | *.out 36 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | deadline: 1m 3 | tests: false 4 | #skip-files: 5 | # - ".*\\.gen\\.go" 6 | 7 | linters-settings: 8 | golint: 9 | min-confidence: 0 10 | maligned: 11 | suggest-new: true 12 | goconst: 13 | min-len: 5 14 | min-occurrences: 4 15 | misspell: 16 | locale: US 17 | 18 | linters: 19 | disable-all: true 20 | enable: 21 | - goconst 22 | - misspell 23 | - deadcode 24 | - misspell 25 | - structcheck 26 | - errcheck 27 | - unused 28 | - varcheck 29 | - staticcheck 30 | - unconvert 31 | - gofmt 32 | - goimports 33 | - golint 34 | - ineffassign 35 | -------------------------------------------------------------------------------- /main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "os" 4 | 5 | func Example() { 6 | os.Args = []string{"hello", "world"} 7 | main() 8 | // Output: 9 | // 10 | // 11 | // 12 | // 13 | // 14 | //
15 | //
world
16 | //
17 | //
18 | //
19 | //
20 | } 21 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main // import "moul.io/ascii2svg" 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | "strings" 9 | 10 | cli "gopkg.in/urfave/cli.v2" 11 | "moul.io/ascii2svg/ascii2svg" 12 | ) 13 | 14 | func main() { 15 | app := cli.App{ 16 | Flags: []cli.Flag{}, // width, height, bgcolor, fgcolor 17 | Action: run, 18 | } 19 | if err := app.Run(os.Args); err != nil { 20 | log.Printf("error: %v\n", err) 21 | os.Exit(1) 22 | } 23 | } 24 | 25 | func run(c *cli.Context) error { 26 | input := strings.Join(c.Args().Slice(), " ") 27 | if input == "" { 28 | inBytes, err := ioutil.ReadAll(os.Stdin) 29 | if err != nil { 30 | return err 31 | } 32 | input = string(inBytes) 33 | } 34 | out, err := ascii2svg.FromString(input) 35 | if err != nil { 36 | return err 37 | } 38 | fmt.Println(out) 39 | return nil 40 | } 41 | -------------------------------------------------------------------------------- /ascii2svg/ascii2svg.go: -------------------------------------------------------------------------------- 1 | package ascii2svg 2 | 3 | import ( 4 | "fmt" 5 | "html" 6 | ) 7 | 8 | const template = ` 9 | 10 | 11 | 12 | 13 |
14 |
%s
15 |
16 |
17 |
18 |
` 19 | 20 | func FromString(input string) (string, error) { 21 | escapedInput := html.EscapeString(input) 22 | out := fmt.Sprintf(template, escapedInput) 23 | return out, nil 24 | } 25 | -------------------------------------------------------------------------------- /.goreleaser.yml: -------------------------------------------------------------------------------- 1 | before: 2 | hooks: 3 | - go mod download 4 | builds: 5 | - 6 | goos: [linux, darwin, windows] 7 | goarch: [386, amd64, arm, arm64] 8 | flags: 9 | - "-a" 10 | ldflags: 11 | - '-extldflags "-static"' 12 | env: 13 | - CGO_ENABLED=0 14 | archives: 15 | - wrap_in_directory: true 16 | replacements: 17 | darwin: Darwin 18 | linux: Linux 19 | windows: Windows 20 | 386: i386 21 | amd64: x86_64 22 | checksum: 23 | name_template: 'checksums.txt' 24 | snapshot: 25 | name_template: "{{ .Tag }}-next" 26 | changelog: 27 | sort: asc 28 | filters: 29 | exclude: 30 | - '^docs:' 31 | - '^test:' 32 | brew: 33 | name: ascii2svg 34 | github: 35 | owner: moul 36 | name: homebrew-moul 37 | commit_author: 38 | name: moul-bot 39 | email: "m+bot@42.am" 40 | homepage: https://manfred.life/ 41 | description: "ascii2svg" 42 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | 10 | indent_style = space 11 | indent_size = 4 12 | 13 | [Makefile] 14 | indent_style = tab 15 | 16 | [*.go] 17 | indent_style = tab 18 | 19 | [*.proto] 20 | indent_size = 2 21 | 22 | [*.swift] 23 | indent_size = 4 24 | 25 | [*.tmpl] 26 | indent_size = 2 27 | 28 | [*.js] 29 | indent_size = 2 30 | block_comment_start = /* 31 | block_comment_end = */ 32 | 33 | [*.html] 34 | indent_size = 2 35 | 36 | [*.bat] 37 | end_of_line = crlf 38 | 39 | [*.{json,yml}] 40 | indent_size = 2 41 | 42 | [.{babelrc,eslintrc}] 43 | indent_size = 2 44 | 45 | [{Fastfile,.buckconfig,BUCK}] 46 | indent_size = 2 47 | 48 | [*.diff] 49 | indent_size = 1 50 | 51 | [*.m] 52 | indent_size = 1 53 | indent_style = space 54 | block_comment_start = /** 55 | block_comment = * 56 | block_comment_end = */ 57 | 58 | [*.java] 59 | indent_size = 4 60 | indent_style = space 61 | block_comment_start = /** 62 | block_comment = * 63 | block_comment_end = */ 64 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | GO ?= go 2 | DOCKER_IMAGE ?= moul/ascii2svg 3 | 4 | .PHONY: install 5 | install: 6 | $(GO) install . 7 | 8 | .PHONY: test 9 | test: 10 | echo "" > /tmp/coverage.txt 11 | set -e; for dir in `find . -type f -name "go.mod" | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ 12 | cd $$dir; \ 13 | $(GO) test -mod=readonly -v -cover -coverprofile=/tmp/profile.out -covermode=atomic -race ./...; \ 14 | if [ -f /tmp/profile.out ]; then \ 15 | cat /tmp/profile.out >> /tmp/coverage.txt; \ 16 | rm -f /tmp/profile.out; \ 17 | fi); done 18 | mv /tmp/coverage.txt . 19 | 20 | .PHONY: lint 21 | lint: 22 | golangci-lint run --verbose ./... 23 | 24 | .PHONY: release 25 | release: 26 | goreleaser --snapshot --skip-publish --rm-dist 27 | @echo -n "Do you want to release? [y/N] " && read ans && [ $${ans:-N} = y ] 28 | goreleaser --rm-dist 29 | 30 | .PHONY: docker 31 | docker: 32 | docker build \ 33 | --build-arg VCS_REF=`git rev-parse --short HEAD` \ 34 | --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ 35 | --build-arg VERSION=`git describe --tags --always` \ 36 | -t $(DOCKER_IMAGE) . 37 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | executors: 4 | golang: 5 | working_directory: /go/src/moul.io/ascii2svg 6 | docker: 7 | - image: circleci/golang:1.16 8 | environment: 9 | GO111MODULE: "on" 10 | DOCKER_IMAGE: moul/ascii2svg 11 | 12 | docker: 13 | docker: 14 | - image: docker:18.06.3-ce-git 15 | 16 | orbs: 17 | codecov: codecov/codecov@1.0.5 18 | moul: moul/build@1.5.0 19 | retry: moul/retry@0.6.0 20 | docker: circleci/docker@0.5.13 21 | #dl: moul/dl@1.7.0 22 | tools: gotest/tools@0.0.10 23 | 24 | jobs: 25 | go-build: 26 | executor: golang 27 | steps: 28 | - checkout 29 | - retry/install 30 | - tools/mod-download 31 | - tools/mod-tidy-check 32 | - run: retry -m 3 make install 33 | - run: retry -m 3 make test 34 | - moul/install_golangci-lint 35 | - run: PATH=$PATH:$(pwd)/bin retry -m 3 make lint 36 | - codecov/upload: 37 | file: coverage.txt 38 | 39 | docker-build: 40 | executor: docker 41 | steps: 42 | - checkout 43 | - setup_remote_docker: 44 | docker_layer_caching: true 45 | - docker/build: 46 | image: moul/ascii2svg 47 | #- docker/dockerlint 48 | 49 | workflows: 50 | main: 51 | jobs: 52 | - go-build 53 | - docker-build 54 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # dynamic config 2 | ARG BUILD_DATE 3 | ARG VCS_REF 4 | ARG VERSION 5 | 6 | # build 7 | FROM golang:1.16-alpine as builder 8 | RUN apk add --no-cache git gcc musl-dev make 9 | ENV GO111MODULE=on 10 | WORKDIR /go/src/moul.io/ascii2svg 11 | COPY go.* ./ 12 | RUN go mod download 13 | COPY . ./ 14 | RUN make install 15 | 16 | # minimalist runtime 17 | FROM alpine:3.13 18 | LABEL org.label-schema.build-date=$BUILD_DATE \ 19 | org.label-schema.name="ascii2svg" \ 20 | org.label-schema.description="" \ 21 | org.label-schema.url="https://moul.io/ascii2svg/" \ 22 | org.label-schema.vcs-ref=$VCS_REF \ 23 | org.label-schema.vcs-url="https://github.com/moul/ascii2svg" \ 24 | org.label-schema.vendor="Manfred Touron" \ 25 | org.label-schema.version=$VERSION \ 26 | org.label-schema.schema-version="1.0" \ 27 | org.label-schema.cmd="docker run -i -t --rm moul/ascii2svg" \ 28 | org.label-schema.help="docker exec -it $CONTAINER ascii2svg --help" 29 | COPY --from=builder /go/bin/ascii2svg /bin/ 30 | ENTRYPOINT ["/bin/ascii2svg"] 31 | #CMD [] 32 | -------------------------------------------------------------------------------- /doc.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2019 Manfred Touron . 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // message from the author: 16 | // +--------------------------------------------------------------+ 17 | // | * * * ░░░░░░░░░░░░░░░░░░░░ Hello ░░░░░░░░░░░░░░░░░░░░░░░░░░| 18 | // +--------------------------------------------------------------+ 19 | // | | 20 | // | ++ ______________________________________ | 21 | // | ++++ / \ | 22 | // | ++++ | | | 23 | // | ++++++++++ | Feel free to contribute to this | | 24 | // | +++ | | project or contact me on | | 25 | // | ++ | | manfred.life if you like this | | 26 | // | + -== ==| | project! | | 27 | // | ( <*> <*> | | | 28 | // | | | /| :) | | 29 | // | | _) / | | | 30 | // | | +++ / \______________________________________/ | 31 | // | \ =+ / | 32 | // | \ + | 33 | // | |\++++++ | 34 | // | | ++++ ||// | 35 | // | ___| |___ _||/__ __| 36 | // | / --- \ \| ||| __ _ ___ __ __/ /| 37 | // |/ | | \ \ / / ' \/ _ \/ // / / | 38 | // || | | | | | /_/_/_/\___/\_,_/_/ | 39 | // +--------------------------------------------------------------+ 40 | package main // import "moul.io/ascii2svg" 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ascii2svg 2 | 3 | :smile: ascii2svg creates .svg images from an ascii text 4 | 5 | [![CircleCI](https://circleci.com/gh/moul/ascii2svg.svg?style=shield)](https://circleci.com/gh/moul/ascii2svg) 6 | [![GoDoc](https://godoc.org/moul.io/ascii2svg?status.svg)](https://godoc.org/moul.io/ascii2svg) 7 | [![License](https://img.shields.io/github/license/moul/ascii2svg.svg)](https://github.com/moul/ascii2svg/blob/master/LICENSE) 8 | [![GitHub release](https://img.shields.io/github/release/moul/ascii2svg.svg)](https://github.com/moul/ascii2svg/releases) 9 | [![Go Report Card](https://goreportcard.com/badge/moul.io/ascii2svg)](https://goreportcard.com/report/moul.io/ascii2svg) 10 | [![CodeFactor](https://www.codefactor.io/repository/github/moul/ascii2svg/badge)](https://www.codefactor.io/repository/github/moul/ascii2svg) 11 | [![codecov](https://codecov.io/gh/moul/ascii2svg/branch/master/graph/badge.svg)](https://codecov.io/gh/moul/ascii2svg) 12 | [![Docker Metrics](https://images.microbadger.com/badges/image/moul/ascii2svg.svg)](https://microbadger.com/images/moul/ascii2svg) 13 | [![Sourcegraph](https://sourcegraph.com/github.com/moul/ascii2svg/-/badge.svg)](https://sourcegraph.com/github.com/moul/ascii2svg?badge) 14 | [![Made by Manfred Touron](https://img.shields.io/badge/made%20by-Manfred%20Touron-blue.svg?style=flat)](https://manfred.life/) 15 | 16 | 17 | ## Usage 18 | 19 | ```console 20 | $ cat SECURITY.md | ascii2svg 21 | 22 | 23 | 24 | 25 | 26 |
27 |
# Reporting security issues
28 | 
29 | I take security seriously. If you discover a security issue, please bring it to my attention right away!
30 | 
31 | ### Reporting a Vulnerability
32 | 
33 | Please **DO NOT** file a public issue, instead send your report privately to m+security-report@42.am.
34 | 
35 | Security reports are greatly appreciated and I will publicly thank you for it, although I keep your name confidential if you request it.
36 | 
37 |
38 |
39 |
40 |
41 | ``` 42 | 43 | ## Install 44 | 45 | ### Using go 46 | 47 | ```console 48 | $ go get -u moul.io/ascii2svg 49 | ``` 50 | 51 | ### Using brew 52 | 53 | ```console 54 | $ brew install moul/moul/ascii2svg 55 | ``` 56 | 57 | ### Download releases 58 | 59 | https://github.com/moul/ascii2svg/releases 60 | 61 | ## License 62 | 63 | © 2019 [Manfred Touron](https://manfred.life) - 64 | [Apache-2.0 License](https://github.com/moul/ascii2svg/blob/master/LICENSE) 65 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at m+coc-report@42.am. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2019 Manfred Touron 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------