├── README.md └── worker.js /README.md: -------------------------------------------------------------------------------- 1 | # transcript-maker 2 | 部署在cf-worker的成绩单生成工具 3 | -------------------------------------------------------------------------------- /worker.js: -------------------------------------------------------------------------------- 1 | addEventListener('fetch', event => { 2 | event.respondWith(handleRequest(event.request)) 3 | }); 4 | 5 | async function handleRequest(request) { 6 | const url = new URL(request.url); 7 | 8 | // Serve the editor HTML at the root path 9 | if (url.pathname === '/') { 10 | const editorHtml = "\n\n\n \n \n \u6210\u7ee9\u5355\u7f16\u8f91\u5668\n \n\n\n
\n
\n

\u6210\u7ee9\u5355\u7f16\u8f91\u5668

\n
\n \n
\n

\u5b66\u6821\u4fe1\u606f

\n \n \n \n \n \n \n
\n \n
\n

\u5b66\u751f\u4e2a\u4fe1\u606f

\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n
\n

\u6210\u7ee9\u6c47\u603b

\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n

\u6309\u5b66\u5e74

\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n

\u6d4b\u8bd5\u6210\u7ee9 (ACT/SAT)

\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n
\n

\u8bfe\u7a0b\u8be6\u60c5

\n
\n
\n \n
\n \n
\n

GPA \u5e74\u5ea6\u5c0f\u7ed3 (\u5e95\u90e8)

\n
\n
\n \n
\n \n
\n

\u9875\u811a\u4fe1\u606f

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n

\u9ad8\u4eae\u8bbe\u7f6e (\u9009\u62e9\u9700\u8981\u9ad8\u4eae\u7684\u5b57\u6bb5)

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

\u6210\u7ee9\u5355\u5b9e\u65f6\u9884\u89c8

\n
\n

\u7f16\u8f91\u5de6\u4fa7\u8868\u5355\u5185\u5bb9\u540e\uff0c\u6b64\u5904\u5c06\u5b9e\u65f6\u663e\u793a\u9884\u89c8\u6548\u679c\u3002

\n
\n \n
\n
\n\n \n\n\n\n"; // Python variable inserted here 11 | return new Response(editorHtml, { 12 | headers: { 'Content-Type': 'text/html;charset=UTF-8' }, 13 | }); 14 | } 15 | 16 | // Placeholder for other routes or API endpoints if needed in the future 17 | /* 18 | if (url.pathname === '/generate-image-server-side') { 19 | // ... logic to handle server-side image generation ... 20 | return new Response('Image generation endpoint (server-side - not implemented)', { headers: { 'Content-Type': 'text/plain' } }); 21 | } 22 | */ 23 | 24 | return new Response('Not found', { status: 404 }); 25 | } 26 | --------------------------------------------------------------------------------