Skip to content

Commit 40e5869

Browse files
authored
improve performance of csv (#41)
* Try csv before bib, bib takes a while to error out on CSV files * Update README. * Update version
1 parent d53f518 commit 40e5869

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ A python library with bibliographic and biblio-metric tools.
99
## Features
1010

1111
- Reads Web of Science (ISI) files.
12-
- Reads scopus bibtex files.
13-
- Merges scopus and ISI bibliographic collections.
12+
- Reads scopus bibtex, ris and csv files.
13+
- Merges bibliographic collections.
1414
- Implements the [SAP][sap] algorithm.
1515
- More features in the roadmap...
1616

@@ -19,10 +19,10 @@ A python library with bibliographic and biblio-metric tools.
1919
Here's how to apply the sap algorithm:
2020

2121
```python
22-
from bibx import read_scopus, Sap
22+
from bibx import read_scopus_bib, Sap
2323

2424
with open('./docs/examples/scopus.bib') as f:
25-
c = read_scopus(f)
25+
c = read_scopus_bib(f)
2626
s = Sap()
2727
g = s.create_graph(c)
2828
g = s.clean_graph(g)

src/bibx/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@
2323
"query_openalex",
2424
"read_any",
2525
"read_scopus_bib",
26+
"read_scopus_csv",
2627
"read_scopus_ris",
2728
"read_wos",
2829
]
2930

30-
__version__ = "0.6.1"
31+
__version__ = "0.6.2"
3132

3233

3334
def query_openalex(
@@ -77,7 +78,7 @@ def read_wos(*files: TextIO) -> Collection:
7778

7879
def read_any(file: TextIO) -> Collection:
7980
"""Try to read a file with the supported formats."""
80-
for handler in (read_wos, read_scopus_ris, read_scopus_bib, read_scopus_csv):
81+
for handler in (read_wos, read_scopus_ris, read_scopus_csv, read_scopus_bib):
8182
try:
8283
return handler(file)
8384
except BibXError as e:

0 commit comments

Comments
 (0)