A comprehensive PowerShell toolkit for converting PubMed/MEDLINE citation files between formats. Converts NBIB (MEDLINE) files to RIS format, enriches them with PubMed URLs, and extracts structured data to CSV/Excel for easy analysis.
This toolkit streamlines the process of working with PubMed citations by providing automated conversion and data extraction tools. Perfect for researchers conducting systematic reviews, literature searches, or citation management.
- NBIB to RIS Conversion: Convert PubMed MEDLINE format (.nbib) to RIS format
- Automatic Link Enrichment: Add PubMed, DOI, and PMC full-text URLs to RIS records
- Full CSV Export: Extract title, authors, year, journal, PMID, DOI, DOI URL, PMC ID, PMC URL, abstract, keywords, and PubMed URL from RIS files
- Automatic deduplication: CSV export merges records across files and removes duplicates by PMID, then DOI
- Batch Processing: Process multiple files at once
- Web Scraping: Fetch article titles from URLs
- Excel export: Auto-sized
.xlsxwith frozen headers and filters - PRISMA summary:
prisma_summary.txtwith identification counts after export - Optional columns: Screening fields, publication types, Vancouver/AMA citations (Properties tab)
- Single merged output: One deduplicated
references.risper project (no per-file-with-urlsclutter)
- Windows PowerShell 5.1+ or PowerShell 7+
- Windows operating system (scripts use PowerShell-specific features)
- No additional dependencies required - uses built-in PowerShell cmdlets
Download PubMed-Reference-Converter-Setup.exe from GitHub Releases and run the wizard. No Python or PowerShell required.
Double-click build_installer.bat. One-time prerequisites:
- Python 3.10+
- Inno Setup 6 (free)
Output: installer\output\PubMed-Reference-Converter-Setup.exe — upload to GitHub Releases.
python gui.py or launch_gui.bat. For dev, run pip install -r requirements-gui.txt once (drag-and-drop + Excel export).
The desktop app walks through:
- NBIB → RIS — pick input/output files
- Add links — enrich RIS with PubMed, DOI, and PMC links
- Full CSV — extract full citation data (+ Excel + PRISMA summary)
- Web titles — optional, fetches page titles from URLs (slow for large sets)
- Properties — optional CSV columns (screening, record type, citations)
Use Run batch pipeline to do steps 1–3 in one click. Outputs a single deduplicated references.ris in your working folder (no per-file -with-urls copies).
Requires Python 3.10+ (tkinter is built in). PowerShell scripts run in the background.
- Go to PubMed
- Perform your search
- Select citations
- Click "Save" and choose format: MEDLINE
- Save the
.nbibfile
.\nbib_to_ris_converter.ps1 -InputFile "pubmed-results.nbib" -OutputFile "pubmed-results.ris"Or run interactively:
.\nbib_to_ris_converter.ps1.\add_pubmed_urls.ps1 -InputFile "pubmed-results.ris" -OutputFile "pubmed-results-with-urls.ris".\process_ris_files.ps1This will create extracted_ris_data.csv with titles and URLs.
Purpose: Convert PubMed MEDLINE format (.nbib) to RIS format
Usage:
# Command line
.\nbib_to_ris_converter.ps1 -InputFile input.nbib -OutputFile output.ris
# Interactive mode
.\nbib_to_ris_converter.ps1Supported Fields:
- Title (TI)
- Abstract (AB)
- Authors (AU/FAU)
- Journal (TA/JT/SO)
- Volume (VI)
- Issue (IP)
- Pages (PG)
- Publication Year (DP)
- PMID (PMID)
- PMC ID (PMC/AID [pmc])
- DOI (DOI/LID/AID)
- Keywords (MH/SB)
Purpose: Add PubMed, DOI (https://doi.org/...), and PMC full-text links to RIS files
Usage:
# Edit the script to set input/output files
.\add_pubmed_urls.ps1Output: RIS file with UR (URL) fields for PubMed, DOI, and PMC when available
Purpose: Extract full citation data from RIS files to CSV
Usage:
# Processes all .ris files in current directory
.\process_ris_files.ps1Output:
extracted_ris_data.csv- deduplicated CSV with Title, Authors, Year, Journal, PMID, DOI, DOIURL, PMCID, PMCURL, Abstract, Keywords, PubMedURL, and SourceFileextracted_ris_data.xlsx- same data in Excel with auto-sized columns, frozen header row, and filtersduplicates_removed.csv- audit log when duplicates are removed (matched by PMID or DOI)- Console summary with entry counts
Purpose: Extract URLs from RIS files and fetch their webpage titles
Usage:
.\extract_urls_with_titles.ps1Output:
extracted_urls.txt- List of unique URLsurls_with_titles.csv- CSV with URLs and fetched titlesurls_with_titles.txt- Text file with URLs and titles
Note: This script makes web requests, so it may take time for large datasets.
# Step 1: Convert NBIB to RIS
.\nbib_to_ris_converter.ps1 -InputFile "heart-disease-search.nbib" -OutputFile "heart-disease.ris"
# Step 2: Add PubMed URLs
.\add_pubmed_urls.ps1 -InputFile "heart-disease.ris" -OutputFile "heart-disease-with-urls.ris"
# Step 3: Extract to CSV for analysis
.\process_ris_files.ps1
# Output: extracted_ris_data.csv ready to open in ExcelPMID- 12345678
TI - Article Title Here
AB - Abstract text here
AU - Smith J
AU - Johnson M
TA - Journal Name
TY - JOUR
TI - Article Title Here
AB - Abstract text here
AU - Smith J
AU - Johnson M
JF - Journal Name
AN - 12345678
UR - https://pubmed.ncbi.nlm.nih.gov/12345678/
ER -
- Download all search results from PubMed as NBIB
- Convert to RIS for use in Rayyan, Covidence, or other review tools
- Extract titles and URLs for tracking and documentation
- Export PubMed citations in MEDLINE format
- Convert to RIS for import into Zotero, Mendeley, or EndNote
- Enrich with PubMed URLs for easy access
- Extract citation data to CSV
- Analyze in Excel, R, or Python
- Create literature maps or citation networks
- Batch convert multiple search results
- Merge citations from different sources
- Extract structured data for reporting
PowerShell execution policy may block scripts. Run this command:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser- Check the file path is correct
- Use absolute paths if relative paths don't work
- Ensure the file extension matches (.nbib or .ris)
All scripts use UTF-8 encoding. If you see strange characters:
- Save your input files as UTF-8
- Check your PowerShell console encoding
- Verify the RIS file has both TI (title) and UR (URL) fields
- Check that the file format is correct
- Look at console output for processing messages
- Title: Article title
- Authors: Semicolon-separated author list
- Year: Publication year (from PY)
- Journal: Journal name (JF)
- PMID: PubMed ID (AN)
- DOI: Digital object identifier
- DOIURL: Clickable DOI link (
https://doi.org/...) - PMCID: PubMed Central ID when available
- PMCURL: Free full-text link on PMC when available
- Abstract: Article abstract
- Volume / Issue / Pages: Bibliographic details when present
- Keywords: Semicolon-separated keywords (KW)
- PubMedURL: PubMed link when present (UR)
- SourceFile: Original RIS file name
extracted_ris_data.xlsx— same data with formatted column widthsprisma_summary.txt— records identified, duplicates removed, unique for screeningduplicates_removed.csv— audit log when duplicates are dropped
- Include?: Empty screening column (Y / N / Maybe)
- ExcludeReason: Why a record was excluded
- Notes: Reviewer notes
- HasAbstract: Yes/No for quick filtering
- RecordType: PubMed publication types (Journal Article, RCT, etc.)
- CitationVancouver / CitationAMA: Ready-to-paste reference strings
- Backup Original Files: Always keep your original NBIB files
- Batch Processing: Put all RIS files in one folder for batch extraction
- File Naming: Use descriptive names for tracking multiple searches
- Verify Output: Check the first few entries in CSV files before analysis
- Large Datasets: Process in smaller batches if you have thousands of citations
Edit the conversion scripts to customize field mappings:
# In nbib_to_ris_converter.ps1, add new field mapping:
'NEW_TAG' { $risEntry += "RIS_TAG - $value`r`n" }Edit add_pubmed_urls.ps1 to use different URL formats:
$customUrl = "https://doi.org/$doi" # For DOI-based URLsModify process_ris_files.ps1 to filter by record type or other criteria.
- PowerShell Only: Scripts require Windows PowerShell (not compatible with Bash/Linux without modifications)
- Format-Specific: Designed for PubMed/MEDLINE and RIS formats
- Web Scraping: The
extract_urls_with_titles.ps1script may be slow for large datasets - No Validation: Scripts assume input files are properly formatted
Contributions are welcome! Areas for improvement:
- Add support for other citation formats (BibTeX, EndNote XML)
- Cross-platform compatibility (PowerShell Core)
- GUI interface for easier use
- Validation and error recovery
- Additional field mappings
MIT License - Free for academic and commercial use
If you use these tools in your research, please acknowledge:
PubMed Reference Converter - PowerShell toolkit for citation format conversion
https://github.com/Arnav-M/pubmed-reference-converter
For issues or questions:
- Check the Troubleshooting section above
- Verify your input file format matches MEDLINE/NBIB or RIS specifications
- Open an issue on GitHub with example files (without sensitive data)
- Rayyan - Systematic review screening tool
- Zotero - Citation management software
- PubMed - Biomedical literature database
Simplify your literature search workflow with automated citation conversion