2 releases

new 0.1.1 Nov 5, 2024
0.1.0 Nov 3, 2024

#205 in Database interfaces

Apache-2.0

120KB
2K SLoC

learner

A Rust-powered academic research management system

Library Crates.io docs.rs Downloads   |   CLI Crates.io Downloads

CI License

learner header

Features

  • 📚 Academic Paper Management

    • Extract metadata from multiple sources (arXiv, IACR, DOI)
    • Support for both URLs and direct identifiers
    • Automatic source detection
    • Full paper metadata including authors, abstracts, and publication dates
  • 🔍 Local Database Management

    • SQLite-based storage for offline access
    • Full-text search capabilities
    • Case-insensitive title search
    • Duplicate detection and handling
    • Platform-specific default locations
    • PDF management with configurable storage location
  • 🚀 Command Line Interface (learnerd)

    • Interactive database management
    • Paper addition and retrieval
    • Search functionality
    • PDF downloading and management
    • Beautiful, colored output
    • Detailed logging options

Installation

Library

Add this to your Cargo.toml:

[dependencies]
learner = "0.2"  # Core library

CLI Tool

cargo install learnerd

Usage

Library Usage

use learner::{Paper, Database};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize database with default paths
    let db = Database::open(Database::default_path()).await?;
    
    // Add papers from various sources
    let paper = Paper::new("https://arxiv.org/abs/2301.07041").await?;
    paper.save(&db).await?;
    
    // Download PDF if available
    let pdf_dir = Database::default_pdf_path();
    paper.download_pdf(pdf_dir).await?;
    
    // Add papers from other sources
    let paper = Paper::new("10.1145/1327452.1327492").await?;  // From DOI
    let paper = Paper::new("2023/123").await?;                 // From IACR
    
    Ok(())
}

CLI Usage

# Initialize a new database (interactive)
learnerd init

# Add a paper (auto-detects source)
learnerd add 2301.07041
learnerd add "https://arxiv.org/abs/2301.07041"
learnerd add "10.1145/1327452.1327492"

# Skip PDF download
learnerd add 2301.07041 --no-pdf

# Download PDF for existing paper
learnerd download arxiv 2301.07041

# Retrieve paper details
learnerd get arxiv 2301.07041

# Search papers
learnerd search "neural networks"

# Verbose output for debugging
learnerd -v add 2301.07041

# Clean up database (with confirmation)
learnerd clean

Project Structure

The project consists of two main components:

  1. learner - Core library providing:

    • Paper metadata extraction
    • Database management
    • PDF download capabilities
    • Source-specific clients (arXiv, IACR, DOI)
    • Error handling
  2. learnerd - CLI application offering:

    • User-friendly interface
    • PDF management
    • Interactive confirmations
    • Colored output
    • Logging and debugging capabilities

Roadmap

Phase 1: Core Improvements ⏳

  • PDF management
  • Paper removal functionality
  • Batch paper operations
  • Export capabilities
  • Enhanced search features
  • Custom metadata fields

Phase 2: Advanced Features 🔮

  • PDF content extraction
  • LLM-powered paper analysis
  • Citation graph analysis
  • Automated paper discovery
  • Web interface

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Before making major changes, please open an issue first to discuss what you would like to change.

Development Setup

  1. Clone the repository
  2. Install dependencies:
    cargo build
    
  3. Run tests:
    cargo test --workspace
    

License

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

Acknowledgments


Made for making learning sh*t less annoying.

Dependencies

~37–51MB
~827K SLoC