https://github.com/pewterzz/sciswift
All-in-one package for all scientific needs on swift and swiftui
https://github.com/pewterzz/sciswift
scientific-research swift
Last synced: 7 months ago
JSON representation
All-in-one package for all scientific needs on swift and swiftui
- Host: GitHub
- URL: https://github.com/pewterzz/sciswift
- Owner: PewterZz
- License: mit
- Created: 2025-01-23T16:17:45.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-23T16:33:34.000Z (9 months ago)
- Last Synced: 2025-01-23T17:29:05.082Z (9 months ago)
- Topics: scientific-research, swift
- Language: Swift
- Homepage:
- Size: 37.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SciSwift
A Swift package for searching and downloading research papers from various academic sources.
## Features
- Search papers on Google Scholar
- Download papers from Sci-Hub
- Support for DOI, PMID, and direct URLs
- Automatic retry mechanism
- Async/await support## Installation
Add this package to your project using Swift Package Manager:
```swift
dependencies: [
.package(url: "https://github.com/PewterZz/SciSwift.git", from: "1.0.0"),
]
```## Usage
```swift
import SciSwift// Initialize SciSwift with optional configuration
let sciSwift = SciSwift()// Search for papers
let searchResults = try await sciSwift.searchScholar(query: "machine learning")
for result in searchResults {
print(result.title)
print(result.authors)
print(result.url)
}// Download a paper using DOI
let pdfData = try await sciSwift.downloadPaper(doi: "10.1234/example.doi")// Download a paper using URL
let paperURL = "https://example.com/paper.pdf"
let pdfData = try await sciSwift.downloadPaper(url: paperURL)
```