Skip to main content

An enhanced clipboard management tool

Project description

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 リポジトリ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyperclip_plus-0.1.9.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

pyperclip_plus-0.1.9-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pyperclip_plus-0.1.9.tar.gz.

File metadata

  • Download URL: pyperclip_plus-0.1.9.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.16

File hashes

Hashes for pyperclip_plus-0.1.9.tar.gz
Algorithm Hash digest
SHA256 53ee438b753ec5265df6d78d6fd2fc0a91b4340eb3471611cb884b5a31325721
MD5 9f283ed618b8b835b1166e7721a82253
BLAKE2b-256 3e2f8634bf9307b116d375baa22c00a470c7596c6790b81ebe1230b64468cef3

See more details on using hashes here.

File details

Details for the file pyperclip_plus-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for pyperclip_plus-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f63fc4e479675ce0bb887dc44f974b27dd159191b57523ee2e8502e0e5f3c6d6
MD5 05147b9a496a8014ad3dbe5b9668bb59
BLAKE2b-256 25090cf43a6d6f198006aceb7824f3a9aa23be5a3a4fc5f444668f4304d0996b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page