From b9bb9075c81359ad3448abc52d07634b761b5b83 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Mon, 25 Mar 2024 21:00:09 -0400 Subject: [PATCH] Add license headers, licensure. --- .github/workflows/mtrack.yaml | 13 ++++++++++++- .licensure.yml | 29 +++++++++++++++++++++++++++++ src/audio.rs | 13 +++++++++++++ src/audio/alsa.rs | 13 +++++++++++++ src/audio/cpal.rs | 13 +++++++++++++ src/audio/mock.rs | 13 +++++++++++++ src/config.rs | 13 +++++++++++++ src/config/controller.rs | 13 +++++++++++++ src/config/midi.rs | 13 +++++++++++++ src/config/player.rs | 13 +++++++++++++ src/config/playlist.rs | 13 +++++++++++++ src/config/song.rs | 13 +++++++++++++ src/config/track.rs | 13 +++++++++++++ src/controller.rs | 13 +++++++++++++ src/controller/keyboard.rs | 13 +++++++++++++ src/controller/midi.rs | 13 +++++++++++++ src/main.rs | 13 +++++++++++++ src/midi.rs | 13 +++++++++++++ src/midi/midir.rs | 13 +++++++++++++ src/midi/mock.rs | 13 +++++++++++++ src/player.rs | 13 +++++++++++++ src/playlist.rs | 13 +++++++++++++ src/playsync.rs | 13 +++++++++++++ src/songs.rs | 13 +++++++++++++ src/test.rs | 13 +++++++++++++ 25 files changed, 340 insertions(+), 1 deletion(-) create mode 100644 .licensure.yml diff --git a/.github/workflows/mtrack.yaml b/.github/workflows/mtrack.yaml index a1d24d5..141b079 100644 --- a/.github/workflows/mtrack.yaml +++ b/.github/workflows/mtrack.yaml @@ -43,4 +43,15 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: Test mtrack - run: cargo test --all --verbose \ No newline at end of file + run: cargo test --all --verbose + + licensure: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Install licensure + run: cargo install licensure + - uses: Swatinem/rust-cache@v2 + - name: Check for licenses + run: licensure --check -p diff --git a/.licensure.yml b/.licensure.yml new file mode 100644 index 0000000..3802ddd --- /dev/null +++ b/.licensure.yml @@ -0,0 +1,29 @@ +change_in_place: true +excludes: + - \.gitignore + - .*lock + - \.git/.* + - \.licensure\.yml + - README.* + - LICENSE.* + - .*\.(md|rst|txt) + - Cargo.toml + - .*\.yaml + - .*\.wav + - .*\.mid +licenses: + - files: any + ident: GPL-3.0 + authors: + - name: Michael Wilson + email: mike@mdwn.dev + auto_template: true + +comments: + - columns: 80 + extensions: + - rs + commenter: + type: line + comment_char: "//" + trailing_lines: 0 diff --git a/src/audio.rs b/src/audio.rs index 86e5df9..4deb20f 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{error::Error, fmt, sync::Arc}; use crate::playsync::CancelHandle; diff --git a/src/audio/alsa.rs b/src/audio/alsa.rs index 7b2d825..28093d2 100644 --- a/src/audio/alsa.rs +++ b/src/audio/alsa.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{collections::HashMap, error::Error, fmt}; use cpal::traits::{DeviceTrait, HostTrait}; diff --git a/src/audio/cpal.rs b/src/audio/cpal.rs index 520638c..6fc957b 100644 --- a/src/audio/cpal.rs +++ b/src/audio/cpal.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use super::alsa; use std::{ any::type_name, diff --git a/src/audio/mock.rs b/src/audio/mock.rs index e70d81c..27f7389 100644 --- a/src/audio/mock.rs +++ b/src/audio/mock.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{ error::Error, fmt, diff --git a/src/config.rs b/src/config.rs index a89d42b..fe8a876 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::collections::HashMap; use std::error::Error; use std::fs; diff --git a/src/config/controller.rs b/src/config/controller.rs index 71bb5bb..516733e 100644 --- a/src/config/controller.rs +++ b/src/config/controller.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{error::Error, sync::Arc}; use serde::Deserialize; diff --git a/src/config/midi.rs b/src/config/midi.rs index 7f2ee54..ee13dc3 100644 --- a/src/config/midi.rs +++ b/src/config/midi.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::error::Error; use midly::{ diff --git a/src/config/player.rs b/src/config/player.rs index ae55329..f0cf1ef 100644 --- a/src/config/player.rs +++ b/src/config/player.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use serde::Deserialize; use super::controller::Controller; diff --git a/src/config/playlist.rs b/src/config/playlist.rs index f9611ed..1a6de84 100644 --- a/src/config/playlist.rs +++ b/src/config/playlist.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use serde::Deserialize; /// The configuration for a playlist. diff --git a/src/config/song.rs b/src/config/song.rs index 95a9aed..aa0ffcc 100644 --- a/src/config/song.rs +++ b/src/config/song.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{ error::Error, path::{Path, PathBuf}, diff --git a/src/config/track.rs b/src/config/track.rs index c16b5b5..d85d752 100644 --- a/src/config/track.rs +++ b/src/config/track.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{error::Error, path::Path}; use serde::Deserialize; diff --git a/src/controller.rs b/src/controller.rs index c1af5dc..ef6c8c5 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::error::Error; use std::io; use std::sync::Arc; diff --git a/src/controller/keyboard.rs b/src/controller/keyboard.rs index 34b24c6..f2a9c98 100644 --- a/src/controller/keyboard.rs +++ b/src/controller/keyboard.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::io::{self, Write}; use tokio::{sync::mpsc::Sender, task::JoinHandle}; diff --git a/src/controller/midi.rs b/src/controller/midi.rs index 968554f..dfa5c89 100644 --- a/src/controller/midi.rs +++ b/src/controller/midi.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{io, sync::Arc}; use midly::live::LiveEvent; diff --git a/src/main.rs b/src/main.rs index c661a1a..22855bf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// mod audio; mod config; mod controller; diff --git a/src/midi.rs b/src/midi.rs index 9ffbb60..7616ecf 100644 --- a/src/midi.rs +++ b/src/midi.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{error::Error, fmt, sync::Arc}; use tokio::sync::mpsc::Sender; diff --git a/src/midi/midir.rs b/src/midi/midir.rs index c91adff..3b728df 100644 --- a/src/midi/midir.rs +++ b/src/midi/midir.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{ collections::HashMap, error::Error, diff --git a/src/midi/mock.rs b/src/midi/mock.rs index a79b2fd..9462a53 100644 --- a/src/midi/mock.rs +++ b/src/midi/mock.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{ error::Error, fmt, diff --git a/src/player.rs b/src/player.rs index b555668..4276716 100644 --- a/src/player.rs +++ b/src/player.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::{ error::Error, sync::{ diff --git a/src/playlist.rs b/src/playlist.rs index 428ee27..7d1e250 100644 --- a/src/playlist.rs +++ b/src/playlist.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use tracing::{info, span, Level, Span}; use crate::songs::{Song, Songs}; diff --git a/src/playsync.rs b/src/playsync.rs index cc76d4e..93e4779 100644 --- a/src/playsync.rs +++ b/src/playsync.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::sync::{Arc, Condvar, Mutex}; /// Represents the current cancel state. diff --git a/src/songs.rs b/src/songs.rs index 4b45f69..8c60be4 100644 --- a/src/songs.rs +++ b/src/songs.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// use std::collections::HashMap; use std::error::Error; use std::fs::{self, File}; diff --git a/src/test.rs b/src/test.rs index 32c7567..e61e21e 100644 --- a/src/test.rs +++ b/src/test.rs @@ -1,3 +1,16 @@ +// Copyright (C) 2024 Michael Wilson +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with +// this program. If not, see . +// #[cfg(test)] pub mod test { use std::{