Skip to content

Navigation Menu

Sign in
Sign up
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Latest commit

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Dcup Lib - Modern Document Processing for Developers

Go Reference License: MIT Cloud Version

Convert PDFs, Docs, Sheets, PowerPoint, CSV, Web pages, Raw HTML and Markdown to Structured JSON With Files or URLs - 10x faster than traditional solutions with strict type safety and schema validation.

Why Dcup Lib?

Feature Dcup Lib Alternatives
Processing Speed ⚑ 150 pages/sec 20 pages/sec
Memory Usage 🧠 85MB avg 250MB+
Schema Enforcement πŸ”’ Strict Types Loose Validation
Local Processing βœ… Yes ❌ Cloud-only
File Format Support πŸ“š 15+ formats 5-8 formats

πŸš€ Basic Usage - PDF Processing

package main
import (
	"fmt"
	"os"
	"github.com/your-org/dcup-lib"
)
func main() {
	// Configure with your OpenAI credentials
	config := dcup.Config{
		Endpoint: os.Getenv("OPENAI_URL"),
		Model: "gpt-4o-mini",
		APIHeader: "Authorization",
		APIKey: fmt.Sprintf("Bearer %s", os.Getenv("OPENAI_KEY")),
	}
	client, err := dcup.Init(config)
	if err != nil {
		panic(err)
	}
	// Define your JSON schema
	schema := map[string]interface{}{
		"invoice": map[string]string{
			"total": "number",
			"due_date": "string",
			"items": [],
		},
	}
	// Process PDF from URL
	result, err := client.Pdf.CleanUrl(
		"https://example.com/invoice.pdf", 
		schema,
	)
	
	if err != nil {
		panic(err)
	}
	fmt.Printf("Processed Data: %+v\n", result.Data)
}

🌩️ When to Use Cloud Version?

While Dcup Lib handles local processing perfectly, consider Dcup.dev for:

  • Enterprise Scaling: Process millions of docs with auto-scaling
  • Team Features: Collaboration, audit logs, and SSO
  • Managed Infrastructure: Let us handle the ops work

About

Dcup Transform Documents Into Perfect JSON

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /