Skip to content

Commit

Permalink
Local reader script that uses deno deploy function
Browse files Browse the repository at this point in the history
  • Loading branch information
rarous committed Dec 12, 2022
1 parent 751392b commit 4601b5a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions reader/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const text = await Deno.readTextFile("../XONE K2 - 4 decks (Live FX).xml");
const resp = await fetch("https://serato-mapping-browser.deno.dev/", {
method: "POST",
headers: {
"Content-Type": "text/xml",
Accept: "application/json",
},
body: text,
});
const json = await resp.json();

console.log(JSON.stringify(json, null, 2));
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Serato UI doesn't help much, there is nothing like [Ableton Live Mapping Browser

## Parts

* [reader](reader) - deno script to convert source XML to JS representation (`cd reader; deno run --allow-read index.js | pbcopy`)
* [reader](reader) - deno script to convert source XML to JS representation (`cd reader; deno run --allow-read --allow-net main.js | pbcopy`)
* [display](display) - web frontend for visualisation of Serato XML data. (`cd display; yarn; yarn dev`)

<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.

0 comments on commit 4601b5a

Please sign in to comment.