# pyperclip_plus
`pyperclip_plus` は、クリップボードの管理をより簡単かつ効率的に行うための強力なツールです。このパッケージは、複数のクリップボードの管理やクリップボード履歴の検索など、基本的な機能を拡張します。
## 機能
- メインクリップボードとセカンダリクリップボードの切り替え
- クリップボードにコピーした内容の履歴を保持
- キーワードに基づく履歴検索
- コピーと貼り付けのスケジュール設定
- 手動コピー(command+c)内容の取得
## インストール
`pyperclip_plus` をインストールするには、以下のコマンドを使用します:
```bash
pip install pyperclip_plus
```
## 使用方法
以下は、`pyperclip_plus` の基本的な使用例です:
### 基本的なクリップボード操作
```python
import pyperclip_plus as pp
# クリップボードマネージャのインスタンスを作成
manager = pp.ClipboardManager()
# メインクリップボードに切り替え
manager.switch_to_main()
# テキストをコピー
manager.copy("Hello, World!")
# クリップボードからテキストを貼り付け
print(manager.paste()) # 出力: Hello, World!
```
### クリップボード履歴の検索
```python
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)
```
### クリップボード操作のスケジュール設定
```python
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
```
### セカンダリクリップボードの使用
```python
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
```
### 手動コピー内容の取得
```python
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](https://opensource.org/licenses/MIT) の下でライセンスされています。
## プロジェクトURL
[GitHub リポジトリ](https://github.com/AkitaShohei/ds_packege.git)
Raw data
{
"_id": null,
"home_page": "https://github.com/yourusername/pyperclip_plus",
"name": "pyperclip-plus",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Your Name",
"author_email": "your.email@example.com",
"download_url": "https://files.pythonhosted.org/packages/3e/2f/8634bf9307b116d375baa22c00a470c7596c6790b81ebe1230b64468cef3/pyperclip_plus-0.1.9.tar.gz",
"platform": null,
"description": "# pyperclip_plus\n\n`pyperclip_plus` \u306f\u3001\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306e\u7ba1\u7406\u3092\u3088\u308a\u7c21\u5358\u304b\u3064\u52b9\u7387\u7684\u306b\u884c\u3046\u305f\u3081\u306e\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3001\u8907\u6570\u306e\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306e\u7ba1\u7406\u3084\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u5c65\u6b74\u306e\u691c\u7d22\u306a\u3069\u3001\u57fa\u672c\u7684\u306a\u6a5f\u80fd\u3092\u62e1\u5f35\u3057\u307e\u3059\u3002\n\n## \u6a5f\u80fd\n\n- \u30e1\u30a4\u30f3\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u3068\u30bb\u30ab\u30f3\u30c0\u30ea\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306e\u5207\u308a\u66ff\u3048\n- \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3057\u305f\u5185\u5bb9\u306e\u5c65\u6b74\u3092\u4fdd\u6301\n- \u30ad\u30fc\u30ef\u30fc\u30c9\u306b\u57fa\u3065\u304f\u5c65\u6b74\u691c\u7d22\n- \u30b3\u30d4\u30fc\u3068\u8cbc\u308a\u4ed8\u3051\u306e\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u8a2d\u5b9a\n- \u624b\u52d5\u30b3\u30d4\u30fc\uff08command+c\uff09\u5185\u5bb9\u306e\u53d6\u5f97\n\n## \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n\n`pyperclip_plus` \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\uff1a\n\n```bash\npip install pyperclip_plus\n```\n\n## \u4f7f\u7528\u65b9\u6cd5\n\n\u4ee5\u4e0b\u306f\u3001`pyperclip_plus` \u306e\u57fa\u672c\u7684\u306a\u4f7f\u7528\u4f8b\u3067\u3059\uff1a\n\n### \u57fa\u672c\u7684\u306a\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u64cd\u4f5c\n\n```python\nimport pyperclip_plus as pp\n\n# \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\nmanager = pp.ClipboardManager()\n\n# \u30e1\u30a4\u30f3\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048\nmanager.switch_to_main()\n\n# \u30c6\u30ad\u30b9\u30c8\u3092\u30b3\u30d4\u30fc\nmanager.copy(\"Hello, World!\")\n\n# \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u8cbc\u308a\u4ed8\u3051\nprint(manager.paste()) # \u51fa\u529b: Hello, World!\n```\n\n### \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u5c65\u6b74\u306e\u691c\u7d22\n\n```python\nimport pyperclip_plus as pp\n\n# \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\nmanager = pp.ClipboardManager()\n\n# \u30e1\u30a4\u30f3\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048\nmanager.switch_to_main()\n\n# \u8907\u6570\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u30b3\u30d4\u30fc\nmanager.copy(\"Python is great\")\nmanager.copy(\"Machine Learning is fascinating\")\nmanager.copy(\"Hello, World!\")\n\n# \u5c65\u6b74\u304b\u3089\u7279\u5b9a\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u542b\u3080\u30a2\u30a4\u30c6\u30e0\u3092\u691c\u7d22\nhistory_items = manager.search_history(\"Python\")\nprint(\"\u5c65\u6b74\u691c\u7d22\u7d50\u679c:\")\nfor item in history_items:\n print(item)\n```\n\n### \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u64cd\u4f5c\u306e\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u8a2d\u5b9a\n\n```python\nimport pyperclip_plus as pp\nimport time\n\n# \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\nmanager = pp.ClipboardManager()\n\n# \u30e1\u30a4\u30f3\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048\nmanager.switch_to_main()\n\n# 5\u79d2\u5f8c\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u30b3\u30d4\u30fc\nmanager.schedule_copy(\"Scheduled copy\", 5)\n\n# 10\u79d2\u5f8c\u306b\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u8cbc\u308a\u4ed8\u3051\ntime.sleep(10)\nprint(manager.paste()) # \u51fa\u529b: Scheduled copy\n```\n\n### \u30bb\u30ab\u30f3\u30c0\u30ea\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306e\u4f7f\u7528\n\n```python\nimport pyperclip_plus as pp\n\n# \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\nmanager = pp.ClipboardManager()\n\n# \u30bb\u30ab\u30f3\u30c0\u30ea\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048\nmanager.switch_to_secondary()\n\n# \u30bb\u30ab\u30f3\u30c0\u30ea\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3092\u8a66\u307f\u308b\nmanager.copy(\"This will not be copied\")\n\n# \u30e1\u30a4\u30f3\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u623b\u3057\u3066\u30b3\u30d4\u30fc\nmanager.switch_to_main()\nmanager.copy(\"This will be copied\")\n\n# \u30e1\u30a4\u30f3\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u304b\u3089\u8cbc\u308a\u4ed8\u3051\nprint(manager.paste()) # \u51fa\u529b: This will be copied\n```\n\n### \u624b\u52d5\u30b3\u30d4\u30fc\u5185\u5bb9\u306e\u53d6\u5f97\n\n```python\nimport pyperclip\nimport pyperclip_plus as pp\nimport time\n\n# \u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\nmanager = pp.ClipboardManager()\n\n# \u30e1\u30a4\u30f3\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048\nmanager.switch_to_main()\nmanager.copy(\"Hello, World!\") # \u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306e\u30b3\u30d4\u30fc\nprint(manager.paste()) # \u51fa\u529b: Hello, World!\n\n# \u624b\u52d5\u3067\u30c6\u30ad\u30b9\u30c8\u3092\u30b3\u30d4\u30fc (command+c) \u3092\u884c\u3044\u3001\u4ee5\u4e0b\u3067\u8cbc\u308a\u4ed8\u3051\u308b\ntime.sleep(10) # \u624b\u52d5\u30b3\u30d4\u30fc\u306e\u6642\u9593\u3092\u78ba\u4fdd\nmanual_copied_text = pyperclip.paste()\nprint(manual_copied_text) # \u51fa\u529b: Manual copy text (\u624b\u52d5\u3067\u30b3\u30d4\u30fc\u3057\u305f\u30c6\u30ad\u30b9\u30c8\u304c\u8868\u793a\u3055\u308c\u307e\u3059)\n```\n\n\n## \u30e9\u30a4\u30bb\u30f3\u30b9\n\n\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f [MIT License](https://opensource.org/licenses/MIT) \u306e\u4e0b\u3067\u30e9\u30a4\u30bb\u30f3\u30b9\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\n\n## \u30d7\u30ed\u30b8\u30a7\u30af\u30c8URL\n\n[GitHub \u30ea\u30dd\u30b8\u30c8\u30ea](https://github.com/AkitaShohei/ds_packege.git)\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "An enhanced clipboard management tool",
"version": "0.1.9",
"project_urls": {
"Homepage": "https://github.com/yourusername/pyperclip_plus"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "25090cf43a6d6f198006aceb7824f3a9aa23be5a3a4fc5f444668f4304d0996b",
"md5": "05147b9a496a8014ad3dbe5b9668bb59",
"sha256": "f63fc4e479675ce0bb887dc44f974b27dd159191b57523ee2e8502e0e5f3c6d6"
},
"downloads": -1,
"filename": "pyperclip_plus-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "05147b9a496a8014ad3dbe5b9668bb59",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3610,
"upload_time": "2024-05-25T13:45:23",
"upload_time_iso_8601": "2024-05-25T13:45:23.579660Z",
"url": "https://files.pythonhosted.org/packages/25/09/0cf43a6d6f198006aceb7824f3a9aa23be5a3a4fc5f444668f4304d0996b/pyperclip_plus-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3e2f8634bf9307b116d375baa22c00a470c7596c6790b81ebe1230b64468cef3",
"md5": "9f283ed618b8b835b1166e7721a82253",
"sha256": "53ee438b753ec5265df6d78d6fd2fc0a91b4340eb3471611cb884b5a31325721"
},
"downloads": -1,
"filename": "pyperclip_plus-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "9f283ed618b8b835b1166e7721a82253",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3269,
"upload_time": "2024-05-25T13:45:25",
"upload_time_iso_8601": "2024-05-25T13:45:25.406354Z",
"url": "https://files.pythonhosted.org/packages/3e/2f/8634bf9307b116d375baa22c00a470c7596c6790b81ebe1230b64468cef3/pyperclip_plus-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-25 13:45:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yourusername",
"github_project": "pyperclip_plus",
"github_not_found": true,
"lcname": "pyperclip-plus"
}