New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect clarified copyright rules #6
Conversation
Also: * Allow non-RAÄ images under a free license * Store license template as a separate parameter * Turn 'problem' into an array Bug: [T164568](https://phabricator.wikimedia.org/T164568)
KMB/kmb_massload.py
Outdated
def process_license(entry): | ||
""" | ||
Identify the license and store back in entry. | ||
Identify the license and store the back in entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and store it back in the entry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a left-over from the old function. The "the" was all that got saved of me updating it.
Done
KMB/kmb_massload.py
Outdated
byline = '|{0}'.format(entry['byline']) | ||
|
||
if entry['copyright'] == 'RAÄ': | ||
template = 'CC-BY-RAÄ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template says: This file is a low resolution version.... Does it always apply to the files we're handling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The images we are uploading are all low resolution. The high resolution ones only exist on CD-ROMs in the archives.
That said the template should probably be updated since that phrasing has changed and it has since been clarified that only Copyright RAÄ is not enough to make it CC-BY (which is what we were told 5 years ago). That clarification/change is also the main reason for this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could simply abandon that template in favour of the normal cc-by template and byline / Riksantikvarieämbetet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds reasonable :)
KMB/kmb_massload.py
Outdated
param = '|%s}}' % entry['byline'] | ||
entry['license'] = '{{CC-BY-RAÄ%s' % param | ||
(entry['copyright'] == 'Utgången upphovsrätt'): | ||
license_text = '{{PD-Sweden-photo}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do all the files marked as pdmark or Utgången upphovsrätt lack bylines? I'm looking at the documentation of this template, and it can apply to non-artistic photos taken before '69, but ironically it takes no parameters -- so if the photo belongs to this group but the author is known, you can't put it in there.
So we need to ensure that pdmark or Utgången upphovsrätt always means no byline, otherwise it will be lost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The byline is also provided in the photographer entry of the template so it isn't lost. You just cannot make it more visible by combining it with that template =(
KMB/kmb_massload.py
Outdated
else: | ||
byline = '|{0}'.format(entry['copyright']) | ||
|
||
license_text = '{{%s%s}}' % (template, byline) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So 'CC-BY-RAÄ' and 'CC-BY-SA-2.5' get surrounded with curly parens here, but '{{PD-Sweden-photo}}' on line 187 already has them when it appears for the first time. Could it be made consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because PD-Sweden-photo doesn't take the byline parameter so there is no need for further fiddling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might actually restructure how this is done which would then also resolve the difference.
KMB/kmb_massload.py
Outdated
'Det verkar tyvärr som om licensen inte är fri. Copyright="%s", License="%s".<br/>' | ||
'<small>Om informationen ovan är inkorrekt så informera gärna Lokal_Profil.</small>' % (entry['copyright'], entry['license'])) | ||
entry['problem'].append( | ||
'Det verkar tyvärr som om licensen inte är fri. ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem reports are in Swedish here, but in English on line 66. On purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope just by coincidence =) Fixing
Also: * correct license mapping * support more licenses * Error message in English
Also:
Bug: T164568