Skip to content

Commit e3e4168

Browse files
committed
Merge branch 'main' into dogeiscutSets
2 parents a81ff17 + af541ff commit e3e4168

145 files changed

Lines changed: 10444 additions & 1211 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: build
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: install node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 22.x
21+
cache: 'npm'
22+
- run: npm ci
23+
- run: npm run build
24+
- name: Upload GitHub Pages artifact
25+
uses: actions/upload-pages-artifact@v3.0.1
26+
with:
27+
# Path of the directory containing the static assets.
28+
path: public/
29+
deploy:
30+
runs-on: ubuntu-latest
31+
needs: build
32+
#if: github.ref == 'refs/heads/main'
33+
permissions:
34+
id-token: write
35+
pages: write
36+
steps:
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4.0.5

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ node_modules
99
!.env.example
1010
vite.config.js.timestamp-*
1111
vite.config.ts.timestamp-*
12-
/temp
12+
/temp
13+
.dev
14+
desktop.ini

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Extension Gallery
22

3+
## Licensing
4+
The source for [the extensions site](https://extensions.penguinmod.com)
5+
(including but not limited to: the source code, assets, extension thumbnails and extension documentation)
6+
are all licensed under [the MIT license](https://opensource.org/license/mit).
7+
8+
### Extension code licensing
9+
See [the licensing file for extension code](/static/extensions/LICENSING.md).
10+
11+
Extension thumbnails and documentation are under the MIT license.
12+
313
## Submitting an extension
414

515
### NOTE!
@@ -16,10 +26,8 @@ Create your extension. You can find a lot of details [here](https://docs.turbowa
1626
and [Gallery page](https://extensions.penguinmod.com/) to confirm.
1727
- Your extension should be created for a specific purpose. An extension with random blocks someone might need will likely not get accepted if the blocks are not in a certain theme, like math or rendering.
1828
- Your extension should be easily explainable in 1-2 sentences or a single picture. This is what will determine whether you can be on the gallery or not.
19-
- Your extension should be MIT licensed (not compatible with the MIT license, should be the actual MIT license. This may change in the future.)
20-
- `Ashime/MoreFields` is currently a **temporary** exception to this rule. (MIT & LGPL-3.0 license)
21-
- `TheShovel/extexp` is currently a **temporary** exception to this rule. (MIT & LGPL-3.0 license)
22-
- The above exceptions are accidental changes. Do not knowingly submit extensions under a seperate license to purposely cause licensing issues on our repository.
29+
- Your extension should be under the MIT license or the LGPL-3.0 license.
30+
- See [Extension code licensing](#extension-code-licensing) for information.
2331
- If your extension uses external content such as JS libraries or CSS stylesheets, you must include them inside the extension code itself. You **CANNOT** fetch/import content from URLs that is a core part of your extension as it'll make the extension unusable offline, or in offline packaged projects. This does not apply to content that obviously requires internet, like an extension that allows projects to use a public API.
2432
- Your extension **CANNOT** be made entirely with AI or assistive tools such as TurboBuilder. You must understand the raw code your extension is running.
2533
- Your extension **CANNOT** rely on the use of any generative AI. This is mainly for extensions that respond to messages from AI like ChatGPT. Any extensions added before this rule are an exception.
@@ -208,7 +216,7 @@ Each extension is incased in `{}` brackets. Look below on how to copy it.
208216
name: "Evaluating Expressions", // The name of the extension.
209217
description: "Blocks to return the result of an expression.", // The description for the extension.
210218
code: "Username/extension.js", // The folder and file name for the code of the extension.
211-
banner: "Username/Extension.png", // The folder and file name for the banner of the extension.
219+
banner: "Username/Extension.avif", // The folder and file name for the banner of the extension. Ideally, use .avif format to save storage space.
212220
creator: "Username", // Your username. Adds a link to your profile.
213221

214222
// Only applies if you created a documentation page.
@@ -221,4 +229,4 @@ Each extension is incased in `{}` brackets. Look below on how to copy it.
221229
unstableReason: "May break sometimes, Use at your own risk.", // Optional. Will change the reason that your extension is unstable.
222230
isGitHub: false, // Optional. false means this is your Scratch username, true means this is your GitHub username.
223231
},
224-
```
232+
```

src/lib/Documentation/PenguinAI.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# PenguinAI Extension Documentation
22

3+
# PENGUINAI IS NOW DEPRECATED. USE AT YOUR OWN RISK.
4+
5+
Most of the models in this extension no longer work, and will not be fixed. See [This github issue](https://github.com/PenguinMod/PenguinMod-Home/issues/421) for more information. If this extension is present on an extension gallery, alert the owner to have it removed.
6+
7+
## Documentation
8+
39
The PenguinAI extension brings the power of artificial intelligence to your PenguinMod projects. This extension provides blocks for AI text generation, image creation, streaming conversations, and advanced chatbot management. Perfect for creating interactive AI-powered games, educational tools, and creative projects.
410

511
## Getting Started
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Project Interfaces
2+
3+
---
4+
5+
Project Interfaces is an extension to easily create GUI's inside your projects.
6+
This documentation will teach you the basics of how to use it.
7+
8+
---
9+
10+
## Getting started
11+
An "element" refers to an image, button, video, etc on the screen.
12+
This extension uses an ID system to keep track of GUI elements for later customization.
13+
14+
To create an element, use the "create element block".
15+
```scratch
16+
Create [Label v] element with ID [My element] :: #707eff
17+
```
18+
It's important to note that most elements (Like images) wont show up right away. They require more customization, like having the source url set to them.
19+
20+
It's good practice to name your id's such that it gives you a clue of what it's purpose is.
21+
Example: profile-image, button-1, button-2, ..
22+
23+
## Styling and Customization
24+
There are several element types to pick from, each with different attributes and ways to customize them.
25+
26+
Blocks under the "Styling" section of the extension can modify any element.
27+
```scratch
28+
Set position of ID [My element] to x: [50] y: [100] :: #707eff
29+
```
30+
Each element type also has its own section on the extension, with blocks that can customize that element specifically.
31+
32+
Lets take an input element for example, under the "Inputs" section of the extension you'll find blocks that can customize its input type, placeholder, accent color, value, get the value of the input, and detect when the input is changed.
33+
34+
```scratch
35+
when gf clicked
36+
Create [Input v] element with ID [My input] :: #707eff
37+
Set placeholder of ID [My input] to [What's your name?] :: #707eff
38+
39+
When input with ID [My input] changed :: hat :: #707eff
40+
Say (join [Hello ](Value of input with ID [My input] :: #707eff))
41+
```
42+
43+
## Advanced
44+
It's important to note that Project Interfaces uses [HTML elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements) to create GUI's in projects.
45+
46+
This extension has several blocks to further customize elements for those who have a deeper understanding of HTML and CSS.
47+
48+
The "Create html element" block will allow you to create an element based of a HTML tag of your choice.
49+
The "Set custom CSS" block will override an elements CSS properties.
50+
51+
```scratch
52+
Create html element [h1] with ID [HTML header] :: #707eff
53+
Set custom CSS of [HTML header] to [background-color: red] :: #707eff
54+
```
55+
56+
## Security
57+
For security reasons, only Label elements (Or span tags) can have text set for them.
58+
This prevents script execution from <script></script> tags.
59+
If you wish to execute JavaScript inside your project, please use the JavaScript V2 extension.
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# YeetYourFiles Extension Documentation
2+
3+
*"Upload files to the cloud by throwing it into outer space!"*
4+
5+
The YeetYourFiles extension allows you to upload files directly from your PenguinMod/TurboWarp projects to the YeetYourFiles hosting service. This extension provides blocks for uploading various types of files, tracking upload status, and retrieving file information.
6+
7+
## File Upload Blocks
8+
9+
### Upload File Data
10+
```scratch
11+
upload file data [data] name [file.txt] :: #FF8C00
12+
```
13+
Uploads file data with a specified filename to YeetYourFiles.
14+
15+
Parameters:
16+
- **data**: The file content as a string, base64 encoded data, or data URL
17+
- **name**: The filename to use for the uploaded file
18+
19+
Examples:
20+
- Upload text: `upload file data [Hello World!] name [greeting.txt]`
21+
- Upload base64 image: `upload file data [iVBORw0KGgoAAAANSUhEUg...] name [image.png]`
22+
- Upload JSON data: `upload file data [{"name": "John", "age": 30}] name [data.json]`
23+
- It can also upload data urls
24+
25+
### Upload File from URL
26+
```scratch
27+
upload file from URL [https://example.com/image.png] :: #FF8C00
28+
```
29+
Downloads a file from a URL and uploads it to YeetYourFiles.
30+
31+
Parameters:
32+
- **URL**: The web address of the file to download and upload
33+
34+
Examples:
35+
- Upload remote image: `upload file from URL [https://picsum.photos/200/300]`
36+
- Upload remote document: `upload file from URL [https://example.com/document.pdf]`
37+
38+
### Open File Dialog
39+
```scratch
40+
open file dialog and upload :: #FF8C00
41+
```
42+
Opens a file picker dialog allowing users to select and upload files from their device.
43+
44+
This block:
45+
- Opens the native file selection dialog
46+
- Accepts any file type
47+
- Automatically uploads the selected file
48+
- Updates all file information blocks with the upload results
49+
50+
## File Information Blocks
51+
52+
### Last Uploaded File ID
53+
```scratch
54+
(last uploaded file ID :: #FF8C00)
55+
```
56+
Returns the unique identifier of the most recently uploaded file.
57+
58+
Examples:
59+
- File ID: `3af5f431-b4a2-414a-8524-f878551e7c59`
60+
- Can be used to reference the file in other operations
61+
62+
### Last Uploaded File URL
63+
```scratch
64+
(last uploaded file URL :: #FF8C00)
65+
```
66+
Returns the complete web address where the uploaded file can be accessed.
67+
68+
Examples:
69+
- Full URL: `https://yyf.mubilop.com/file/abc123def456`
70+
- Direct access link to view or download the file
71+
72+
### Last Uploaded File Short Hash
73+
```scratch
74+
(last uploaded file short hash :: #FF8C00)
75+
```
76+
Returns a the short hash used by the server on some routes.
77+
78+
Examples:
79+
- Short hash: `abc123cd`
80+
81+
### Last Uploaded File Data
82+
```scratch
83+
(last uploaded file data :: #FF8C00)
84+
```
85+
Returns the complete upload response as a JSON string containing the response from the server (should be used for advanced stuff)
86+
87+
Example response:
88+
```json
89+
{
90+
"message":"File uploaded successfully",
91+
"fileId":"16fd17d4-0d36-4318-9452-f19cb3259374",
92+
"fileUrl":"/file/123456ab/MubiIsCool.mov",
93+
"shortHash":"123456ab"
94+
}
95+
```
96+
97+
## Status and Monitoring Blocks
98+
99+
### Upload Status
100+
```scratch
101+
(upload status :: #FF8C00)
102+
```
103+
Returns the current status of file uploads.
104+
105+
Possible values:
106+
- `idle`: No upload in progress
107+
- `uploading`: File upload is currently in progress
108+
109+
### Upload Successful?
110+
```scratch
111+
<upload successful? :: #FF8C00>
112+
```
113+
Returns true if the last upload operation completed successfully, false otherwise.
114+
115+
Examples:
116+
- `true`: Last upload completed without errors
117+
- `false`: Last upload failed or encountered an error
118+
119+
### Uploaded?
120+
```scratch
121+
<uploaded? :: #FF8C00>
122+
```
123+
Returns true if any file has been uploaded during the current session, false otherwise.
124+
125+
Examples:
126+
- `true`: At least one file has been uploaded since the project started
127+
- `false`: No files have been uploaded yet
128+
129+
### Total Files on YeetYourFiles
130+
```scratch
131+
(total files on YeetYourFiles :: #FF8C00)
132+
```
133+
Returns the total number of files currently hosted on the YeetYourFiles service.
134+
135+
Examples:
136+
- `15234`: Total files across all users
137+
- Updates each time the block is used
138+
139+
## Usage Examples
140+
141+
### Basic Text Upload
142+
```scratch
143+
when flag clicked
144+
upload file data [Hello from Scratch!] name [message.txt]
145+
wait until <upload successful?>
146+
say (join [File uploaded: ] (last uploaded file URL)) for (2) seconds
147+
```
148+
149+
### Upload with Status Monitoring
150+
```scratch
151+
when flag clicked
152+
upload file data [{"score": 100, "level": 5}] name [game-data.json]
153+
repeat until <not (upload status) = [uploading]>
154+
say [Uploading...] for (0.1) seconds
155+
end
156+
if <upload successful?> then
157+
say [Upload complete!] for (2) seconds
158+
else
159+
say [Upload failed!] for (2) seconds
160+
end
161+
```
162+
163+
### Interactive File Upload
164+
```scratch
165+
when [space v] key pressed
166+
open file dialog and upload
167+
wait until <uploaded?>
168+
if <upload successful?> then
169+
set [file count v] to (total files on YeetYourFiles)
170+
say (join [Uploaded! Total files: ] (file count)) for (2) seconds
171+
end
172+
```
173+
174+
## Error Handling
175+
176+
(You can use PenguinMod's Try and Catch block with it!)
177+
178+
The extension includes built-in error handling for common issues:
179+
180+
- **No file data**: Returns error when trying to upload empty data
181+
- **Invalid URL**: Returns error for malformed or inaccessible URLs
182+
- **Network issues**: Handles connection failures gracefully
183+
- **Server errors**: Provides feedback for server-side upload issues
184+
185+
When an upload fails:
186+
- The `upload successful?` block returns false
187+
- The `upload status` returns to "idle"
188+
- Error information is stored in the upload data for debugging
189+
190+
## Service Information
191+
192+
**YeetYourFiles Service**: https://yyf.mubilop.com
193+
- Free file hosting service
194+
- No registration required
195+
- Supports files up to reasonable size limits
196+
- Files are publicly accessible via direct URLs
197+
198+
## Additional Notes
199+
200+
- The extension requires unsandboxed mode to function properly
201+
- File uploads are performed asynchronously
202+
- All uploaded files become publicly accessible via their URLs
203+
- The service maintains a global counter of total uploaded files
204+
- File metadata is preserved including original filenames and upload timestamps

0 commit comments

Comments
 (0)