Skip to content

Commit 2f1be19

Browse files
committed
merge upstream
2 parents 92ce118 + ba47687 commit 2f1be19

Some content is hidden

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

68 files changed

+8197
-525
lines changed

.coding-aider-plans/refactor_tools_toolcontent.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.coding-aider-plans/refactor_tools_toolcontent_checklist.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.coding-aider-plans/refactor_tools_toolcontent_context.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,49 @@ jobs:
4949
name: playwright-report
5050
path: playwright-report/
5151
retention-days: 30
52+
build-and-push-docker:
53+
name: Build and Push Multi-Platform Docker Image
54+
runs-on: ubuntu-latest
55+
needs:
56+
- test-and-build
57+
- e2e-test
58+
if: github.ref == 'refs/heads/main'
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@v3
62+
63+
- name: Set up QEMU
64+
uses: docker/setup-qemu-action@v2
65+
with:
66+
platforms: 'arm64,amd64'
67+
68+
- name: Set up Docker Buildx
69+
uses: docker/setup-buildx-action@v2
70+
71+
- name: Login to DockerHub
72+
uses: docker/login-action@v2
73+
with:
74+
username: ${{ secrets.DOCKERHUB_USERNAME }}
75+
password: ${{ secrets.DOCKERHUB_TOKEN }}
76+
77+
- name: Extract metadata for Docker
78+
id: meta
79+
uses: docker/metadata-action@v4
80+
with:
81+
images: iib0011/omni-tools
82+
tags: |
83+
type=raw,value=latest
84+
85+
- name: Build and push Docker image
86+
uses: docker/build-push-action@v4
87+
with:
88+
context: .
89+
platforms: linux/amd64,linux/arm64
90+
push: true
91+
tags: ${{ steps.meta.outputs.tags }}
92+
labels: ${{ steps.meta.outputs.labels }}
93+
cache-from: type=gha
94+
cache-to: type=gha,mode=max
5295
deploy:
5396
if: github.ref == 'refs/heads/main'
5497
needs:

.idea/workspace.xml

Lines changed: 204 additions & 190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

img.png

-1.84 KB
Loading

package-lock.json

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"react-helmet": "^6.1.0",
5959
"react-image-crop": "^11.0.7",
6060
"react-router-dom": "^6.23.1",
61+
"tesseract.js": "^6.0.0",
6162
"type-fest": "^4.35.0",
6263
"use-deep-compare-effect": "^1.8.1",
6364
"yup": "^1.4.0"

public/gs.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// This is a placeholder file for the actual Ghostscript WASM implementation
2+
// In a real implementation, this would be the compiled Ghostscript WASM module
3+
4+
// You would need to download the actual Ghostscript WASM files from:
5+
// https://github.com/ochachacha/ps2pdf-wasm or compile it yourself
6+
7+
// This simulates the Module loading process that would occur with the real WASM file
8+
(function () {
9+
// Simulate WASM loading
10+
console.log('Loading Ghostscript WASM module...');
11+
12+
// Expose a simulated Module to the window
13+
window.Module = window.Module || {};
14+
15+
// Simulate filesystem
16+
window.FS = {
17+
writeFile: function (name, data) {
18+
console.log(`[Simulated] Writing file: ${name}`);
19+
return true;
20+
},
21+
readFile: function (name, options) {
22+
console.log(`[Simulated] Reading file: ${name}`);
23+
// Return a sample Uint8Array that would represent a PDF
24+
return new Uint8Array(10);
25+
}
26+
};
27+
28+
// Mark module as initialized after a delay to simulate loading
29+
setTimeout(function () {
30+
window.Module.calledRun = true;
31+
console.log('Ghostscript WASM module loaded');
32+
33+
// Add callMain method for direct calling
34+
window.Module.callMain = function (args) {
35+
console.log('[Simulated] Running Ghostscript with args:', args);
36+
// In a real implementation, this would execute the WASM module with the given arguments
37+
};
38+
}, 1000);
39+
})();

scripts/create-tool.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export default function ${capitalizeFirstLetter(toolNameCamelCase)}({
130130
initialValues={initialValues}
131131
exampleCards={exampleCards}
132132
getGroups={getGroups}
133+
setInput={setInput}
133134
compute={compute}
134135
toolInfo={{ title: \`What is a \${title}?\`, description: longDescription }}
135136
/>

0 commit comments

Comments
 (0)