examples

command
v1.6.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2026 License: MIT Imports: 4 Imported by: 0

README

Clippy Library Examples

This directory contains examples of how to use clippy as a Go library in your own applications.

Running the Examples

# From the examples directory
cd examples
go run example_simple.go

Example Files

example_simple.go

A basic example showing the main library functions:

  • clippy.CopyText() - Copy text to clipboard
  • clippy.Copy() - Smart copy (detects text vs binary files)
  • clippy.CopyData() - Copy from reader with automatic text/binary detection
  • clippy.GetText() - Get text from clipboard
  • clippy.GetFiles() - Get file paths from clipboard

This example demonstrates both the high-level API (with smart detection) and basic clipboard operations.

Using in Your Projects

Add clippy to your project:

go get github.com/neilberkman/clippy

Then 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.

Documentation

Overview

Example showing how to use clippy as a library

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL