mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-21 21:16:02 +00:00
add image copyright tracking
This commit is contained in:
parent
a17369597c
commit
97c8feb8ca
7
.github/workflows/ci-main.yml
vendored
7
.github/workflows/ci-main.yml
vendored
@ -17,8 +17,13 @@ jobs:
|
||||
CLICOLOR_FORCE: 1
|
||||
|
||||
steps:
|
||||
- { uses: actions/checkout@v3, with: { submodules: "recursive" } }
|
||||
- { uses: actions/checkout@v3, with: { submodules: "recursive", fetch-depth: "0" } }
|
||||
|
||||
- name: Copyright check
|
||||
if: success() || failure()
|
||||
run: |
|
||||
git config --global --add safe.directory /__w/wesnoth/wesnoth
|
||||
./update_copyrights --output=""
|
||||
- name: Check for invalid characters
|
||||
run: |
|
||||
./utils/CI/check_utf8.sh
|
||||
|
18066
copyrights.csv
Normal file
18066
copyrights.csv
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,237 +0,0 @@
|
||||
Portrait Credits:
|
||||
|
||||
|
||||
|
||||
Current:
|
||||
|
||||
|
||||
Kitty/Kathrin Polikeit:
|
||||
Elves:
|
||||
Fighter
|
||||
Captain
|
||||
Hero
|
||||
Archer male and female
|
||||
Marksman male and female
|
||||
Ranger male and female
|
||||
Shaman
|
||||
Druid
|
||||
Sorceress
|
||||
Shyde
|
||||
Lord
|
||||
High Lord
|
||||
Lady
|
||||
Sylph
|
||||
Human Mages:
|
||||
Dark Adept male and female
|
||||
Necromancer male and female
|
||||
Mage male and female
|
||||
Red Mage male and female
|
||||
White Mage male and female
|
||||
Silver Mage male and female
|
||||
Arch Mage male and female
|
||||
Mage of Light male and female
|
||||
Human Outlaws
|
||||
Thief/Rogue male and female
|
||||
Assassin male and female
|
||||
Trapper
|
||||
Ranger
|
||||
Huntsman
|
||||
Footpad male and female
|
||||
Outlaw male and female
|
||||
Ruffian
|
||||
Thug
|
||||
Bandit
|
||||
Goblins
|
||||
Wolf Rider
|
||||
Direwolf Rider
|
||||
Pillager
|
||||
Merfolk
|
||||
Enchantress
|
||||
Priestess
|
||||
Fighter
|
||||
Hoplite
|
||||
Triton
|
||||
Hunter
|
||||
Spearman
|
||||
Netcaster
|
||||
Undead:
|
||||
Ghost
|
||||
Spectre
|
||||
Shadow
|
||||
Nightgaunt
|
||||
Others:
|
||||
Troll Whelp
|
||||
Troll
|
||||
Gryphon
|
||||
Ghost
|
||||
Naga Fighter
|
||||
Naga Myrmidon
|
||||
Giant Mudcrawler
|
||||
|
||||
|
||||
Kitty/Kathrin Polikeit and Girgistan/Christian Sirviö:
|
||||
Undead Lich
|
||||
|
||||
|
||||
LordBob/Emilien Rotival:
|
||||
Human Loyalists:
|
||||
Peasant
|
||||
Spearman
|
||||
Swordsman
|
||||
Royal Guard
|
||||
Pikeman
|
||||
Halberdier
|
||||
Javelineer
|
||||
Sergeant
|
||||
Lieutenant
|
||||
General
|
||||
Marshal 1 and 2
|
||||
Woodsman
|
||||
Bowman
|
||||
Longbowman
|
||||
Master Bowman
|
||||
Horseman
|
||||
Knight
|
||||
Paladin
|
||||
Cavalryman
|
||||
Cavalier
|
||||
Fencer
|
||||
Duelist
|
||||
Master-at-arms
|
||||
Grand Knight 1 and 2
|
||||
Lancer
|
||||
Swordsman alt 3
|
||||
Royal Warrior
|
||||
Orcs
|
||||
Grunt line and alternates
|
||||
Warrior
|
||||
Warlord
|
||||
Archer
|
||||
Assassin
|
||||
Slayer
|
||||
Archer
|
||||
Crossbowman
|
||||
Slurbow
|
||||
Leader/Ruler, alternate Leader
|
||||
Sovereign
|
||||
|
||||
|
||||
thespaceinvader/Philip Barber:
|
||||
Drakes:
|
||||
Fighter
|
||||
Burner
|
||||
Inferno
|
||||
Flameheart
|
||||
Hurricane
|
||||
Enforcer
|
||||
Warden
|
||||
Saurians:
|
||||
Augur
|
||||
Skirmisher
|
||||
Dwarves:
|
||||
Dragonguard
|
||||
Fighter
|
||||
Guard
|
||||
Lord
|
||||
Sentinel
|
||||
Thunderer
|
||||
Ulfserker
|
||||
Runemaster
|
||||
Scout
|
||||
Explorer
|
||||
Other
|
||||
Ancient Wose
|
||||
|
||||
|
||||
Sleepwalker/Marcus Rosén
|
||||
Mermaid Initiate (update by Tet and eyerouge)
|
||||
|
||||
DUHH/Kim Holm
|
||||
Dwarf Fighter alternate
|
||||
|
||||
JustinOperable/Justin Nichols
|
||||
Ogre
|
||||
|
||||
Valkier/Chris Wilson
|
||||
Skeleton
|
||||
Deathblade
|
||||
Revenant
|
||||
Draug and alternate
|
||||
Ghoul
|
||||
Skeleton Archer line
|
||||
|
||||
bera/Bora Orcal
|
||||
Goblin Impaler
|
||||
Goblin Rouser and alternate
|
||||
|
||||
Quellion/Santiago Iborra
|
||||
Swordsman alternate
|
||||
Mermaid Initiate alternate
|
||||
Goblin Spearman alternate
|
||||
|
||||
thespaceinvader/Philip Barber and Girgistian/Christian Sirviö:
|
||||
Undead Death Knight
|
||||
Drake Clasher
|
||||
Drake Glider
|
||||
|
||||
LordBob/Emilien Rotival and Girgistan/Christian Sirviö:
|
||||
Orcish Grunt #2
|
||||
|
||||
thespaceinvader/Philip Barber and Kitty/Kathrin Polikeit:
|
||||
Gryphon Rider
|
||||
|
||||
thespaceinvader/Philip Barber and LordBob/Emilien Rotival:
|
||||
Drake Blademaster
|
||||
|
||||
bera/Bora Orcal and Kitty/Kathrin Polikeit:
|
||||
Goblin Spearman
|
||||
|
||||
ZygoUgo:
|
||||
Giant Rat
|
||||
|
||||
Outdated versions:
|
||||
|
||||
Jason Lutes:
|
||||
Humans:
|
||||
Javelineer
|
||||
Horseman
|
||||
Lancer
|
||||
Knight
|
||||
Grand Knight
|
||||
Paladin
|
||||
Thug
|
||||
Highwayman
|
||||
Bandit
|
||||
|
||||
James Woo:
|
||||
Human Assassin
|
||||
Orc Warlords 1 to 5
|
||||
Troll
|
||||
|
||||
Alex Jarocha-Ernst:
|
||||
Drakes:
|
||||
Burner
|
||||
Clasher
|
||||
Fighter
|
||||
Glider
|
||||
Merfolk:
|
||||
Fighter
|
||||
Hunter
|
||||
Others:
|
||||
Naga and Nagini Fighter
|
||||
Orc Assassin
|
||||
|
||||
Nicholas Kerpan:
|
||||
Human Poacher and Thief
|
||||
|
||||
Pekka Aikio:
|
||||
Human Bowman and Longbowman
|
||||
|
||||
Unknown:
|
||||
Brown Lich
|
||||
Cavalryman
|
||||
Human Master Bowman
|
||||
Sea Serpent
|
||||
|
||||
Valdroni/Jason Frailey:
|
||||
Scorpion
|
97
update_copyrights
Executable file
97
update_copyrights
Executable file
@ -0,0 +1,97 @@
|
||||
#!/usr/bin/env python3
|
||||
# encoding: utf-8
|
||||
|
||||
##
|
||||
# This script checks all media files in the repository for whether they've been modified or added without updating the file tracking image, sound, and music copyright
|
||||
##
|
||||
|
||||
import argparse
|
||||
import contextlib
|
||||
import csv
|
||||
from operator import itemgetter
|
||||
import os
|
||||
from pathlib import Path
|
||||
from subprocess import check_output
|
||||
import sys
|
||||
|
||||
def do_git(file):
|
||||
result = str(check_output(["git", "log", "-1", "--format=%ad,,,,,", "--date=format:%Y/%m/%d", file]), 'UTF-8').split(sep=",")
|
||||
if(len(result) < 6):
|
||||
print("bad result for file"+file+"`: "+",".join(result)+"`")
|
||||
result[1] = os.path.normpath(result[1])
|
||||
return result
|
||||
|
||||
args = argparse.ArgumentParser()
|
||||
args.add_argument("--repo", default=".", help="The directory of the Wesnoth repository to run this script against.")
|
||||
args.add_argument("--output", default="output.csv", help="The file to write the results of this script to.")
|
||||
args.add_argument("--input", default="copyrights.csv", help="The file to read the existing copyright data from.")
|
||||
|
||||
options = args.parse_args()
|
||||
os.chdir(options.repo)
|
||||
|
||||
with contextlib.suppress(FileNotFoundError):
|
||||
os.remove(options.output)
|
||||
|
||||
current_data = {}
|
||||
for root, _, files in os.walk(options.repo):
|
||||
for filename in files:
|
||||
filetype = Path(filename).suffix
|
||||
if filetype == ".png" or filetype == ".jpg" or filetype == ".webp" or filetype == ".wav" or filetype == ".ogg":
|
||||
file = os.path.join(root, filename)
|
||||
current_data[os.path.normpath(file)] = do_git(file)
|
||||
|
||||
added = []
|
||||
changed = []
|
||||
unchanged = []
|
||||
removed = []
|
||||
|
||||
previous_data = {}
|
||||
|
||||
with open(options.input) as csvfile:
|
||||
reader = csv.reader(csvfile)
|
||||
for row in reader:
|
||||
if row[0] == "Date":
|
||||
continue
|
||||
|
||||
date = row[0]
|
||||
file = row[1]
|
||||
|
||||
if file in current_data:
|
||||
if(date != current_data[file][0]):
|
||||
while(len(row) != 6):
|
||||
row.append("")
|
||||
row[5] = current_data[file][0]
|
||||
changed.append(row)
|
||||
else:
|
||||
unchanged.append(row)
|
||||
else:
|
||||
removed.append(row)
|
||||
|
||||
previous_data[file] = row
|
||||
|
||||
for key in current_data:
|
||||
if not key in previous_data:
|
||||
added.append(["", key, "", "", "", current_data[key][0]])
|
||||
|
||||
added.sort(key=itemgetter(1))
|
||||
changed.sort(key=itemgetter(1))
|
||||
unchanged.sort(key=itemgetter(1))
|
||||
|
||||
final_output = added + changed + unchanged
|
||||
|
||||
if options.output != "":
|
||||
with open(options.output, 'w') as f:
|
||||
f.write("Date,File,License,Author - Real Name(other name);Real Name(other name);etc,Notes,Needs Update\n")
|
||||
for row in final_output:
|
||||
f.write(",".join(row)+"\n")
|
||||
else:
|
||||
for row in final_output:
|
||||
print(",".join(row)+"\n")
|
||||
|
||||
if len(removed) > 0:
|
||||
print("There are "+str(len(removed))+" removed images")
|
||||
|
||||
if len(added) > 0 or len(changed) > 0:
|
||||
print("There are "+str(len(added))+" new images")
|
||||
print("There are "+str(len(changed))+" changed images")
|
||||
sys.exit(1)
|
Loading…
x
Reference in New Issue
Block a user