From 8b5ae7d7c567e016c21ebffb543545a76fe6e037 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sun, 31 Jan 2021 21:50:21 +0100 Subject: [PATCH 1/2] NF: add AGPL licence missing in some file I noticed it when I looked at some files now used in AnkiDroid, wanting to be sure we clearly indicate that we have AGPLv3 code linked in the app --- rslib/BUILD.bazel | 3 +++ rslib/backend.proto | 2 ++ rslib/build/main.rs | 3 +++ rslib/build/mergeftl.rs | 3 +++ rslib/build/protobuf.rs | 3 +++ rslib/build/write_fluent_proto.rs | 3 +++ rslib/cargo/BUILD.bazel | 3 +++ rslib/clang_format.bzl | 3 +++ rslib/proto_format.py | 5 ++++- rslib/rustfmt.bzl | 3 +++ rslib/src/backend_proto.rs | 3 +++ rslib/src/fluent_proto.rs | 3 +++ rslib/src/search/mod.rs | 3 +++ rslib/src/stats/card_stats.html | 3 +++ 14 files changed, 42 insertions(+), 1 deletion(-) diff --git a/rslib/BUILD.bazel b/rslib/BUILD.bazel index c2ae6fb9f..7ac28f55a 100644 --- a/rslib/BUILD.bazel +++ b/rslib/BUILD.bazel @@ -1,3 +1,6 @@ +# Copyright: Ankitects Pty Ltd and contributors +# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + load("@rules_proto//proto:defs.bzl", "proto_library") load("@io_bazel_rules_rust//rust:rust.bzl", "rust_binary", "rust_library", "rust_test") load("@io_bazel_rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script") diff --git a/rslib/backend.proto b/rslib/backend.proto index 56d38dd96..6d261efd4 100644 --- a/rslib/backend.proto +++ b/rslib/backend.proto @@ -1,3 +1,5 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html syntax = "proto3"; package BackendProto; diff --git a/rslib/build/main.rs b/rslib/build/main.rs index 45c316a6f..deaaa8c6a 100644 --- a/rslib/build/main.rs +++ b/rslib/build/main.rs @@ -1,3 +1,6 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + pub mod mergeftl; pub mod protobuf; diff --git a/rslib/build/mergeftl.rs b/rslib/build/mergeftl.rs index 24a7481e1..81ec6e80b 100644 --- a/rslib/build/mergeftl.rs +++ b/rslib/build/mergeftl.rs @@ -1,3 +1,6 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + use fluent_syntax::ast::Entry; use fluent_syntax::parser::Parser; use std::path::Path; diff --git a/rslib/build/protobuf.rs b/rslib/build/protobuf.rs index f83fdf635..93143af4a 100644 --- a/rslib/build/protobuf.rs +++ b/rslib/build/protobuf.rs @@ -1,3 +1,6 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + use std::path::PathBuf; use std::{env, fmt::Write}; diff --git a/rslib/build/write_fluent_proto.rs b/rslib/build/write_fluent_proto.rs index 66f97021c..6af7e21ed 100644 --- a/rslib/build/write_fluent_proto.rs +++ b/rslib/build/write_fluent_proto.rs @@ -1,3 +1,6 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + include!("mergeftl.rs"); fn main() { diff --git a/rslib/cargo/BUILD.bazel b/rslib/cargo/BUILD.bazel index 6ce3ec967..7dd17daf4 100644 --- a/rslib/cargo/BUILD.bazel +++ b/rslib/cargo/BUILD.bazel @@ -1,3 +1,6 @@ +# Copyright: Ankitects Pty Ltd and contributors +# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + """ @generated cargo-raze generated Bazel file. diff --git a/rslib/clang_format.bzl b/rslib/clang_format.bzl index a2fd92a69..3591a82c0 100644 --- a/rslib/clang_format.bzl +++ b/rslib/clang_format.bzl @@ -1,3 +1,6 @@ +# Copyright: Ankitects Pty Ltd and contributors +# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + """ Exposes a clang-format binary for formatting protobuf. """ diff --git a/rslib/proto_format.py b/rslib/proto_format.py index d170d9ee1..7cdf763a2 100755 --- a/rslib/proto_format.py +++ b/rslib/proto_format.py @@ -1,3 +1,6 @@ +# Copyright: Ankitects Pty Ltd and contributors +# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + import sys, subprocess, os, difflib clang_format = sys.argv[1] @@ -33,4 +36,4 @@ for path in sys.argv[2:]: found_bad = True if found_bad: - sys.exit(1) \ No newline at end of file + sys.exit(1) diff --git a/rslib/rustfmt.bzl b/rslib/rustfmt.bzl index a140458b8..b99cf75f4 100644 --- a/rslib/rustfmt.bzl +++ b/rslib/rustfmt.bzl @@ -1,3 +1,6 @@ +# Copyright: Ankitects Pty Ltd and contributors +# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + def _rustfmt_impl(ctx): toolchain = ctx.toolchains["@io_bazel_rules_rust//rust:toolchain"] script_name = ctx.label.name + "_script" diff --git a/rslib/src/backend_proto.rs b/rslib/src/backend_proto.rs index 8b00b2e2c..751d575cc 100644 --- a/rslib/src/backend_proto.rs +++ b/rslib/src/backend_proto.rs @@ -1 +1,4 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + include!(concat!(env!("OUT_DIR"), "/backend_proto.rs")); diff --git a/rslib/src/fluent_proto.rs b/rslib/src/fluent_proto.rs index 2e436ad28..12f1417fc 100644 --- a/rslib/src/fluent_proto.rs +++ b/rslib/src/fluent_proto.rs @@ -1 +1,4 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + include!(concat!(env!("OUT_DIR"), "/fluent_proto.rs")); diff --git a/rslib/src/search/mod.rs b/rslib/src/search/mod.rs index ef107a94a..cc5dc3328 100644 --- a/rslib/src/search/mod.rs +++ b/rslib/src/search/mod.rs @@ -1,3 +1,6 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + mod cards; mod notes; mod parser; diff --git a/rslib/src/stats/card_stats.html b/rslib/src/stats/card_stats.html index 0c97e95c6..91ec7906c 100644 --- a/rslib/src/stats/card_stats.html +++ b/rslib/src/stats/card_stats.html @@ -1,3 +1,6 @@ + + {% for row in stats %} From d219337023f3137299f02c1cf93aac954d8ed83e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 1 Feb 2021 12:46:29 +1000 Subject: [PATCH 2/2] Update card_stats.html Don't want the header accidentally getting copied about when users copy+paste their stats. --- rslib/src/stats/card_stats.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/rslib/src/stats/card_stats.html b/rslib/src/stats/card_stats.html index 91ec7906c..0c97e95c6 100644 --- a/rslib/src/stats/card_stats.html +++ b/rslib/src/stats/card_stats.html @@ -1,6 +1,3 @@ - -
{% for row in stats %}