From 2079a500dd9359fe7b2d879e6292dfe79f558dda Mon Sep 17 00:00:00 2001 From: "Wilma456 (Jakob0815)" Date: Sat, 5 Aug 2017 16:05:43 +0200 Subject: [PATCH 1/2] Create 11-clipboard.md --- standards/11-clipboard.md | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 standards/11-clipboard.md diff --git a/standards/11-clipboard.md b/standards/11-clipboard.md new file mode 100644 index 0000000..435036f --- /dev/null +++ b/standards/11-clipboard.md @@ -0,0 +1,41 @@ +# *COS 11:* Clipboard + +## Quick information +| Information | | +| ----------- | -------------------------------------------------------------------------------------- | +| Version | 1.0.0 | +| Type | Protocol | + +### Technical Details +Clipboard defines a method to share information like text with other programs. + +It is a Table called "clipboard" in the Shell Environment. + +#### The Clipboard Table +It is a Table called "clipboard" in the Shell Environment. + +| Header | Description | +| ----------- | -------------------------------------------------------------------------------------- | +| type | A String, that Describes, what is in the Clipboard (see at Point "Types") | +| content | This is the Content of the Clipboard see "Types" | | + +#### Types +| Type | Content | +| ----------- | -------------------------------------------------------------------------------------- | +| text | Just normal text provided as a String. | +| nfp | A nfp Image provided as String | +| nft | A nft Image provided as String | + +### Usage +Set text of Clipboard: +```lua +clipboard = {type="text",content="Hello World"} +``` +Get Text of Clipboard +```lua +if type(clipboard) == "table" then + if clipboard.type == "text" then + print(clipboard.content) + end +end +``` From ad3907deae6925bd4d4cec18e69fcf5eb0211b09 Mon Sep 17 00:00:00 2001 From: "Wilma456 (Jakob0815)" Date: Sat, 5 Aug 2017 16:07:38 +0200 Subject: [PATCH 2/2] Add Clipboard to Readme --- standards/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/standards/README.md b/standards/README.md index fb70a9f..2adfbf5 100644 --- a/standards/README.md +++ b/standards/README.md @@ -11,3 +11,4 @@ This document contains a list of all standards. | 6 | [Nitrogen Fingers Text](6-nft.md) | File format | Images with text support | | 7 | [Temporary directory](7-temp-directory.md) | File format | Storing temporary files | | 10 | [TRoR](10-tror.md) | Protocol | Redirecting terminal state and interactions over Rednet. | +| 11 | [Clipboard](11-clipboard.md) | Protocol | Share Informations with other Programs |