feat: change bucket name

This commit is contained in:
Minhyeok Park 2024-10-16 21:44:35 +09:00
parent 11c6d1735e
commit d7be9973c7
Signed by: pmh_only
SSH Key Fingerprint: SHA256:g/OyGvi2pcd8ub9mqge/ohmDP0fZX/xOPWPIcM+9XpI
5 changed files with 74 additions and 13 deletions

View File

@ -14,5 +14,5 @@ jobs:
- run: wget https://dl.min.io/client/mc/release/linux-arm64/mc -O /tmp/mc - run: wget https://dl.min.io/client/mc/release/linux-arm64/mc -O /tmp/mc
- run: chmod +x /tmp/mc - run: chmod +x /tmp/mc
- run: /tmp/mc alias set minio http://minio-service.minio.svc.cluster.local:9000 ${{ secrets.MINIO_ACCESS_KEY }} ${{ secrets.MINIO_SECRET_KEY }} - run: /tmp/mc alias set minio http://minio-service.minio.svc.cluster.local:9000 ${{ secrets.MINIO_ACCESS_KEY }} ${{ secrets.MINIO_SECRET_KEY }}
- run: /tmp/mc mirror $PWD/ minio/ptools --exclude '.git/*' --exclude '.gitea/*' --overwrite - run: /tmp/mc mirror $PWD/ minio/ptools-chlrkdtkatjd --exclude '.git/*' --exclude '.gitea/*' --overwrite

View File

@ -11,12 +11,19 @@
<div id="container"> <div id="container">
<div id="main"></div> <div id="main"></div>
<div id="q"> <div id="q">
<div id="r"><p><button>The PTOOLS</button> by Minhyeok Park &copy;</p><textarea placeholder="Yea 'Reinventing the wheel' but Improved.&#10;&#10;(take a note here)"></textarea></div>
<div id="r"><p><button onclick="btn('regexp')"><<<</button> regexp</p><textarea id="regexp"></textarea></div>
<div id="r"><p><button onclick="btn('base64d')"><<<</button> base64d</p><textarea id="base64d"></textarea></div> <div id="r"><p><button onclick="btn('base64d')"><<<</button> base64d</p><textarea id="base64d"></textarea></div>
<div id="r"><p><button onclick="btn('base64e')"><<<</button> base64e</p><textarea id="base64e"></textarea></div> <div id="r"><p><button onclick="btn('base64e')"><<<</button> base64e</p><textarea id="base64e"></textarea></div>
<div id="r"><p><button onclick="btn('urid')"><<<</button> urid (cmp: <input id="uridcmp" style="width: 20px;" type="checkbox">)</p><textarea id="urid"></textarea></div> <div id="r"><p><button onclick="btn('urid')"><<<</button> urid (cmp: <input id="uridcmp" style="width: 20px;" type="checkbox">)</p><textarea id="urid"></textarea></div>
<div id="r"><p><button onclick="btn('urie')"><<<</button> urie (cmp: <input id="uriecmp" style="width: 20px;" type="checkbox">)</p><textarea id="urie"></textarea></div> <div id="r"><p><button onclick="btn('urie')"><<<</button> urie (cmp: <input id="uriecmp" style="width: 20px;" type="checkbox">)</p><textarea id="urie"></textarea></div>
<div id="r"><p><button onclick="btn('jsonbtf')"><<<</button> jsonbtf (sp: <input id="jsonbtfsp" style="width: 20px;" value="4">)</p><textarea id="jsonbtf"></textarea></div> <div id="r"><p><button onclick="btn('jsonbtf')"><<<</button> jsonbtf (sp: <input id="jsonbtfsp" style="width: 20px;" value="4">)</p><textarea id="jsonbtf"></textarea></div>
<div id="r"><p><button onclick="btn('jsonsmp')"><<<</button> jsonsmp</p><textarea id="jsonsmp"></textarea></div> <div id="r"><p><button onclick="btn('jsonsmp')"><<<</button> jsonsmp</p><textarea id="jsonsmp"></textarea></div>
<div id="r"><p><button onclick="btn('json2yml')"><<<</button> json2yml</p><textarea id="json2yml"></textarea></div>
<div id="r"><p><button onclick="btn('yml2json')"><<<</button> yml2json</p><textarea id="yml2json"></textarea></div>
<div id="r"><p><button onclick="btn('escape')"><<<</button> escape</p><textarea id="escape"></textarea></div>
<div id="r"><p><button onclick="btn('unescape')"><<<</button> unescape</p><textarea id="unescape"></textarea></div>
<div id="r"><p><button onclick="btn('gzipd')"><<<</button> gzipd</p><textarea id="gzipd"></textarea></div>
</div> </div>
</div> </div>
@ -121,13 +128,16 @@
</style> </style>
<script src="/node_modules/monaco-editor/min/vs/loader.js"></script> <script src="/node_modules/monaco-editor/min/vs/loader.js"></script>
<script> <script type="module">
import JSON5 from '/node_modules/json5/dist/index.min.mjs'
import YAML from '/node_modules/yaml/browser/index.js'
require.config({ paths: { vs: '/node_modules/monaco-editor/min/vs' } }); require.config({ paths: { vs: '/node_modules/monaco-editor/min/vs' } });
require(['vs/editor/editor.main'], function () { require(['vs/editor/editor.main'], function () {
var editor = monaco.editor.create(document.getElementById('main'), { var editor = monaco.editor.create(document.getElementById('main'), {
value: 'Type Something Here', value: 'Type Something Here',
language: 'json', language: 'yaml',
automaticLayout: true, automaticLayout: true,
minimap: { enabled: false }, minimap: { enabled: false },
fontSize: 16, fontSize: 16,
@ -138,15 +148,36 @@
wordWrap: true wordWrap: true
}); });
async function DecompressBlob(blob2) {
const byteCharacters = atob(blob2);
const byteNumbers = new Array(byteCharacters.length);
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i);
}
const byteArray = new Uint8Array(byteNumbers);
const blob = new Blob([byteArray]);
const ds = new DecompressionStream("gzip");
const decompressedStream = blob.stream().pipeThrough(ds);
return await new Response(decompressedStream).blob();
}
render() render()
function render () { function render () {
const value = editor.getValue() const value = editor.getValue()
try { document.getElementById('base64d').value = atob(value) } catch { document.getElementById('base64d').value ='(err)' } try { document.getElementById('regexp').value = value.split('\r\n\r\n').slice(0, 2).join('\n\n') + '\n\n' + ((value.split('\r\n\r\n')[1] || '').split('\r\n').map(v => JSON.stringify(new RegExp(value.split('\r\n\r\n')[0]).exec(v)?.groups)).join('\n')) } catch (err) { document.getElementById('regexp').value = err ?? '(err)' }
try { document.getElementById('base64e').value = btoa(value) } catch { document.getElementById('base64e').value ='(err)' } try { document.getElementById('base64d').value = atob(value) } catch (err) { document.getElementById('base64d').value = err ?? '(err)' }
try { document.getElementById('urid').value = document.getElementById('uridcmp').checked ? decodeURIComponent(value) : decodeURI(value) } catch { document.getElementById('urid').value = '(err)' } try { document.getElementById('base64e').value = btoa(value) } catch (err) { document.getElementById('base64e').value = err ?? '(err)' }
try { document.getElementById('urie').value = document.getElementById('uriecmp').checked ? encodeURIComponent(value) : encodeURI(value) } catch { document.getElementById('urie').value = '(err)' } try { document.getElementById('urid').value = document.getElementById('uridcmp').checked ? decodeURIComponent(value) : decodeURI(value) } catch (err) { document.getElementById('urid').value = err ?? '(err)' }
try { document.getElementById('jsonbtf').value = value.split('\n').map((v) => JSON.stringify(JSON.parse(v), null, parseInt(document.getElementById('jsonbtfsp').value))).join('\n') } catch { document.getElementById('jsonbtf').value ='(err)' } try { document.getElementById('urie').value = document.getElementById('uriecmp').checked ? encodeURIComponent(value) : encodeURI(value) } catch (err) { document.getElementById('urie').value = err ?? '(err)' }
try { document.getElementById('jsonsmp').value = JSON.stringify(JSON.parse(value)) } catch { document.getElementById('jsonsmp').value ='(err)' } try { document.getElementById('jsonbtf').value = value.split('\n').map((v) => JSON.stringify(JSON5.parse(v), null, parseInt(document.getElementById('jsonbtfsp').value))).join('\n') } catch (err) { document.getElementById('jsonbtf').value = err ?? '(err)' }
try { document.getElementById('jsonsmp').value = JSON.stringify(JSON5.parse(value)) } catch (err) { document.getElementById('jsonsmp').value = err ?? '(err)' }
try { document.getElementById('json2yml').value = YAML.stringify(JSON5.parse(value)) } catch (err) { document.getElementById('json2yml').value = err ?? '(err)' }
try { document.getElementById('yml2json').value = JSON.stringify(YAML.parse(value)) } catch (err) { document.getElementById('yml2json').value = err ?? '(err)' }
try { document.getElementById('escape').value = JSON.stringify(value) } catch (err) { document.getElementById('escape').value = err ?? '(err)' }
try { document.getElementById('unescape').value = JSON5.parse(value) } catch (err) { document.getElementById('unescape').value = err ?? '(err)' }
try { DecompressBlob(value).then((v) => v.text()).then((v) => document.getElementById('gzipd').value = v).catch((err) => document.getElementById('gzipd').value = err ?? '(err)') } catch (err) { document.getElementById('gzipd').value = err ?? '(err)' }
} }
window.btn = (id) => { window.btn = (id) => {

6
package-lock.json generated
View File

@ -6,8 +6,10 @@
"": { "": {
"dependencies": { "dependencies": {
"@fontsource-variable/jetbrains-mono": "^5.1.1", "@fontsource-variable/jetbrains-mono": "^5.1.1",
"json5": "^2.2.3",
"monaco-editor": "^0.52.0", "monaco-editor": "^0.52.0",
"normalize.css": "^8.0.1" "normalize.css": "^8.0.1",
"yaml": "^2.6.0"
} }
}, },
"node_modules/.pnpm/@fontsource-variable+jetbrains-mono@5.1.1/node_modules/@fontsource-variable/jetbrains-mono": { "node_modules/.pnpm/@fontsource-variable+jetbrains-mono@5.1.1/node_modules/@fontsource-variable/jetbrains-mono": {
@ -5789,7 +5791,6 @@
"version": "2.2.3", "version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
"json5": "lib/cli.js" "json5": "lib/cli.js"
@ -8642,7 +8643,6 @@
"version": "2.6.0", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz",
"integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==",
"dev": true,
"license": "ISC", "license": "ISC",
"bin": { "bin": {
"yaml": "bin.mjs" "yaml": "bin.mjs"

View File

@ -1,7 +1,9 @@
{ {
"dependencies": { "dependencies": {
"@fontsource-variable/jetbrains-mono": "^5.1.1", "@fontsource-variable/jetbrains-mono": "^5.1.1",
"json5": "^2.2.3",
"monaco-editor": "^0.52.0", "monaco-editor": "^0.52.0",
"normalize.css": "^8.0.1" "normalize.css": "^8.0.1",
"yaml": "^2.6.0"
} }
} }

View File

@ -11,20 +11,48 @@ importers:
'@fontsource-variable/jetbrains-mono': '@fontsource-variable/jetbrains-mono':
specifier: ^5.1.1 specifier: ^5.1.1
version: 5.1.1 version: 5.1.1
json5:
specifier: ^2.2.3
version: 2.2.3
monaco-editor: monaco-editor:
specifier: ^0.52.0 specifier: ^0.52.0
version: 0.52.0 version: 0.52.0
normalize.css:
specifier: ^8.0.1
version: 8.0.1
yaml:
specifier: ^2.6.0
version: 2.6.0
packages: packages:
'@fontsource-variable/jetbrains-mono@5.1.1': '@fontsource-variable/jetbrains-mono@5.1.1':
resolution: {integrity: sha512-V+1aRFRvuZ66PpO30s8l/2aADKzpV9VRsO3kSZE+rTMvi4vab3cUcPHMN2z+wAvjkYJO71Yf+g3/Y6pSMmQpVQ==} resolution: {integrity: sha512-V+1aRFRvuZ66PpO30s8l/2aADKzpV9VRsO3kSZE+rTMvi4vab3cUcPHMN2z+wAvjkYJO71Yf+g3/Y6pSMmQpVQ==}
json5@2.2.3:
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
engines: {node: '>=6'}
hasBin: true
monaco-editor@0.52.0: monaco-editor@0.52.0:
resolution: {integrity: sha512-OeWhNpABLCeTqubfqLMXGsqf6OmPU6pHM85kF3dhy6kq5hnhuVS1p3VrEW/XhWHc71P2tHyS5JFySD8mgs1crw==} resolution: {integrity: sha512-OeWhNpABLCeTqubfqLMXGsqf6OmPU6pHM85kF3dhy6kq5hnhuVS1p3VrEW/XhWHc71P2tHyS5JFySD8mgs1crw==}
normalize.css@8.0.1:
resolution: {integrity: sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==}
yaml@2.6.0:
resolution: {integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==}
engines: {node: '>= 14'}
hasBin: true
snapshots: snapshots:
'@fontsource-variable/jetbrains-mono@5.1.1': {} '@fontsource-variable/jetbrains-mono@5.1.1': {}
json5@2.2.3: {}
monaco-editor@0.52.0: {} monaco-editor@0.52.0: {}
normalize.css@8.0.1: {}
yaml@2.6.0: {}