This directory contains examples of how to use clippy as a Go library in your own applications.
# From the examples directory
cd examples
go run example_simple.goA basic example showing the main library functions:
clippy.CopyText()- Copy text to clipboardclippy.Copy()- Smart copy (detects text vs binary files)clippy.CopyData()- Copy from reader with automatic text/binary detectionclippy.GetText()- Get text from clipboardclippy.GetFiles()- Get file paths from clipboard
This example demonstrates both the high-level API (with smart detection) and basic clipboard operations.
Add clippy to your project:
go get github.com/neilberkman/clippyThen import and use:
import "github.com/neilberkman/clippy"
// Your code here
err := clippy.Copy("document.pdf")See the main README for more detailed API documentation.