Ejemplo n.º 1
0
def main(conf):
    paperstore, papers_to_add, papers_existing, all_papers = loadEntriesAndSetUp(
        conf.input, conf.cache, conf.max)

    no_abstract_but_pdf = [
        p for p in all_papers if not p.has_abstract and p.has_pdf
    ]
    bulkDownload(no_abstract_but_pdf,
                 conf.dir,
                 'results_report.csv',
                 do_not_download_just_list=True)

    successful = []
    for paper in no_abstract_but_pdf:
        if not os.path.exists(paper.pdf_filename):
            continue

        abstract = getAbstractFromPDF(paper.pdf_filename)

        if abstract:
            print(abstract)
            paper.bib['abstract'] = abstract
            paperstore.updatePapers([paper])
            successful.append(paper)

    print('Generated', len(successful), 'new abstracts')
    writeBibtex(successful, conf.output)
Ejemplo n.º 2
0
def main(conf):
    paperstore, papers_to_add, papers_existing, all_papers = loadEntriesAndSetUp(
        conf.input, True)

    paperstore.addPapers(papers_to_add)
    if conf.force:
        paperstore.updatePapers(papers_existing)
Ejemplo n.º 3
0
def main(conf):
    paperstore, papers_to_add, papers_existing, all_papers = loadEntriesAndSetUp(conf.input, conf.cache, conf.max)

    if conf.cache:
        successful, unsuccessful = enrichAndUpdateMetadata(papers_to_add, paperstore, conf.email)

    if conf.force and conf.cache:
        enrichAndUpdateMetadata(papers_existing, paperstore, conf.email)

    all_papers = papers_to_add + papers_existing
    writeOutputBib(all_papers, conf.output)
Ejemplo n.º 4
0
def main(conf):
    paperstore, papers_to_add, papers_existing, all_papers = loadEntriesAndSetUp(
        conf.input, conf.cache)

    collectStats(all_papers)
    included, df = filterPapers(all_papers)

    printReport(df)

    df.to_csv(conf.report_path)

    writeOutputBib(included, conf.output)

    return df
def main(conf):
    paperstore, papers_to_add, papers_existing, all_papers = loadEntriesAndSetUp(
        conf.input, conf.cache)

    # successful, unsuccessful = enrichAndUpdateMetadata(papers_to_add, paperstore, conf.email)

    snowballed_papers, df = snowballCitations(paperstore, all_papers)
    print('Number of snowballed papers:', len(snowballed_papers))
    printReport(df)

    successful, unsuccessful = enrichAndUpdateMetadata(snowballed_papers,
                                                       paperstore, conf.email)

    # included, df = filterPapers(snowballed_papers)
    # printReport(df)

    writeOutputBib(snowballed_papers, conf.output)
Ejemplo n.º 6
0
def main(conf):
    paperstore, papers_to_add, papers_existing, all_papers = loadEntriesAndSetUp(
        conf.input, conf.cache)

    if conf.missing_abstract:
        all_bibs = []
        for paper in all_papers:
            if not paper.has_pdf and not paper.has_abstract:
                all_bibs.append(paper.bib)
    elif conf.missing_pdf:
        all_bibs = []
        for paper in all_papers:
            if not paper.has_pdf:
                all_bibs.append(paper.bib)
    else:
        all_bibs = [p.bib for p in all_papers]

    writeBibToRISFile(all_bibs, conf.output)
Ejemplo n.º 7
0
def main(conf):
    paperstore, papers_to_add, papers_existing, all_papers = loadEntriesAndSetUp(conf.input, conf.cache, conf.max)

    bulkDownload(all_papers, conf.dir, conf.report_path, do_not_download_just_list=False)
Ejemplo n.º 8
0
def main(conf):
    paperstore, papers_to_add, papers_existing, all_papers = loadEntriesAndSetUp(
        conf.input, conf.cache)

    df = dataframeFromPapers(all_papers)
    df.to_csv(conf.output)