From 570c1c10ad42e69adf812d8cedb54c7ccf1d0dff Mon Sep 17 00:00:00 2001 From: MeexReay Date: Wed, 19 Mar 2025 02:10:21 +0300 Subject: [PATCH] woman and hello programs --- README.md | 2 ++ app/hello/hello.js | 2 ++ app/hello/package.json | 2 +- app/woman/package.json | 8 +++++ app/woman/woman.js | 80 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 app/woman/package.json create mode 100644 app/woman/woman.js diff --git a/README.md b/README.md index 4dbc4ac..7e3adc7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # poshlostios poshlositi os repository + +[poshlostios site](https://poshlostios.meex.lol) \ No newline at end of file diff --git a/app/hello/hello.js b/app/hello/hello.js index 295624c..6abe4c4 100644 --- a/app/hello/hello.js +++ b/app/hello/hello.js @@ -6,6 +6,8 @@ const message = `Приветствуем в PoshlostiOS!!!! +Github - https://github.com/MeexReay/poshlostios + Стандартные komandi: * cd - перемещение по папкам * hello - эт кодмана diff --git a/app/hello/package.json b/app/hello/package.json index 40fa5af..ac7d175 100644 --- a/app/hello/package.json +++ b/app/hello/package.json @@ -1,6 +1,6 @@ { "name": "hello", - "version": "0.1.2", + "version": "0.1.3", "description": "Hello Message", "author": "MeexReay", "apps": [ "hello.js" ], diff --git a/app/woman/package.json b/app/woman/package.json new file mode 100644 index 0000000..3ab9246 --- /dev/null +++ b/app/woman/package.json @@ -0,0 +1,8 @@ +{ + "name": "woman", + "version": "0.1.0", + "description": "Wisdom Order Manuals", + "author": "MeexReay", + "apps": [ "vget.js" ], + "configs": [] +} \ No newline at end of file diff --git a/app/woman/woman.js b/app/woman/woman.js new file mode 100644 index 0000000..6a16418 --- /dev/null +++ b/app/woman/woman.js @@ -0,0 +1,80 @@ + +async function main(args) { + if (args.length != 1) { + writeStdout(`Использование: woman <статья> + +Статьи: +* apps - Создание приложений +* files - Работа файлов в приложениях +* stdin - Чтение ввода пользователя +* stdout - Вывод текста в консоль +* cursor - Работа с курсором +* packaging - Пакетирование приложений +`) + return 1 + } + + if (args[0] == "apps") { + writeStdout(`# Создание приложений + +Все приложения в PoshlostiOS это JS скрипты +Каждый такой скрипт должен иметь свой entry-point - асинхронная функция + с названием main и единственным аргументом args в + котором хранится список из передаваемых пользователем аргументов + и возвращающая число статус кода + +Пример такого скрипта: + + async function main(args) { + return 0 + } + +Читайте также: +* files - Работа файлов в приложениях +* stdin - Чтение ввода пользователя +* stdout - Вывод текста в консоль +* cursor - Работа с курсором +* packaging - Пакетирование приложений + +`) + + return 0 + } else if (args[0] == "files") { + writeStdout(`# Работа файлов в приложениях + +Статья в разработке + +`) + return 0 + } else if (args[0] == "stdin") { + writeStdout(`# Чтение ввода пользователя + +Статья в разработке + +`) + return 0 + } else if (args[0] == "stdout") { + writeStdout(`# Вывод текста в консоль + +Статья в разработке + +`) + return 0 + } else if (args[0] == "cursor") { + writeStdout(`# Работа с курсором + +Статья в разработке + +`) + return 0 + }if (args[0] == "packaging") { + writeStdout(`# Пакетирование приложений + +Статья в разработке + +`) + return 0 + } + + return 1 +} \ No newline at end of file