{"id":14965987,"url":"https://github.com/antononcube/raku-clipboard","last_synced_at":"2026-02-01T00:10:31.560Z","repository":{"id":190890075,"uuid":"683523733","full_name":"antononcube/Raku-Clipboard","owner":"antononcube","description":"Raku package for using clipboards of different operating systems. (I.e., copy and paste with any OS.)","archived":false,"fork":false,"pushed_at":"2023-11-15T16:14:46.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T15:50:48.879Z","etag":null,"topics":["clipboard","raku","rakulang"],"latest_commit_sha":null,"homepage":"https://raku.land/zef:antononcube/Clipboard","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antononcube.png","metadata":{"files":{"readme":"README-work.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-26T21:00:21.000Z","updated_at":"2023-09-10T14:24:57.000Z","dependencies_parsed_at":"2024-09-14T01:22:04.717Z","dependency_job_id":"ddbb6178-618c-4baf-a2be-05a18a655eef","html_url":"https://github.com/antononcube/Raku-Clipboard","commit_stats":{"total_commits":42,"total_committers":3,"mean_commits":14.0,"dds":"0.26190476190476186","last_synced_commit":"4135498c4727c5d62b02cb5fa79e50f8ff42e651"},"previous_names":["antononcube/raku-clipboard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antononcube/Raku-Clipboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Clipboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Clipboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Clipboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Clipboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antononcube","download_url":"https://codeload.github.com/antononcube/Raku-Clipboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Clipboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259749562,"owners_count":22905731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard","raku","rakulang"],"created_at":"2024-09-24T13:35:39.444Z","updated_at":"2026-02-01T00:10:31.506Z","avatar_url":"https://github.com/antononcube.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clipboard\n\n[![MacOS](https://github.com/antononcube/Raku-Clipboard/actions/workflows/macos.yml/badge.svg)](https://github.com/antononcube/Raku-Clipboard/actions/workflows/macos.yml)\n[![Linux](https://github.com/antononcube/Raku-Clipboard/actions/workflows/linux.yml/badge.svg)](https://github.com/antononcube/Raku-Clipboard/actions/workflows/linux.yml)\n[![Win64](https://github.com/antononcube/Raku-Clipboard/actions/workflows/windows.yml/badge.svg)](https://github.com/antononcube/Raku-Clipboard/actions/workflows/windows.yml)\n\nRaku package for using clipboards of different operating systems. (I.e., copy and paste with any OS.)\n\nThe OS commands used to do the copy and paste to- and from the clipboard can be specified with the \nenvironment variables:\n- `CLIPBOARD_COPY_COMMAND`\n- `CLIPBOARD_PASTE_COMMAND`\n\nIf these environment variables are not specified, then default OS commands are used based on `$*DISTRO`.\n\n**Remark:** The package is (extensively) tested and used on macOS.\nAt this point it is not tested on other OS. (Issues and pull requests are welcome!)\n\n------\n\n## Installation\n\nZef ecosystem:\n\n```\nzef install Clipboard\n```\n\nGitHub:\n\n```\nzef install https://github.com/antononcube/Raku-Clipboard.git\n```\n\n------\n\n## Usage examples\n\nHere Raku packages for clipboard- and Large Language Models (LLMs) utilization are loaded:\n\n```perl6\nuse Clipboard;\nuse LLM::Functions;\n```\n\nHere is an LLM prompt for code writing assistance (Raku-modified version of [this one](https://resources.wolframcloud.com/PromptRepository/resources/CodeWriter/)):\n\n```perl6\nmy $promptCodeWriter = q:to/END/;\nYou are Code Writer and as the coder that you are, you provide clear and concise code only, without explanation nor conversation. \nYour job is to output code with no accompanying text.\nDo not explain any code unless asked. Do not provide summaries unless asked.\nYou are the best Raku programmer in the world but do not converse.\nYou know the Raku documentation better than anyone but do not converse.\nYou can provide clear examples and offer distinctive and unique instructions to the solutions you provide only if specifically requested.\nOnly code in Raku unless told otherwise.\nUnless they ask, you will only give code.\nEND\n\n$promptCodeWriter.chars\n```\n\nHere we make a chat object with the code writing prompt:\n\n```perl6\nmy $chat = llm-chat($promptCodeWriter, chat-id =\u003e 'RakuWriter', conf =\u003e 'ChatGPT');\n```\n\nHere we generate code through the chat object and get the result copied in the clipboard:\n\n```perl6\n$chat.eval('Generate a random dictionary of 5 elements. Return just code.') ==\u003e copy-to-clipboard\n```\n\nThe function `copy-to-clipboard`:\n- Places its first argument to the clipboard\n- If needed, converts its first argument into a string with `.raku`\n- Returns its first argument\n- Can produce CLI usage message fragment (see below)\n\nHere we get clipboard's content:\n\n```perl6\npaste\n```\n\nHere we evaluate clipboard's content (assuming it is Raku code):\n\n```perl6\nuse MONKEY-SEE-NO-EVAL;\nEVAL paste;\n```\n\n---------\n\n## Synonyms\n\nHere are the synonyms of the primary, default clipboard subs `copy-to-clipboard` and `paste`:\n\n```perl6\nuse Clipboard :DEFAULT;      # copy-to-clipboard, paste\nuse Clipboard :cb-prefixed;  # cbcopy, cbpaste\nuse Clipboard :long-names;   # copy-to-clipboard, paste-from-clipboard\nuse Clipboard :ALL;          # copy-to-clipboard, paste-from-clipboard, cbcopy, cbpaste, paste\n```\n \n---------\n\n## Implementation notes\n\nThe first version of this code was implemented in the package \"DSL::Shared\", [AAp2], and used in the \nCommand Line Interface (CLI) scripts of the [DSL family of packages](https://raku.land/?q=DSL%3A%3AEnglish%3A%3A)\n(for computational workflows.)\n\nCLI scripts that want to utilize `copy-to-clipboard` can complete their from usage messages\nwith the named argument `:$usage-message`:\n\n```perl6\nsay copy-to-clipboard(:usage-message);\n```\n\n---------\n\n## References\n\n[AAp1] Anton Antonov,\n[LLM::Functions](https://github.com/antononcube/Raku-LLM-Functions),\n(2023),\n[GitHub/antononcube](https://github.com/antononcube).\n\n[AAp2] Anton Antonov,\n[DSL::Shared](https://github.com/antononcube/Raku-LLM-Functions),\n(2020-2023),\n[GitHub/antononcube](https://github.com/antononcube).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fraku-clipboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantononcube%2Fraku-clipboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fraku-clipboard/lists"}