Skip to main content

This Python library extracts ORCID information from a file containing ORCID IDs and generates reports in various formats (TXT, PDF, JSON, CSV, Excel).

Project description

ORCID Data Extractor and Report Generator

This Python script extracts ORCID information from a file containing ORCID IDs and generates reports in various formats (TXT, PDF, JSON, CSV, Excel).

Table of Contents

Installation

  1. To install the OrcidXtract library, simply use pip:
    pip install OrcidXtract
    

Usage

Once the library is installed, you can use it from the command line with the orcidxtract command.

Command-Line Arguments

  orcidxtract --help

  Options:
    -h, --help            show this help message and exit
    --inputfile INPUTFILE
                          Path to the input file containing ORCID IDs.
    --orcid_ids [ORCID_IDS ...]
                          List of ORCID IDs (e.g., 0000-0001-...).
    --output-format {txt,pdf,json} [{txt,pdf,json} ...]
                          Specify one or more output formats (txt, pdf, json).
                          Example: --output-format txt pdf json
    --report {csv,excel}  Specify if you want to generate a CSV or Excel report.
                          Example: --report csv

The script accepts the following command-line arguments:

  • --inputfile: Path to the input file containing ORCID IDs.
  • --orcid_ids: A list of ORCID IDs (e.g., 0000-0001-5109-3700).
  • --output-format: Specify one or more output formats (txt, pdf, json). Example: --output-format txt pdf json.
  • --report: Specify if you want to generate a CSV or Excel report.

Example Commands

  1. Extract ORCID data and generate TXT, PDF, and JSON reports:
    orcidxtract --inputfile orcid_ids.txt --output-format txt pdf json
    
  2. Extract ORCID data and generate a CSV report:
    orcidxtract --inputfile orcid_ids.txt --output-format txt --report csv
    
  3. Extract ORCID data and generate an Excel report:
    orcidxtract --inputfile orcid_ids.txt --output-format json --report excel
    
  4. Extract ORCID directly from the command lin:
    orcidxtract --orcid_ids xxxx-xxxx-xxxx-xxxx --output-format txt pdf json  --report csv   
    

Input File Format

The input file should contain one ORCID ID per line. Example (orcid_ids.txt):

0000-0000-0000-0001
0000-0000-0000-0002
0000-0000-0000-0003

Output Files

The generated reports will be saved in the Result directory. The directory structure will look like this:

Result
  - 0000-0000-0000-0001.txt
  - 0000-0000-0000-0002.pdf
  - 0000-0000-0000-0003.json
  - orcid_report.csv
  - orcid_report.xlsx

Features

  • ORCID Data Extraction: Extracts detailed information from ORCID IDs.
  • Multiple Output Formats: Supports TXT, PDF, JSON, CSV, and Excel formats.
  • Customizable Reports: Generate reports based on specific requirements.
  • Error Handling: Handles missing or invalid data gracefully.

Dependencies

  • argparse: For parsing command-line arguments.
  • reportlab: For generating PDF reports.
  • pandas: For generating CSV and Excel reports.
  • requests: For making HTTP requests to ORCID's API.
  • openpyxl: For working with Excel files.

These dependencies will be automatically installed when you install the package via pip.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributions

For any questions or issues, please open an issue on the GitHub repository. If you'd like to contribute, please fork the repository and submit a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orcidxtract-0.0.5.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

OrcidXtract-0.0.5-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file orcidxtract-0.0.5.tar.gz.

File metadata

  • Download URL: orcidxtract-0.0.5.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for orcidxtract-0.0.5.tar.gz
Algorithm Hash digest
SHA256 7b5660cfda2ce2ffa4a8ef7dbd2715d8b213e18139ef6e065306f9d890e27c13
MD5 ec839f93a41b0ba630d8acd6c25beb3c
BLAKE2b-256 9ec10ad8c2250b12bcb0479b3394a971a7f931c88df0dc3caff2918d1dadc6f4

See more details on using hashes here.

File details

Details for the file OrcidXtract-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: OrcidXtract-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for OrcidXtract-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 38189a6118d4e9a53dcc42187bb027951db4deba48b3c7aa01fe6ea5376ea94a
MD5 bc3b1a78bed641906bc4726349cbd2ee
BLAKE2b-256 61a91d52d6fa2295b3bedead34eb6cd60a525db5780ed74447d12fb99fa1b1ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page