Skip to content

Commit

Permalink
Merge pull request #6 from boomzero/next
Browse files Browse the repository at this point in the history
Sync Next
  • Loading branch information
boomzero authored Jul 3, 2024
2 parents 3930897 + 64951ab commit deac889
Show file tree
Hide file tree
Showing 9 changed files with 490 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .fleet/run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"configurations": []
}
10 changes: 1 addition & 9 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno

name: Deno

on:
Expand Down Expand Up @@ -39,5 +31,5 @@ jobs:
run: deno lint

- name: Run tests
run: deno compile -A -c tsconfig.json index.ts
run: deno compile -A index.ts

6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
deno-version: v1.x
- name: Build
run: |
deno compile -A -c tsconfig.json -o bin/quicksubmit-linux index.ts
deno compile -A -c tsconfig.json -o bin/quicksubmit-win.exe --target x86_64-pc-windows-msvc index.ts
deno compile -A -c tsconfig.json -o bin/quicksubmit-macos --target x86_64-apple-darwin index.ts
deno compile -A -o bin/quicksubmit-linux index.ts
deno compile -A -o bin/quicksubmit-win.exe --target x86_64-pc-windows-msvc index.ts
deno compile -A -o bin/quicksubmit-macos --target x86_64-apple-darwin index.ts
- name: Upload Linux binaries to release
uses: svenstaro/upload-release-action@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# quickSubmit

[![Deno](https://github.com/boomzero/quicksubmit/actions/workflows/deno.yml/badge.svg)](https://github.com/boomzero/quicksubmit/actions/workflows/deno.yml)
[![Publish](https://github.com/boomzero/quicksubmit/actions/workflows/publish.yml/badge.svg)](https://github.com/boomzero/quicksubmit/actions/workflows/publish.yml)

Submit Code to XMOJ.

<img width="674" alt="image" src="https://github.com/boomzero/quicksubmit/assets/85378277/8aaa4e99-60fc-4200-be19-f66b09044102">
Expand Down
8 changes: 8 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"lib": ["ESNext", "dom"],
"strict": false,
"jsx": "react-jsx",
"allowJs": true
}
}
13 changes: 12 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* quickSubmit
* Copyright (C) 2023-2024 boomzero
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import { Command } from "commander";
import { JSDOM } from "jsdom";
import MD5 from "crypto-js/md5.js";
Expand Down Expand Up @@ -257,9 +275,11 @@ program
const rid: string = dom.window.document.querySelector(
`tr.oddrow:nth-child(1) > td:nth-child(2)`,
).innerHTML;
//let rst:string = dom.window.document.querySelector('tr.oddrow:nth-child(1) > td:nth-child(5) > a:nth-child(1)').innerHTML;
console.log(`Submitted ${file} to problem ${rPID}!`);
console.log(`Submission ID: ${rid}`);
console.log(
`Submission URL: \u001b]8;;https://www.xmoj.tech/reinfo.php?sid=${rid}\u001b\\https://www.xmoj.tech/reinfo.php?sid=${rid}\u001b]8;;\u001b\\`,
);
const logoutReq = await fetch("https://www.xmoj.tech/logout.php", {
"credentials": "include",
"headers": {
Expand Down
Loading

0 comments on commit deac889

Please sign in to comment.