colrev.ops.pdf_get.PDFGet

class PDFGet(*, review_manager, notify_state_transition_operation=True)[source]

Bases: Operation

Get the PDFs

Methods

check_existing_unlinked_pdfs

Check for PDFs that are in the pdfs directory but not linked in the record file

check_precondition

Check the operation precondition

conclude

Conclude the operation (stop Docker containers)

copy_pdfs_to_repo

Copy the PDFs to the repository

decorate

Decorator for operations

get_pdf

Get PDFs (based on the package endpoints in the settings)

get_target_filepath

Get the target filepath for a PDF

import_pdf

Import a file (PDF) and copy/symlink it

link_pdf

Link the PDF in its record (should be {ID}.pdf)

main

rtype:

Any

notify

Notify the review_manager about the next operation

relink_pdfs

Relink record files to the corresponding PDFs (if available)

rename_pdfs

Rename the PDFs

setup_custom_script

Setup a custom pfd-get script

Attributes

type

to_retrieve

retrieved

not_retrieved

check_existing_unlinked_pdfs(records)[source]

Check for PDFs that are in the pdfs directory but not linked in the record file

Return type:

dict

check_precondition()

Check the operation precondition

Return type:

None

conclude()

Conclude the operation (stop Docker containers)

Return type:

None

copy_pdfs_to_repo()[source]

Copy the PDFs to the repository

Return type:

None

classmethod decorate()

Decorator for operations

Return type:

Callable

get_pdf(item)[source]

Get PDFs (based on the package endpoints in the settings)

Return type:

dict

get_target_filepath(record)[source]

Get the target filepath for a PDF

Return type:

Path

import_pdf(record)[source]

Import a file (PDF) and copy/symlink it

Return type:

None

Link the PDF in its record (should be {ID}.pdf)

Return type:

Record

notify(*, state_transition=True)

Notify the review_manager about the next operation

Return type:

None

Relink record files to the corresponding PDFs (if available)

Return type:

None

rename_pdfs()[source]

Rename the PDFs

Return type:

None

setup_custom_script()[source]

Setup a custom pfd-get script

Return type:

None