Plan & query¶
Describe a search before running it, and build field-tagged Boolean queries.
scopus_query ¶
scopus_query(*terms, op='AND', field=None)
Combine terms into one Scopus query, optionally field-wrapping each.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*terms
|
str
|
One or more non-empty search terms. |
()
|
op
|
str
|
The boolean operator joining the terms: |
'AND'
|
field
|
str | None
|
An optional field tag applied to every term (see :data: |
None
|
Source code in src/scopusflow/query.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
wrap_field ¶
wrap_field(query, field)
Wrap query in a field tag, e.g. TITLE-ABS-KEY(graphene).
Source code in src/scopusflow/query.py
26 27 28 29 30 31 32 33 | |
FIELD_TAGS
module-attribute
¶
FIELD_TAGS = {'TITLE': 'Words in the document title', 'TITLE-ABS-KEY': 'Title, abstract and keywords', 'TITLE-ABS-KEY-AUTH': 'Title, abstract, keywords and author names', 'ABS': 'Abstract text', 'KEY': 'Indexed and author keywords', 'AUTH': 'Author names', 'AUTHKEY': 'Author-supplied keywords', 'AFFIL': 'Affiliation, any part', 'AFFILORG': 'Affiliation organisation name', 'SRCTITLE': 'Source (publication) title', 'DOI': 'Digital Object Identifier', 'ALL': 'All available fields'}
SearchPlan
dataclass
¶
A fully specified, inspectable description of a Scopus search.
Splitting describing a search from executing it makes a workflow reproducible and lets a large retrieval be partitioned by year, so it can be cached and resumed.
Source code in src/scopusflow/plan.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
cells ¶
cells()
Expand the plan into the cells that will be fetched.
Source code in src/scopusflow/plan.py
51 52 53 54 55 56 57 58 59 60 61 62 63 | |
PlanCell
dataclass
¶
One unit of work in a :class:SearchPlan.
Source code in src/scopusflow/plan.py
11 12 13 14 15 16 17 18 19 | |