Skip to content
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

Merged
merged 4 commits into from May 11, 2017
Merged

Respect clarified copyright rules #6

merged 4 commits into from May 11, 2017

Conversation

lokal-profil
Copy link
Owner

Also:

  • Allow non-RAÄ images under a free license
  • Store license template as a separate parameter
  • Turn 'problem' into an array

Bug: T164568

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)
def process_license(entry):
"""
Identify the license and store back in entry.
Identify the license and store the back in entry.
Copy link
Collaborator

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?

Copy link
Owner Author

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

byline = '|{0}'.format(entry['byline'])

if entry['copyright'] == 'RAÄ':
template = 'CC-BY-RAÄ'
Copy link
Collaborator

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?

Copy link
Owner Author

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.

Copy link
Owner Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds reasonable :)

param = '|%s}}' % entry['byline']
entry['license'] = '{{CC-BY-RAÄ%s' % param
(entry['copyright'] == 'Utgången upphovsrätt'):
license_text = '{{PD-Sweden-photo}}'
Copy link
Collaborator

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.

Copy link
Owner Author

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 =(

else:
byline = '|{0}'.format(entry['copyright'])

license_text = '{{%s%s}}' % (template, byline)
Copy link
Collaborator

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?

Copy link
Owner Author

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.

Copy link
Owner Author

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.

'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. '
Copy link
Collaborator

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?

Copy link
Owner Author

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
@lokal-profil lokal-profil merged commit f36c284 into master May 11, 2017
@lokal-profil lokal-profil deleted the copyright branch May 11, 2017 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants