Go to file
Steve White 6f7eea0373 Add unit tests 2025-01-25 11:35:15 -06:00
.gitignore Add unit tests 2025-01-25 11:35:15 -06:00
README.md Initial Commit 2025-01-25 11:07:24 -06:00
arxiva.go Add unit tests 2025-01-25 11:35:15 -06:00
arxiva_test.go Add unit tests 2025-01-25 11:35:15 -06:00
go.mod Initial Commit 2025-01-25 11:07:24 -06:00

README.md

Arxiva - arXiv Paper Fetcher Library

Arxiva is a Go library for fetching and saving research papers from arXiv.org.

Features

  • Fetch papers by date range and search query
  • Save results as JSON files
  • Automatic filename sanitization

Installation

Add the package to your project:

go get gitea.r8z.us/stwhite/arxiva

Usage

Import the package in your Go code:

import "gitea.r8z.us/stwhite/arxiva"

Example usage:

package main

import (
	"log"
	"gitea.r8z.us/stwhite/arxiva"
)

func main() {
	// Fetch papers
	papers, err := arxiva.FetchPapers("20240101", "20240125", "quantum computing", 100)
	if err != nil {
		log.Fatal(err)
	}

	// Save to file
	err = arxiva.SaveToFile(papers, "20240101", "20240125", "quantum computing")
	if err != nil {
		log.Fatal(err)
	}
}

API Reference

FetchPapers(startDate, endDate, query string, maxResults int) ([]Paper, error)

Fetches papers from arXiv API

SaveToFile(papers []Paper, startDate, endDate, query string) error

Saves papers to a JSON file

Dependencies

  • Standard Go libraries
  • arXiv API (no API key required)

License

MIT License