mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-12-21 09:07:46 +01:00
7389f85ef2
- Move fancy naming to Hub - Adopt translations - Fix long authors list in bot - Support CJK in scitech - Fixed pylon bug with decoding improper unicode ch... GitOrigin-RevId: 74f73c44f749a71cb65dd5ddd3416f32a83d329f
21 lines
596 B
Python
21 lines
596 B
Python
from typing import Iterable
|
|
|
|
from ..base import DoiSource
|
|
from .biorxiv import BiorxivSource
|
|
from .lancet import LancetSource
|
|
from .nejm import NejmSource
|
|
from .research_square import ResearchSquareSource
|
|
|
|
paper_sources = {
|
|
'10.1016': [LancetSource],
|
|
'10.1056': [NejmSource],
|
|
'10.1101': [BiorxivSource],
|
|
'10.21203': [ResearchSquareSource],
|
|
}
|
|
|
|
|
|
def get_specific_sources_for_doi(doi: str, **kwargs) -> Iterable[DoiSource]:
|
|
source_clses = paper_sources.get(doi.split('/')[0], [])
|
|
source_clses = list(map(lambda cls: cls(doi, **kwargs), source_clses))
|
|
return source_clses
|