-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
185 additions
and
168 deletions.
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# TODO: dotesat uživatelské rozhraní | ||
import click | ||
from flask import cli | ||
|
||
|
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
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
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,17 @@ | ||
from typing import Dict | ||
|
||
from oarepo_oai_pmh_harvester.synchronization import OAISynchronizer | ||
|
||
|
||
class OAIProvider: | ||
def __init__(self, code, description: str = None, synchronizers: Dict[str, OAISynchronizer] = None): | ||
self.code = code | ||
self.description = description | ||
self.synchronizers = synchronizers | ||
|
||
def __repr__(self): | ||
return { | ||
"code": self.code, | ||
"description": self.description, | ||
"synchronizers": self.synchronizers | ||
} |
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
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 |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
|
||
from __future__ import absolute_import, print_function | ||
|
||
__version__ = '2.0.0a4' | ||
__version__ = '2.0.0a5' |
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,12 @@ | ||
from flask import Blueprint, abort, current_app | ||
|
||
oai_client_blueprint = Blueprint('oai_client', __name__) | ||
|
||
|
||
@oai_client_blueprint.route("/providers", methods=["GET"]) | ||
def get_providers(): | ||
config = current_app.config.get("OAREPO_OAI_PROVIDERS") | ||
if config: | ||
return config | ||
else: | ||
abort(404, description="Resource not found") |
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
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
Oops, something went wrong.