This repository has been archived on 2022-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
arsenm-dev-site/public/index.min.9cdd9b109f38962a8...

7 lines
49 KiB
JavaScript

var suggestions=document.getElementById('suggestions');var userinput=document.getElementById('userinput');document.addEventListener('keydown',inputFocus);function inputFocus(e){if(e.keyCode===191){e.preventDefault();userinput.focus();}
if(e.keyCode===27){userinput.blur();suggestions.classList.add('d-none');}}
document.addEventListener('click',function(event){var isClickInsideElement=suggestions.contains(event.target);if(!isClickInsideElement){suggestions.classList.add('d-none');}});document.addEventListener('keydown',suggestionFocus);function suggestionFocus(e){const focusableSuggestions=suggestions.querySelectorAll('a');const focusable=[...focusableSuggestions];const index=focusable.indexOf(document.activeElement);let nextIndex=0;if(e.keyCode===38){e.preventDefault();nextIndex=index>0?index-1:0;focusableSuggestions[nextIndex].focus();}
else if(e.keyCode===40){e.preventDefault();nextIndex=index+1<focusable.length?index+1:index;focusableSuggestions[nextIndex].focus();}}
(function(){var index=new FlexSearch({preset:'score',cache:true,doc:{id:'id',field:['title','description','content',],store:['href','title','description',],},});var docs=[{id:0,href:"/docs/advmake/",title:"AdvMake Docs",description:"Documentation for the AdvMake build system",content:""},{id:1,href:"/docs/advmake/build-files/",title:"Build Files",description:"Understanding AdvMake Build Files",content:"\u003cp\u003e\u003ca class=\"btn\" style=\"color: white; background-color: green;\" href=\"https://gitea.arsenm.dev/Arsen6331/advmake\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"cib:gitea\"\u003e\u003c/span\u003e \n \u0026nbsp;AdvMake\n\u003c/a\u003e\n\n\u003ca class=\"btn\" style=\"color: white; background-color: OrangeRed;\" href=\"https://www.gitlab.com/moussaelianarsen/advmake\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"fa-brands:gitlab\"\u003e\u003c/span\u003e\n \u0026nbsp;AdvMake\n\u003c/a\u003e\n\u003c/p\u003e\n\u003ch3 id=\"format\"\u003eFormat\u003c/h3\u003e\n\u003cp\u003eAdvMake uses \u003ca href=\"https://github.com/bazelbuild/starlark\"\u003eStarlark\u003c/a\u003e as the format for its build files.\nExtra builtins are also defined for both convenience and extra functionality.\u003c/p\u003e\n\u003cp\u003eStarlark is a Python-like language meant for configuration files.\u003c/p\u003e\n\u003ch3 id=\"configuration\"\u003eConfiguration\u003c/h3\u003e\n\u003cp\u003eBuild files are by default called \u003ccode\u003eAdvMakefile\u003c/code\u003e, but that can be set via \u003ccode\u003e-f\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eAn AdvMakefile example can be found at AdvMake\u0026rsquo;s repo as it uses AdvMake itself.\u003c/p\u003e\n\u003cp\u003eAdvMake runs functions exposed by starlark in the format \u003ccode\u003e\u0026lt;name\u0026gt;_\u0026lt;target\u0026gt;\u003c/code\u003e.\nTo set the default name and target, the global variables \u003ccode\u003edefaultName\u003c/code\u003e, and \u003ccode\u003edefaultTarget\u003c/code\u003e must be set.\nHere is an example from AdvMake\u0026rsquo;s AdvMakefile:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003edefaultName\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;advmake\u0026#34;\u003c/span\u003e\n\u003cspan class=\"n\"\u003edefaultTarget\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;build\u0026#34;\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThis will tell AdvMake to run the function \u003ccode\u003eadvmake_build()\u003c/code\u003e when run with no arguments.\u003c/p\u003e\n\u003cp\u003eIf AdvMake is run with one argument (such as \u003ccode\u003eadvmake install\u003c/code\u003e), it will use the default name with the specified target,\nso in that case, it would run \u003ccode\u003eadvmake_install()\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eIf run with two arguments, AdvMake will use the first argument as the name and the second as the target.\nSo, running \u003ccode\u003eadvmake hello world\u003c/code\u003e would run the function \u003ccode\u003ehello_world()\u003c/code\u003e.\u003c/p\u003e\n\u003ch3 id=\"builtins\"\u003eBuiltins\u003c/h3\u003e\n\u003cp\u003eAs previously mentioned, AdvMake comes with extra builtins. Those are as follows:\u003c/p\u003e\n\u003ch4 id=\"log\"\u003e\u003ccode\u003elog()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe log function uses zerolog in go to log a message to STDOUT. It has two arguments.\nThe first is a string with the message to log, and the second is \u003ccode\u003elevel\u003c/code\u003e which is optional\u003c/p\u003e\n\u003cp\u003eExamples:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003elog\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;Info log\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Default level is info\u003c/span\u003e\n\u003cspan class=\"n\"\u003elog\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;Warn log\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"n\"\u003elevel\u003c/span\u003e\u003cspan class=\"o\"\u003e=\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;warn\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Warn level log\u003c/span\u003e\n\u003cspan class=\"n\"\u003elog\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;Debug log\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"n\"\u003elevel\u003c/span\u003e\u003cspan class=\"o\"\u003e=\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;debug\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Debug level log\u003c/span\u003e\n\u003cspan class=\"n\"\u003elog\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;Fatal log\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"n\"\u003elevel\u003c/span\u003e\u003cspan class=\"o\"\u003e=\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;fatal\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Fatal level log. This will exit the program when executed\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"execute\"\u003e\u003ccode\u003eexecute()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe execute function runs a script using \u003ccode\u003esh -c\u003c/code\u003e. This function has three arguments.\nThe first is required and is a string with the script to run, the second is \u003ccode\u003eoutput\u003c/code\u003e\nwhich is optional. It can be set to \u003ccode\u003ereturn\u003c/code\u003e, \u003ccode\u003estdout\u003c/code\u003e, or \u003ccode\u003eboth\u003c/code\u003e, and the default is \u003ccode\u003eboth\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eThe \u003ccode\u003eoutput\u003c/code\u003e argument controls where the script\u0026rsquo;s output will be directed:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ccode\u003ereturn\u003c/code\u003e: Returns script output as string\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003estdout\u003c/code\u003e: Prints script output to STDOUT, returning nothing\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eboth\u003c/code\u003e: Prints to STDOUT and returns as string\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThe third argument is \u003ccode\u003econcurrent\u003c/code\u003e which can be either \u003ccode\u003eTrue\u003c/code\u003e or \u003ccode\u003eFalse\u003c/code\u003e, default \u003ccode\u003eFalse\u003c/code\u003e.\nIf \u003ccode\u003econcurrent\u003c/code\u003e is set to \u003ccode\u003eTrue\u003c/code\u003e, all the lines in the script will be split and run concurrently\nvia goroutines. The maximum threads for goroutines can be controlled using the \u003ccode\u003eGOMAXPROCS\u003c/code\u003e environment\nvariable and is by default the amount of CPU cores present.\u003c/p\u003e\n\u003cp\u003eExamples:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003euser\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"n\"\u003eexecute\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;whoami\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# This will print the username to STDOUT and set the user variable to it\u003c/span\u003e\n\u003cspan class=\"n\"\u003euser\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"n\"\u003eexecute\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;whoami\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"n\"\u003eoutput\u003c/span\u003e\u003cspan class=\"o\"\u003e=\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;return\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# This will set the user variable to the username but not print it\u003c/span\u003e\n\n\u003cspan class=\"n\"\u003eexecute\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;\u0026#34;\u0026#34;\n\u003c/span\u003e\u003cspan class=\"s2\"\u003ecp file destination\n\u003c/span\u003e\u003cspan class=\"s2\"\u003emv destination destination-1\n\u003c/span\u003e\u003cspan class=\"s2\"\u003eecho \u0026#39;hello world\u0026#39;\n\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;\u0026#34;\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Example of a multiline script\u003c/span\u003e\n\n\u003cspan class=\"n\"\u003eexecute\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;\u0026#34;\u0026#34;\n\u003c/span\u003e\u003cspan class=\"s2\"\u003einstall -Dm755 program /usr/bin\n\u003c/span\u003e\u003cspan class=\"s2\"\u003einstall -Dm755 program.cfg /etc\n\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;\u0026#34;\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"n\"\u003econcurrent\u003c/span\u003e\u003cspan class=\"o\"\u003e=\u003c/span\u003e\u003cspan class=\"bp\"\u003eTrue\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Example of a concurrent multiline script\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"getenv\"\u003e\u003ccode\u003egetEnv()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe getEnv function simply returns the value of the environment variable specified in its first argument.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003eterm\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"n\"\u003egetEnv\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;TERM\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Sets variable term to value of $TERM\u003c/span\u003e\n\u003cspan class=\"k\"\u003eprint\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;Nice \u0026#34;\u003c/span\u003e \u003cspan class=\"o\"\u003e+\u003c/span\u003e \u003cspan class=\"n\"\u003eterm\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Prints \u0026#34;Nice $TERM\u0026#34;\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"setenv\"\u003e\u003ccode\u003esetEnv()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe setEnv function sets an environment variable. It has three arguments.\nThe first is the key, it is the name of the environment variable.\nThe second is the new value, what the key should be set to.\nThe third is optional, it is \u003ccode\u003eonlyIfUnset\u003c/code\u003e and it can be set to \u003ccode\u003eTrue\u003c/code\u003e or \u003ccode\u003eFalse\u003c/code\u003e, default \u003ccode\u003eFalse\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eonlyIfUnset\u003c/code\u003e checks that the variable is not already set before setting it, this can be useful for\nsetting defaults.\u003c/p\u003e\n\u003cp\u003eExamples:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003esetEnv\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;MY_ENV_VAR\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;Hello, World\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Sets $MY_ENV_VAR to \u0026#34;Hello, World\u0026#34;\u003c/span\u003e\n\u003cspan class=\"n\"\u003esetEnv\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;CC\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;gcc\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"n\"\u003eonlyIfUnset\u003c/span\u003e\u003cspan class=\"o\"\u003e=\u003c/span\u003e\u003cspan class=\"bp\"\u003eTrue\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Sets $CC to \u0026#34;gcc\u0026#34;, but only if $CC is not already set\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"expandfile\"\u003e\u003ccode\u003eexpandFile()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe expandFile function replaces all instances of $VAR with the value specified.\u003c/p\u003e\n\u003cp\u003eexpandFile has two arguments. The first accepts a filename to modify.\nThe second accepts a dictionary to act as mappings for value replacements.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003eexpandFile\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;a.txt\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"p\"\u003e{\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;A\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e:\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;Hello\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;B\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e:\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;World\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e})\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Replace $A with Hello and $B with world in file a.txt\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"download\"\u003e\u003ccode\u003edownload()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe download function downloads a file at a URL.\u003c/p\u003e\n\u003cp\u003edownload has two arguments. The first is a URL, and the second is an optional\nargument called \u003ccode\u003efilename\u003c/code\u003e. If \u003ccode\u003efilename\u003c/code\u003e is not provided, the filename will\nbe taken from the URL.\u003c/p\u003e\n\u003cp\u003eExamples:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003edownload\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;https://www.arsenm.dev/logo-white.png\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Downloads logo-white.png\u003c/span\u003e\n\u003cspan class=\"n\"\u003edownload\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;https://www.arsenm.dev/logo-white.png\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"n\"\u003efilename\u003c/span\u003e\u003cspan class=\"o\"\u003e=\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;logo.png\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# Downloads logo-white.png as logo.png\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"lookpath\"\u003e\u003ccode\u003elookPath()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe lookPath function uses go\u0026rsquo;s \u003ccode\u003eexec.LookPath()\u003c/code\u003e to find the absolute path of a command.\nIt has a single argument which is the command to look for. If a command is not found, lookPath\nreturns \u003ccode\u003e-1\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eExamples:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003elookPath\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;sh\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# /bin/sh\u003c/span\u003e\n\u003cspan class=\"n\"\u003elookPath\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;nonExistentCommand\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# -1\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"userchoice\"\u003e\u003ccode\u003euserChoice()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe userChoice function presents the user with a choice. It has two arguments. The first\nis a prompt to be displayed to the user, and the second is a list of choices.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003euserChoice\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;Choose command\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"p\"\u003e[\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;find\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e,\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;ls\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e])\u003c/span\u003e\n\u003cspan class=\"c1\"\u003e# This returns:\u003c/span\u003e\n\n\u003cspan class=\"c1\"\u003e# [1] \u0026#34;find\u0026#34;\u003c/span\u003e\n\u003cspan class=\"c1\"\u003e# [2] \u0026#34;ls\u0026#34;\u003c/span\u003e\n\u003cspan class=\"c1\"\u003e# Choose command:\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThe function will return the chosen object (if input to above is \u003ccode\u003e1\u003c/code\u003e, function returns \u003ccode\u003e\u0026quot;find\u0026quot;\u003c/code\u003e)\u003c/p\u003e\n\u003chr\u003e\n\u003ch4 id=\"input\"\u003e\u003ccode\u003einput()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe input function is a simple function that uses go\u0026rsquo;s \u003ccode\u003efmt.Print()\u003c/code\u003e and \u003ccode\u003efmt.Scanln()\u003c/code\u003e to replicate\nthe functionality of python\u0026rsquo;s \u003ccode\u003einput()\u003c/code\u003e function. It has a single argument, which is the prompt and returns\nthe inputted text.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"n\"\u003ex\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"nb\"\u003einput\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;Name: \u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# This will print \u0026#34;Name: \u0026#34; and then wait for input.\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"fileexists\"\u003e\u003ccode\u003efileExists()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe fileExists function checks if a specified file exists and is accessible in the filesystem. It has a single\nargument which is the path to the file being checked, and returns a boolean reflecting the state of the file.\u003c/p\u003e\n\u003cp\u003eExamples:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"k\"\u003eif\u003c/span\u003e \u003cspan class=\"n\"\u003efileExists\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;/etc/passwd\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e):\u003c/span\u003e\n\t\u003cspan class=\"k\"\u003eprint\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;/etc/passwd exists!\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# /etc/passwd exists!\u003c/span\u003e\n\u003cspan class=\"k\"\u003eif\u003c/span\u003e \u003cspan class=\"n\"\u003efileExists\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;/abcdef\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e):\u003c/span\u003e\n\t\u003cspan class=\"k\"\u003eprint\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;/abcdef exists!\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e \u003cspan class=\"c1\"\u003e# No output because /abcdef most likely does not exist\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"getos\"\u003e\u003ccode\u003egetOS()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe getOS function returns the value of \u003ccode\u003eruntime.GOOS\u003c/code\u003e. It has no arguments.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"k\"\u003eif\u003c/span\u003e \u003cspan class=\"n\"\u003egetOS\u003c/span\u003e\u003cspan class=\"p\"\u003e()\u003c/span\u003e \u003cspan class=\"o\"\u003e==\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;linux\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e:\u003c/span\u003e\n\t\u003cspan class=\"k\"\u003eprint\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;This is Linux!\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"getarch\"\u003e\u003ccode\u003egetArch()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe getArch function returns the value of \u003ccode\u003eruntime.GOARCH\u003c/code\u003e. It has no arguments.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"k\"\u003eif\u003c/span\u003e \u003cspan class=\"n\"\u003egetArch\u003c/span\u003e\u003cspan class=\"p\"\u003e()\u003c/span\u003e \u003cspan class=\"o\"\u003e==\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;386\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e:\u003c/span\u003e\n\t\u003cspan class=\"k\"\u003eprint\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"s2\"\u003e\u0026#34;x86 32-bit\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n\u003ch4 id=\"getcpunum\"\u003e\u003ccode\u003egetCPUNum()\u003c/code\u003e\u003c/h4\u003e\n\u003cp\u003eThe getCPUNum function returns the amount of CPUs available to AdvMake. It has no arguments.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"k\"\u003eprint\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"n\"\u003egetCPUNum\u003c/span\u003e\u003cspan class=\"p\"\u003e()\u003c/span\u003e \u003cspan class=\"o\"\u003e+\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34; CPUs available!\u0026#34;\u003c/span\u003e\u003cspan class=\"p\"\u003e)\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003chr\u003e\n"},{id:2,href:"/docs/pak/configuration/",title:"Configuration",description:"Configuring pak",content:"\u003cp\u003e\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://ci.appveyor.com/project/moussaelianarsen/pak\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://ci.appveyor.com/api/projects/status/e4yacqd78gkte8a0?svg=true\"/\u003e\u003c/a\u003e\n\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://minio.arsenm.dev/minio/pak\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://img.shields.io/static/v1.svg?label=download\u0026message=binary\u0026color=blue\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003ch3 id=\"config-file\"\u003eConfig file\u003c/h3\u003e\n\u003cp\u003ePak uses a custom config file at \u003ccode\u003e/etc/pak.cfg\u003c/code\u003e. For example, this is what the\napt config looks like:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-cfg\" data-lang=\"cfg\"\u003e\u003cspan class=\"c1\"\u003e# Write the name of the package manager in all lowercase below\u003c/span\u003e\n\u003cspan class=\"na\"\u003eapt\u003c/span\u003e\n\u003cspan class=\"c1\"\u003e# Write a comma separated list of commands from the manager below\u003c/span\u003e\n\u003cspan class=\"na\"\u003einstall,remove,update,upgrade,search,download\u003c/span\u003e\n\u003cspan class=\"c1\"\u003e# Write \u0026#34;yes\u0026#34; or \u0026#34;no\u0026#34; depending on whether you want to use root\u003c/span\u003e\n\u003cspan class=\"na\"\u003eyes\u003c/span\u003e\n\u003cspan class=\"c1\"\u003e# Write command to use for root\u003c/span\u003e\n\u003cspan class=\"na\"\u003esudo\u003c/span\u003e\n\u003cspan class=\"c1\"\u003e# Write a comma separated list of shortcuts below\u003c/span\u003e\n\u003cspan class=\"na\"\u003erm,inst\u003c/span\u003e\n\u003cspan class=\"c1\"\u003e# Write a comma separated list of shortcut mappings from the manager below\u003c/span\u003e\n\u003cspan class=\"na\"\u003eremove,install\u003c/span\u003e\n\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThis file is read by pak to tell it what to do. The comments above each keyword\nexplain what it\u0026rsquo;s for.\u003c/p\u003e\n\u003cp\u003eHere is a list of all the fields and their uses:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eCommand to invoke the package manager.\u003c/li\u003e\n\u003cli\u003eComma-separated list of commands supported by the package manager.\u003c/li\u003e\n\u003cli\u003eWhether or not to invoke the root command.\u003c/li\u003e\n\u003cli\u003eCommand to use for root invocation (\u003ccode\u003esudo\u003c/code\u003e, \u003ccode\u003edoas\u003c/code\u003e, etc.)\u003c/li\u003e\n\u003cli\u003eComma-separated list of shortcuts for pak to accept\u003c/li\u003e\n\u003cli\u003eComma-separated list of shortcut mappings (what each shortcut sends to the\npackage manager). These do not necessarily need to be in the commands list.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eOnce you have made the config, just place it at \u003ccode\u003e/etc/pak.cfg\u003c/code\u003e and pak will\nautomatically use it.\u003c/p\u003e\n"},{id:3,href:"/docs/",title:"Docs",description:null,content:""},{id:4,href:"/docs/opensend/gui/",title:"GUI",description:"Opensend fyne GUI",content:"\u003cp\u003e\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://ci.appveyor.com/project/moussaelianarsen/opensend\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://ci.appveyor.com/api/projects/status/wrv3bbuujw57578h?svg=true\"/\u003e\u003c/a\u003e\n\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://minio.arsenm.dev/minio/opensend\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://img.shields.io/static/v1.svg?label=download\u0026message=binary\u0026color=blue\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003eThis page assumes you have already installed Opensend. If not, follow the installation\ninstructions on the installation page.\u003c/p\u003e\n\u003ca class=\"f6 link dim ph3 pv2 mb2 dib white bg-blue\" style=\"color: white;\" href=\"../installation\"\u003e\n Installation\n\u003c/a\u003e\n\n\u003ch3 id=\"gui-installation\"\u003eGUI Installation\u003c/h3\u003e\n\u003cp\u003eOpensend GUI has been written in golang using \u003ca href=\"https://fyne.io\"\u003efyne\u003c/a\u003e. Its source code can be found here:\u003c/p\u003e\n\u003ca class=\"btn\" style=\"color: white; background-color: green;\" href=\"https://gitea.arsenm.dev/opensend/opensend-gui\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"cib:gitea\"\u003e\u003c/span\u003e \n \u0026nbsp;Opensend GUI\n\u003c/a\u003e\n\n\u003cp\u003eTo download Opensend GUI, run the following command\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003egit clone https://gitea.arsenm.dev/opensend/opensend-gui.git\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eTo build Opensend GUI, \u003ccode\u003ego\u003c/code\u003e must be installed. The process for that is explained in the installation instructions for Opensend. Once \u003ccode\u003ego\u003c/code\u003e is installed, run:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003ego build\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThis may take a while as \u003ccode\u003ego\u003c/code\u003e downloads and compiles Opensend GUI and Fyne.\u003c/p\u003e\n\u003cp\u003eOnce the build is complete, there should be a file named \u003ccode\u003eopensend-gui\u003c/code\u003e in the directory. Run this file to open the GUI which should look like this:\u003c/p\u003e\n\u003cimg src=\"/opensend/gui_start.webp\" alt=\"Opensend GUI on start\"\u003e\n"},{id:5,href:"/docs/advmake/installation/",title:"Installation",description:"Installing AdvMake",content:"\u003cp\u003e\u003ca class=\"btn\" style=\"color: white; background-color: green;\" href=\"https://gitea.arsenm.dev/Arsen6331/advmake\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"cib:gitea\"\u003e\u003c/span\u003e \n \u0026nbsp;AdvMake\n\u003c/a\u003e\n\n\u003ca class=\"btn\" style=\"color: white; background-color: OrangeRed;\" href=\"https://www.gitlab.com/moussaelianarsen/advmake\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"fa-brands:gitlab\"\u003e\u003c/span\u003e\n \u0026nbsp;AdvMake\n\u003c/a\u003e\n\u003c/p\u003e\n\u003ch2 id=\"building-from-source\"\u003eBuilding from source\u003c/h2\u003e\n\u003ch3 id=\"downloading\"\u003eDownloading\u003c/h3\u003e\n\u003cp\u003eAdvMake is hosted on my Gitea instance. If that is down, it is also mirrored on Gitlab.\u003c/p\u003e\n\u003cp\u003eTo download AdvMake, you can either use the download button on Gitea or Gitlab, or\nyou can use the git CLI\u003c/p\u003e\n\u003cp\u003eTo clone AdvMake using the CLI, run one of the following commands:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003egit clone https://gitea.arsenm.dev/Arsen6331/advmake.git\nOR\ngit clone https://gitlab.com/moussaelianarsen/advmake.git\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"building\"\u003eBuilding\u003c/h3\u003e\n\u003cp\u003eAdvMake is written in Go. This means go must be installed on your computer. Most\nlinux distros call the package that provides it either \u003ccode\u003ego\u003c/code\u003e or \u003ccode\u003egolang\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eOnce go is installed, you can check that it runs by running\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003ego version\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eTo compile AdvMake, run\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003ego build\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"installing\"\u003eInstalling\u003c/h3\u003e\n\u003cp\u003eTo install AdvMake, run:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003esudo install -Dm755 advmake /usr/bin\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eOnce the command completes, AdvMake should be ready and you can run the following to make sure it works:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003eadvmake -h\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e"},{id:6,href:"/docs/opensend/installation/",title:"Installation",description:"Installing opensend",content:"\u003cp\u003e\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://ci.appveyor.com/project/moussaelianarsen/opensend\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://ci.appveyor.com/api/projects/status/wrv3bbuujw57578h?svg=true\"/\u003e\u003c/a\u003e\n\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://minio.arsenm.dev/minio/opensend\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://img.shields.io/static/v1.svg?label=download\u0026message=binary\u0026color=blue\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003ch2 id=\"using-precompiled-binary\"\u003eUsing precompiled binary\u003c/h2\u003e\n\u003cp\u003eOpensend uses continuous integration to compile. You can find the binary by clicking the download binary badge above.\u003c/p\u003e\n\u003ch2 id=\"building-from-source\"\u003eBuilding from source\u003c/h2\u003e\n\u003ch3 id=\"downloading\"\u003eDownloading\u003c/h3\u003e\n\u003cp\u003eOpensend is hosted on Gitea.\u003c/p\u003e\n\u003cp\u003e\u003ca class=\"btn\" style=\"color: white; background-color: green;\" href=\"https://gitea.arsenm.dev/opensend/opensend\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"cib:gitea\"\u003e\u003c/span\u003e \n \u0026nbsp;Opensend\n\u003c/a\u003e\n\n\u003ca class=\"btn\" style=\"color: white; background-color: OrangeRed;\" href=\"https://www.gitlab.com/moussaelianarsen/opensend\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"fa-brands:gitlab\"\u003e\u003c/span\u003e\n \u0026nbsp;Opensend\n\u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003eTo download opensend, you can either use the download button on one of the above, or\nyou can use the git command\u003c/p\u003e\n\u003cp\u003eTo clone opensend using the command, run the following command:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003egit clone https://gitea.arsenm.dev/opensend/opensend.git\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eNow, you will want to \u003ccode\u003ecd\u003c/code\u003e into the root of this repo before completing the rest\nof these instructions\u003c/p\u003e\n\u003ch3 id=\"building\"\u003eBuilding\u003c/h3\u003e\n\u003cp\u003eSince Opensend is written in go, you will need go installed in order to compile it.\nMost linux distros call the package providing it either \u003ccode\u003ego\u003c/code\u003e or \u003ccode\u003egolang\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eOnce go is installed, you can check that it runs by running\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003ego version\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eTo compile Opensend, run the following command:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003emake\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"installing\"\u003eInstalling\u003c/h3\u003e\n\u003cp\u003eTo install opensend, run one of the following commands:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003esudo make install \u003cspan class=\"c1\"\u003e# Linux\u003c/span\u003e\nsudo make install-macos \u003cspan class=\"c1\"\u003e# macOS\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eOnce this command completes, to test whether opensend was installed properly, run\nthis command:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003eopensend -h\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eYou should get the usage for opensend.\u003c/p\u003e\n"},{id:7,href:"/docs/pak/installation/",title:"Installation",description:"Installing pak",content:"\u003cp\u003e\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://ci.appveyor.com/project/moussaelianarsen/pak\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://ci.appveyor.com/api/projects/status/e4yacqd78gkte8a0?svg=true\"/\u003e\u003c/a\u003e\n\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://minio.arsenm.dev/minio/pak\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://img.shields.io/static/v1.svg?label=download\u0026message=binary\u0026color=blue\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003ch2 id=\"using-precompiled-binary\"\u003eUsing precompiled binary\u003c/h2\u003e\n\u003cp\u003ePak uses continuous integration to compile. You can find the binary by clicking the download badge above.\u003c/p\u003e\n\u003ch2 id=\"using-the-aur\"\u003eUsing the AUR\u003c/h2\u003e\n\u003cp\u003eIf you are running an arch-based linux distro, you can use the Arch User Repository\nto install pak. First, make sure the \u003ccode\u003eyay\u003c/code\u003e AUR helper is installed, then run the following:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003eyay -S pak\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"building-from-source\"\u003eBuilding from source\u003c/h2\u003e\n\u003ch3 id=\"downloading\"\u003eDownloading\u003c/h3\u003e\n\u003cp\u003ePak is hosted on my Gitea instance. If that is down, it is also mirrored on Gitlab.\u003c/p\u003e\n\u003cp\u003e\u003ca class=\"btn\" style=\"color: white; background-color: green;\" href=\"https://gitea.arsenm.dev/Arsen6331/pak\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"cib:gitea\"\u003e\u003c/span\u003e \n \u0026nbsp;Pak\n\u003c/a\u003e\n\n\u003ca class=\"btn\" style=\"color: white; background-color: OrangeRed;\" href=\"https://www.gitlab.com/moussaelianarsen/pak\"\u003e\n \u003cspan class=\"iconify\" data-icon=\"fa-brands:gitlab\"\u003e\u003c/span\u003e\n \u0026nbsp;Pak\n\u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003eTo download pak, you can either use the download button on Gitea or Gitlab, or\nyou can use the git CLI\u003c/p\u003e\n\u003cp\u003eTo clone pak using the CLI, run one of the following commands:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003egit clone https://gitea.arsenm.dev/Arsen6331/pak\nOR\ngit clone https://gitlab.com/moussaelianarsen/pak\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"building\"\u003eBuilding\u003c/h3\u003e\n\u003cp\u003ePak is written in Go. This means go must be installed on your computer. Most\nlinux distros call the package that provides it either \u003ccode\u003ego\u003c/code\u003e or \u003ccode\u003egolang\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eOnce go is installed, you can check that it runs by running\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003ego version\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eTo compile pak, run\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003emake\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThen, you will need to figure out which package manager you have. Here is a list\nof package managers with ready to use configs:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eapt\u003c/li\u003e\n\u003cli\u003eaptitude\u003c/li\u003e\n\u003cli\u003ebrew\u003c/li\u003e\n\u003cli\u003eyay (with wrapper)\u003c/li\u003e\n\u003cli\u003epacman (with wrapper)\u003c/li\u003e\n\u003cli\u003ezypper\u003c/li\u003e\n\u003cli\u003esnap\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eIf your package manager is not in the list, you can make a config for it. Go to\nthe Configuration page for more information.\u003c/p\u003e\n\u003ch3 id=\"installing\"\u003eInstalling\u003c/h3\u003e\n\u003cp\u003eIf your package manager is in the list, use one of these:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eapt: \u003ccode\u003esudo make aptinstall\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eaptitude: \u003ccode\u003esudo make aptitude\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003ebrew: \u003ccode\u003esudo make brewinstall\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eyay: \u003ccode\u003esudo make yayinstall\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003epacman: \u003ccode\u003esudo make pacinstall\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003ezypper: \u003ccode\u003esudo make zyppinstall\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003esnap: \u003ccode\u003esudo make snapinstall\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003ecustom: \u003ccode\u003esudo make installbinonly\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eOnce the command completes, unless you\u0026rsquo;re using a custom config, pak should be ready\nand you can run the following to make sure it works:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003epak\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eGo to the Configuration page for instructions on making a custom config, you \u003cstrong\u003emust\u003c/strong\u003e\nhave a config for pak to function.\u003c/p\u003e\n"},{id:8,href:"/docs/opensend/",title:"OpenSend Docs",description:"Documentation for the OpenSend file sharing program",content:""},{id:9,href:"/docs/pak/",title:"Pak Docs",description:"Documentation for the Pak package manager wrapper",content:""},{id:10,href:"/docs/opensend/usage/",title:"Usage",description:"Using opensend",content:"\u003cp\u003e\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://ci.appveyor.com/project/moussaelianarsen/opensend\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://ci.appveyor.com/api/projects/status/wrv3bbuujw57578h?svg=true\"/\u003e\u003c/a\u003e\n\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://minio.arsenm.dev/minio/opensend\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://img.shields.io/static/v1.svg?label=download\u0026message=binary\u0026color=blue\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003eThis page assumes you have already installed Opensend. If not, follow the installation\ninstructions on the installation page.\u003c/p\u003e\n\u003ca class=\"f6 link dim ph3 pv2 mb2 dib white bg-blue\" style=\"color: white;\" href=\"../installation\"\u003e\n Installation\n\u003c/a\u003e\n\n\u003ch3 id=\"configuration\"\u003eConfiguration\u003c/h3\u003e\n\u003cp\u003eOpensend allows configuration by TOML and by command line flags. It looks at the following paths for configs in the specified order:\u003c/p\u003e\n\u003ch4 id=\"config-files\"\u003eConfig files\u003c/h4\u003e\n\u003col\u003e\n\u003cli\u003eConfig path from \u003ccode\u003e--config\u003c/code\u003e flag\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e~/.config/opensend.toml\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e/etc/opensend.toml\u003c/code\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch4 id=\"command-line-flags\"\u003eCommand line flags\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-text\" data-lang=\"text\"\u003eUsage of opensend:\n -d string\n Data to send\n -dest-dir string\n Destination directory for files or dirs sent over opensend (default \u0026#34;/home/arsen/Downloads\u0026#34;)\n -r Receive data\n -s Send data\n -send-to string\n Use IP address of receiver instead of mDNS\n -skip-mdns\n Skip zeroconf service registration (use if mdns fails)\n -t string\n Type of data being sent\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThe purpose of the mdns-skipping flags is to account for the iSH app in iOS, as the mdns resolver and registration fails on it.\u003c/p\u003e\n\u003ch3 id=\"algorithms-and-software-used\"\u003eAlgorithms and software used\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eRSA for asymmetric encryption\u003c/li\u003e\n\u003cli\u003eAES for symmetric encryption\u003c/li\u003e\n\u003cli\u003eTar for archiving directories\u003c/li\u003e\n\u003cli\u003eZstandard for compression\u003c/li\u003e\n\u003cli\u003eBase91 for encoding\u003c/li\u003e\n\u003cli\u003eGob for serialization\u003c/li\u003e\n\u003cli\u003eJSON for serialization\u003c/li\u003e\n\u003cli\u003eTCP sockets for transfer\u003c/li\u003e\n\u003cli\u003eZeroconf/mDNS for device discovery\u003c/li\u003e\n\u003c/ul\u003e\n"},{id:11,href:"/docs/pak/usage/",title:"Usage",description:"Using pak",content:"\u003cp\u003e\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://ci.appveyor.com/project/moussaelianarsen/pak\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://ci.appveyor.com/api/projects/status/e4yacqd78gkte8a0?svg=true\"/\u003e\u003c/a\u003e\n\u003ca style=\"margin-left: 1px; margin-right: 1px; display: inline-block\" href=\"https://minio.arsenm.dev/minio/pak\"\u003e\u003cimg style=\"height: 18px; width: 100px;\" src=\"https://img.shields.io/static/v1.svg?label=download\u0026message=binary\u0026color=blue\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003eUsing pak is simple, just run \u003ccode\u003epak\u003c/code\u003e and one of the commands from the config file.\nPak understands partial commands, so these commands will be identical:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003epak in \u0026lt;package\u0026gt;\nOR\npak inst \u0026lt;package\u0026gt;\nOR\npak install \u0026lt;package\u0026gt;\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThe lack of \u003ccode\u003esudo\u003c/code\u003e is intentional. Pak will not allow running from root by default\nas it already invokes root internally. To bypass this, simply give pak the \u003ccode\u003e-r\u003c/code\u003e flag.\u003c/p\u003e\n\u003cp\u003eUsing shortcuts in pak is just as simple as commands, just run \u003ccode\u003epak\u003c/code\u003e and a shortcut,\nlike this:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003epak rm \u0026lt;package\u0026gt;\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e"},];index.add(docs);userinput.addEventListener('input',show_results,true);suggestions.addEventListener('click',accept_suggestion,true);function show_results(){var value=this.value;var results=index.search(value,5);var entry,childs=suggestions.childNodes;var i=0,len=results.length;suggestions.classList.remove('d-none');results.forEach(function(page){entry=document.createElement('div');entry.innerHTML='<a href><span></span><span></span></a>';a=entry.querySelector('a'),t=entry.querySelector('span:first-child'),d=entry.querySelector('span:nth-child(2)');a.href=page.href;t.textContent=page.title;d.textContent=page.description;console.log(page.description);suggestions.appendChild(entry);});while(childs.length>len){suggestions.removeChild(childs[i])}}
function accept_suggestion(){while(suggestions.lastChild){suggestions.removeChild(suggestions.lastChild);}
return false;}}());