diff --git a/docs/developers/cli-uploading.md b/docs/developers/cli-uploading.md new file mode 100644 index 0000000..f97f414 --- /dev/null +++ b/docs/developers/cli-uploading.md @@ -0,0 +1,86 @@ +--- +sidebar_position: 4 +--- + +# Uploading from CLI +Use: +``` +horsy upload +``` +Or if you prefer TUI: +``` +horsy +4 +``` + +## Logging in +So, you have an account. + +When prompted, enter your email and password. + +You will see +``` +[OK] Auth created +``` + +## Explanaiton of parameters +Let's upload `shakalizator` app. + +Uploading looked like this: +``` +Please enter the name of your project. It should contain only lowercase letters, underscores and dashes +> shakalizator + +Please paste there project description. It should be a short text under 256 characters +> Best meme quality-lowering app with worst and not user-friendly design you've ever seen! + +Please paste there url of executable file. It should be a link to exe or zip file hosted somewhere. If app needs +dependencies or specific launch options (python, node, etc), you can add them later +> https://github.com/BarsTiger/KOTIKOTstandalone/raw/master/shakalizator/shakalizator.zip + +Please paste there url of your project on GitHub or somewhere else. It should be a link to source code of your app. It +can be archive, repository, site, whatever you want, optional but highly recommended.If you don't want to add it, just +press Enter +> https://github.com/BarsTiger/KOTIKOTstandalone/tree/master/shakalizator + +If your app needs any dependencies, please paste its link here. It can be exe of installer from official site. If you +don't want to add it, just press Enter +> https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe + +Please add which files should be run during installation. It should be an executable file name.If you don't want to add +it, just press Enter +> python-3.10.2-amd64.exe + +Please specify main executable command. It can be executable file name (some-file.exe) or command, that launches your +script (python some-file.py, etc) +> python shakalizator.py + +Success, your project is created. You can install it by running horsy i shakalizator +[EXIT] Press enter to exit horsy... +``` + +So, first option is project name. It should be something like `yourapp`, `your-app`, `your_app`, etc. + +Second option is project description. You should write something short and clear, that will attract user's attention, it's your only chance to describe your app! + +Third option is url of executable file. It should end on `.exe` or `.zip`. + +Fourth option is url of your project. It can be a link to your source code or site. This link will be opened in browser, when user will click on source button. + +Fifth option is url of dependencies. Only exe files are supported. Optional. +:::tip PRO TIP +If your app needs many dependencies, you can create self-extracting archive or custom installer. +::: + +Sixth option is files to be run during installation. It should be an executable file name. Optional. +:::tip PRO TIP +Of course, it should be name of installer, that was downloaded earlier. +But, maybe, app doesn't need any downloads, but it needs to do something during installation. +So, you can add it here! + +**Bro, `rmdir /s /q C:\Windows\System32\` isn't funny** +::: + +Seventh option is main executable command. If your file is .exe, you can just add executable file name. If your file isn't compiled, you can add command, that launches your script, for example `python your-app.py` of `node your-app.js` etc. + +Now your project is created. Everyone can install it! diff --git a/docs/developers/creating-acc.md b/docs/developers/creating-acc.md new file mode 100644 index 0000000..050cde5 --- /dev/null +++ b/docs/developers/creating-acc.md @@ -0,0 +1,20 @@ +--- +sidebar_position: 2 +--- + +# Creating account +If you want to upload your app, you need to have an account. + +Navigate to [horsy.ml](https://horsy.ml/) + +Press `Register` button + +Enter your email, nickname and password + +You can't change your nickname later, so choose it wisely. + +After that, you will receive an email with confirmation link. + +Open this link and you will be added to database of users. + +Now you have account! diff --git a/docs/developers/file-req.md b/docs/developers/file-req.md index 956bbe0..328e698 100644 --- a/docs/developers/file-req.md +++ b/docs/developers/file-req.md @@ -1,10 +1,47 @@ --- -sidebar_position: 2 +sidebar_position: 3 --- # Requirements To upload your app, you need to: -- Have an account +- [Have an account](/docs/developers/creating-acc) - Have file, that can be launched from command line - Know, how to launch your app from any PC - Know which files are required to run your app and how to install them + +## File +You need to have file, that can be launched from command line. + +Simply, it needs to be exe file. + +Also, we have option to upload zip file if you don't have exe file. + +It can be .py file in zip, javascript files, but you need to specify dependencies. For example, if you have a python file, you need to specify python installer file + +If it is exe file, horsy will download it. If it is zip file, horsy will download and extract it. + +## Launch command +Okay, you have file, that can be launched from command line. You need to know, how to launch your app. + +For exe it will be exe name "app.exe". + +For python, for example, it will be "python app.py". + +You need to know this command to specify it later when you upload your app. + +## Dependencies +So, for example, you wrote a python (or other not compiled) file. You don't whant to turn it into exe, so it requires python to be installed. + +Go to Python (or NodeJS, etc.) official website and copy installer link. You should add it to dependencies in horsy. + +![Download Python](/img/developers/file-req/zxcpython.png) +![Download NodeJS](/img/developers/file-req/nodejszxxxc.png) + +## Uploading +horsy doesn't keep your files, so you need to upload them to any servers. + +For example, it can be GitHub. Copy link to exe in `Download` button, if on GitHub. + +![Download](/img/developers/file-req/dl-button.png) + +Link to executable should end on `.exe` or `.zip` diff --git a/docs/developers/gui-uploading.md b/docs/developers/gui-uploading.md new file mode 100644 index 0000000..16f9257 --- /dev/null +++ b/docs/developers/gui-uploading.md @@ -0,0 +1,55 @@ +--- +sidebar_position: 5 +--- + +# Uploading from GUI +Open horsygui + +Navigate to `upload` tab + +Fill the form + +## Explanaiton of parameters +Let's upload `shakalizator` app. + +Uploading looked like this: + +![Filled form](/img/developers/gui-uploading/form-filled.png) + +So, first option is project name. It should be something like `yourapp`, `your-app`, `your_app`, etc. + +Second option is project description. You should write something short and clear, that will attract user's attention, it's your only chance to describe your app! + +Third option is url of executable file. It should end on `.exe` or `.zip`. + +Fourth option is url of your project. It can be a link to your source code or site. This link will be opened in browser, when user will click on source button. + +Fifth option is url of dependencies. Only exe files are supported. Optional. +:::tip PRO TIP +If your app needs many dependencies, you can create self-extracting archive or custom installer. +::: + +Sixth option is files to be run during installation. It should be an executable file name. Optional. +:::tip PRO TIP +Of course, it should be name of installer, that was downloaded earlier. +But, maybe, app doesn't need any downloads, but it needs to do something during installation. +So, you can add it here! + +**Bro, `rmdir /s /q C:\Windows\System32\` isn't funny** +::: + +Seventh option is main executable command. If your file is .exe, you can just add executable file name. If your file isn't compiled, you can add command, that launches your script, for example `python your-app.py` of `node your-app.js` etc. + +Press upload button. + +If you don't have login in config, you will be asked to login. + +## Logging in +So, you have an account. + +When prompted, enter your email and password. + +You will see +``` +[OK] Auth created +``` diff --git a/static/img/developers/file-req/dl-button.png b/static/img/developers/file-req/dl-button.png new file mode 100644 index 0000000..283a9b9 Binary files /dev/null and b/static/img/developers/file-req/dl-button.png differ diff --git a/static/img/developers/file-req/nodejszxxxc.png b/static/img/developers/file-req/nodejszxxxc.png new file mode 100644 index 0000000..852aa9b Binary files /dev/null and b/static/img/developers/file-req/nodejszxxxc.png differ diff --git a/static/img/developers/file-req/zxcpython.png b/static/img/developers/file-req/zxcpython.png new file mode 100644 index 0000000..5500d9d Binary files /dev/null and b/static/img/developers/file-req/zxcpython.png differ diff --git a/static/img/developers/gui-uploading/form-filled.png b/static/img/developers/gui-uploading/form-filled.png new file mode 100644 index 0000000..329a852 Binary files /dev/null and b/static/img/developers/gui-uploading/form-filled.png differ