Skip to main content

pyperclip_plus

pyperclip_plus は、クリップボードの管理をより簡単かつ効率的に行うための強力なツールです。このパッケージは、複数のクリップボードの管理やクリップボード履歴の検索など、基本的な機能を拡張します。

機能

  • メインクリップボードとセカンダリクリップボードの切り替え
  • クリップボードにコピーした内容の履歴を保持
  • キーワードに基づく履歴検索
  • コピーと貼り付けのスケジュール設定
  • 手動コピー(command+c)内容の取得

インストール

pyperclip_plus をインストールするには、以下のコマンドを使用します:

pip install pyperclip_plus

使用方法

以下は、pyperclip_plus の基本的な使用例です:

基本的なクリップボード操作

import pyperclip_plus as pp

# クリップボードマネージャのインスタンスを作成
manager = pp.ClipboardManager()

# メインクリップボードに切り替え
manager.switch_to_main()

# テキストをコピー
manager.copy("Hello, World!")

# クリップボードからテキストを貼り付け
print(manager.paste())  # 出力: Hello, World!

クリップボード履歴の検索

import pyperclip_plus as pp

# クリップボードマネージャのインスタンスを作成
manager = pp.ClipboardManager()

# メインクリップボードに切り替え
manager.switch_to_main()

# 複数のテキストをコピー
manager.copy("Python is great")
manager.copy("Machine Learning is fascinating")
manager.copy("Hello, World!")

# 履歴から特定のキーワードを含むアイテムを検索
history_items = manager.search_history("Python")
print("履歴検索結果:")
for item in history_items:
    print(item)

クリップボード操作のスケジュール設定

import pyperclip_plus as pp
import time

# クリップボードマネージャのインスタンスを作成
manager = pp.ClipboardManager()

# メインクリップボードに切り替え
manager.switch_to_main()

# 5秒後にテキストをコピー
manager.schedule_copy("Scheduled copy", 5)

# 10秒後にクリップボードからテキストを貼り付け
time.sleep(10)
print(manager.paste())  # 出力: Scheduled copy

セカンダリクリップボードの使用

import pyperclip_plus as pp

# クリップボードマネージャのインスタンスを作成
manager = pp.ClipboardManager()

# セカンダリクリップボードに切り替え
manager.switch_to_secondary()

# セカンダリクリップボードにコピーを試みる
manager.copy("This will not be copied")

# メインクリップボードに戻してコピー
manager.switch_to_main()
manager.copy("This will be copied")

# メインクリップボードから貼り付け
print(manager.paste())  # 出力: This will be copied

手動コピー内容の取得

import pyperclip
import pyperclip_plus as pp
import time

# クリップボードマネージャのインスタンスを作成
manager = pp.ClipboardManager()

# メインクリップボードに切り替え
manager.switch_to_main()
manager.copy("Hello, World!")  # プログラムでのコピー
print(manager.paste())  # 出力: Hello, World!

# 手動でテキストをコピー (command+c) を行い、以下で貼り付ける
time.sleep(10)  # 手動コピーの時間を確保
manual_copied_text = pyperclip.paste()
print(manual_copied_text)  # 出力: Manual copy text (手動でコピーしたテキストが表示されます)

ライセンス

このプロジェクトは MIT License の下でライセンスされています。

プロジェクトURL

GitHub リポジトリ

Metadata

Release files for pyperclip-plus 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyperclip-plus 0.1.9
File Size Uploaded
pyperclip_plus-0.1.9.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyperclip-plus 0.1.9
File Interpreter ABI Platform
pyperclip_plus-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / pyperclip_plus-0.1.9.tar.gz

Download URL pyperclip_plus-0.1.9.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
53ee438b753ec5265df6d78d6fd2fc0a91b4340eb3471611cb884b5a31325721
BLAKE2b-256 checksum
How to use checksums
3e2f8634bf9307b116d375baa22c00a470c7596c6790b81ebe1230b64468cef3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.16

Release files / pyperclip_plus-0.1.9-py3-none-any.whl

Download URL pyperclip_plus-0.1.9-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f63fc4e479675ce0bb887dc44f974b27dd159191b57523ee2e8502e0e5f3c6d6
BLAKE2b-256 checksum
How to use checksums
25090cf43a6d6f198006aceb7824f3a9aa23be5a3a4fc5f444668f4304d0996b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page