-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from marwoodandrew/sd-5046
[SD-5046] Add AAP specific IPTC subject codes
- Loading branch information
Showing
4 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- coding: utf-8; -*- | ||
# | ||
# This file is part of Superdesk. | ||
# | ||
# Copyright 2013, 2014 Sourcefabric z.u. and contributors. | ||
# | ||
# For the full copyright and license information, please see the | ||
# AUTHORS and LICENSE files distributed with this source code, or | ||
# at https://www.sourcefabric.org/superdesk/license | ||
|
||
import aap.io.iptc_extension # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"99000000": "editorial", "99001000": "advisory", "99002000": "briefings", "99003000": "diary", "99004000": "filing", "99005000": "highlights", "99006000": "service", "99007000": "staff", "99008000": "style", "99009000": "system"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8; -*- | ||
# | ||
# This file is part of Superdesk. | ||
# | ||
# Copyright 2013, 2014 Sourcefabric z.u. and contributors. | ||
# | ||
# For the full copyright and license information, please see the | ||
# AUTHORS and LICENSE files distributed with this source code, or | ||
# at https://www.sourcefabric.org/superdesk/license | ||
|
||
"""IPTC module""" | ||
|
||
import os | ||
from datetime import datetime | ||
from superdesk.io.iptc import load_codes | ||
from superdesk.io.iptc import subject_codes | ||
|
||
|
||
dirname = os.path.dirname(os.path.realpath(__file__)) | ||
data_subject_codes = os.path.join(dirname, 'data', 'aap_subject_codes.json') | ||
aap_subject_codes = load_codes(data_subject_codes) | ||
|
||
|
||
def init_app(app): | ||
last_modified = datetime(2016, 7, 28) | ||
app.subjects.register(aap_subject_codes, last_modified) | ||
subject_codes.update(aap_subject_codes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters