{"id":20837831,"url":"https://github.com/raguay/sveltescriptserver","last_synced_at":"2025-05-08T20:34:50.891Z","repository":{"id":45743735,"uuid":"329253004","full_name":"raguay/SvelteScriptServer","owner":"raguay","description":"Svelte Script Server gives you a way to automate your computer from your phone on the same network.","archived":false,"fork":false,"pushed_at":"2022-12-13T22:50:23.000Z","size":152,"stargazers_count":5,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T17:59:19.483Z","etag":null,"topics":["alfred","hammerspoon","phone","svelte3","tablet"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raguay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-13T09:15:10.000Z","updated_at":"2023-08-23T18:10:07.000Z","dependencies_parsed_at":"2022-09-01T04:11:16.862Z","dependency_job_id":null,"html_url":"https://github.com/raguay/SvelteScriptServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raguay%2FSvelteScriptServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raguay%2FSvelteScriptServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raguay%2FSvelteScriptServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raguay%2FSvelteScriptServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raguay","download_url":"https://codeload.github.com/raguay/SvelteScriptServer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253146021,"owners_count":21861315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alfred","hammerspoon","phone","svelte3","tablet"],"created_at":"2024-11-18T01:08:41.831Z","updated_at":"2025-05-08T20:34:50.833Z","avatar_url":"https://github.com/raguay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Svelte Script Server\n\nI was asked somewhere about what to do with an extra phone. I mentioned that I use \none as a launch pad for running scripts on my main computer using a homebrewed solution. \nI was asked to share it. But, it is entertwined in another project of mine. So, I've \npulled it out, refactored, and added a QR code to connect the phone. Now, anyone can \nuse my system. But, I can't remember where and who asked me to do this. I hope he finds \nthis.\n\nThis little project has two parts: an Expressjs server and the Svelte based \nUI. The server is in the `Server` directory and the user interface is in the \n`UI` directory. Once you download this project and install [nodejs](https://nodejs.org/en/), go to each directory and \nrun the command:\n\n```sh\nnpm install\n```\n\nOnce all the dependencies are installed, come back to the root directory and \nrun:\n\n```sh\nmask LaunchServer\n```\n\nYou have to have [mask](https://github.com/jakedeichert/mask) installed for this to work. Or, open the `maskfile.md` \nand run the commands under the `LaunchServer` H2 heading. The `LaunchServer` script in the \n`maskfile.md` will first compile the UI files and then launch the nodejs Express server on \nport 3000.\n\nWhen launched on the main computer, open your browser to `http://localhost:3000` in \nyour web browser. This will show all the script launching buttons and a button in the top right \ncorner that says `Show QR Code`. Using your phone or tablet, scan the QR code that \nappears when you press the button, and launch it in the browser for that device. You \nwill have the same page loaded, \nbut without the `Show QR Code` button. Your tablet or smart phone has to be \non the same subnet in order to work.\n\nThis project isn't really complete, but it is functional. It is used to \ncreate buttons on a web page that executes scripts on the main computer. I \nuse it all the time to launch scripts for adjusting window positions using \nhammerspoon, launching Alfred workfows, and anything else I need to do. I \nthen load it onto my tablet or smart phone and keep it beside my computer. \nIt makes a very convient way to launch scripts that I use a lot.\n\nIn order to use the scripts I've programmed already, you will need to have [Hammerspoon](https://www.hammerspoon.org/) \nand [Alfred](https://www.alfredapp.com/) with my Hammerspoon workflow and Taskpaper Todo \nworkflow found [here](https://github.com/raguay/MyAlfred).\n\nIn order to customize the buttons, you need to edit the `ScriptList` structure \nin the `main.js` file in the UI. That structure contains the contents of the \nbutton and the information needed to lauch scripts. I left a few to give you \nan example of how I use it.\n\nEven though my examples will only work on a Mac, you can use this on any system \nthat supports nodejs. Let me know how you make use of this system.\n\n## Todo\n\nThis is part of a larger project of mine. Therefore, as I upgrade it there, \nI'll be upgrading here as well. Currently it needs:\n\n- Graphic customizer instead of manualling changing the program\n- Saving and retreiving the defaults from a file\n- Make the UI pretty\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraguay%2Fsveltescriptserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraguay%2Fsveltescriptserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraguay%2Fsveltescriptserver/lists"}