From 58b0f50282cb015fd38b675be117060c6fe801f3 Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Fri, 26 Apr 2019 17:01:29 +0200 Subject: [PATCH] Add legal headers, as per the Apache 2 License instructions APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --- poc/bin/kroute | 17 +++++++++++++++++ poc/bin/request | 17 +++++++++++++++++ poc/bin/response | 17 +++++++++++++++++ poc/examples/helloworld.pow | 16 ++++++++++++++++ poc/examples/topdf | 16 ++++++++++++++++ poc/kapow | 17 +++++++++++++++++ 6 files changed, 100 insertions(+) diff --git a/poc/bin/kroute b/poc/bin/kroute index 5fd23ab..f60e9e1 100755 --- a/poc/bin/kroute +++ b/poc/bin/kroute @@ -1,4 +1,21 @@ #!/usr/bin/env python + +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + import sys import click diff --git a/poc/bin/request b/poc/bin/request index d21d921..3268445 100755 --- a/poc/bin/request +++ b/poc/bin/request @@ -1,2 +1,19 @@ #!/bin/sh + +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + curl -sf ${KAPOW_URL}/connections/${KAPOW_CONNECTION}/request$1 diff --git a/poc/bin/response b/poc/bin/response index 3fe5358..9113975 100755 --- a/poc/bin/response +++ b/poc/bin/response @@ -1,2 +1,19 @@ #!/bin/sh + +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + curl -sf -X PUT --data-binary @- ${KAPOW_URL}/connections/${KAPOW_CONNECTION}/response$1 diff --git a/poc/examples/helloworld.pow b/poc/examples/helloworld.pow index 90d61d3..5bb64e0 100755 --- a/poc/examples/helloworld.pow +++ b/poc/examples/helloworld.pow @@ -1,5 +1,21 @@ #!/bin/bash +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + kroute add -X POST --entrypoint ./topdf '/convert/{from}/pdf' diff --git a/poc/examples/topdf b/poc/examples/topdf index ae5db11..fb47fa8 100755 --- a/poc/examples/topdf +++ b/poc/examples/topdf @@ -1,5 +1,21 @@ #!/usr/bin/zsh +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + tmpfile=$(mktemp --suffix=.pdf) pandoc --from=$(request /match/from) --to=pdf --output=${tmpfile} -t latex =(request /body) if [ $? -eq 0 ]; then diff --git a/poc/kapow b/poc/kapow index 9a719ea..8afb8f5 100755 --- a/poc/kapow +++ b/poc/kapow @@ -1,4 +1,21 @@ #!/usr/bin/env python + +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + from urllib.parse import urlparse from uuid import uuid4 import asyncio