colrev.env.local_index.LocalIndex

class LocalIndex(*, index_tei=False, verbose_mode=False)[source]

Bases: object

The LocalIndex implements indexing and retrieval of records across projects

Methods

get_fields_to_remove

Compares the record to available toc items and returns fields to remove (if any), such as the volume or number.

get_journal_rankings

Get the journal rankings from the sqlite database

get_year_from_toc

Determine the year of a paper based on its table-of-content (journal-volume-number)

retrieve

Convenience function to retrieve the indexed record_dict metadata based on another record_dict

retrieve_based_on_colrev_pdf_id

Convenience function to retrieve the indexed record_dict metadata based on a colrev_pdf_id

retrieve_from_toc

Retrieve a record from the toc (table-of-contents)

search

Run a search for records

get_fields_to_remove(record_dict)[source]

Compares the record to available toc items and returns fields to remove (if any), such as the volume or number.

Return type:

list

get_journal_rankings(journal)[source]

Get the journal rankings from the sqlite database

Return type:

list

get_year_from_toc(record_dict)[source]

Determine the year of a paper based on its table-of-content (journal-volume-number)

Return type:

str

retrieve(record_dict, *, include_file=False, include_colrev_ids=False)[source]

Convenience function to retrieve the indexed record_dict metadata based on another record_dict

Return type:

Record

retrieve_based_on_colrev_pdf_id(*, colrev_pdf_id)[source]

Convenience function to retrieve the indexed record_dict metadata based on a colrev_pdf_id

Return type:

Record

retrieve_from_toc(record, *, include_file=False, search_across_tocs=False)[source]

Retrieve a record from the toc (table-of-contents)

Return type:

Record

search(query)[source]

Run a search for records

Return type:

list[Record]