humanscript


Namehumanscript JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/yourusername/humanscript
SummaryA human-readable programming language for web and mobile app generation.
upload_time2024-10-10 23:12:04
maintainerNone
docs_urlNone
authorYour Name
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            WhiteLion HumanScript programing Language

HumanScript is a simplified, human-readable programming language designed for generating web and mobile applications. It allows developers and non-developers alike to create projects using straightforward commands, which are then converted into code files for modern frameworks like React and React Native.

Table of Contents
Features
Installation
Usage
Supported Commands
Example Commands
Using the Command Line
Directory Structure
Running Tests
Contributing
License
Features
Human-readable commands to generate web and mobile projects.
Automatic creation of React and React Native project files, including component templates and styles.
Supports both unit tests and integration tests.
Easily customizable project templates.
Installation
To install and set up HumanScript, follow these steps:

Clone the repository:

bash
Copy code
git clone https://github.com/yourusername/humanscript.git
cd humanscript
Install dependencies:

Make sure you have Python installed (version 3.6 or higher).
Install the required Python packages:
bash
Copy code
pip install -r requirements.txt
If you encounter issues with pip permissions, try:
bash
Copy code
python.exe -m pip install --upgrade pip --user
pip install -r requirements.txt --user
Install TensorFlow Manually (If Needed):

If you encounter issues installing TensorFlow, try:
bash
Copy code
pip install tensorflow
Install Node.js (for running React/React Native projects):

Download and install Node.js if it is not already installed.
Once Node.js is installed, proceed with the next steps.
Generate the output directories (if not already present):

Create the directories for the web and mobile projects:
bash
Copy code
mkdir -p output/WebApp
mkdir -p output/MobileApp
Install JavaScript dependencies:

For web projects:
bash
Copy code
cd output/WebApp
npm install react react-dom react-scripts --save
For mobile projects:
bash
Copy code
cd ../MobileApp
npm install react-native --save
Handling NPM Vulnerabilities (Optional):

Fix vulnerabilities automatically:
bash
Copy code
npm audit fix
For a more aggressive approach, use:
bash
Copy code
npm audit fix --force
Usage
Supported Commands
HumanScript currently supports the following commands:

generate mobile: Generates a React Native mobile app with basic components and styles.
generate web: Generates a React web app with basic components and styles.
execute <filename>: Executes a list of commands from a specified file.
Example Commands
Here are some example commands that can be used with HumanScript:

Generate a Mobile App

plaintext
Copy code
generate mobile
Generate a Web App

plaintext
Copy code
generate web
Execute Commands from a File Create a file named commands.txt with the following content:

plaintext
Copy code
generate mobile
generate web
Then run:

bash
Copy code
python parser.py execute commands.txt
Using the Command Line
You can run HumanScript commands from the command line using the provided parser.py script. Here are some examples:

Generate a Mobile App

bash
Copy code
python parser.py "generate mobile"
Generate a Web App

bash
Copy code
python parser.py "generate web"
Execute Commands from a File

bash
Copy code
python parser.py execute commands.txt
Configuring the Generated Templates
You can customize the generated templates by providing additional data. For example:

python
Copy code

# Example data for customizing templates

data = {
"header": "Welcome to My App",
"title": "My Application"
}
This data will be used to populate placeholders in the generated code files.

Directory Structure
The HumanScript project is organized as follows:

bash
Copy code
project_root/
├── mobile_templates.py # Code for generating mobile app templates
├── web_templates.py # Code for generating web app templates
├── parser.py # Command parsing and execution logic
├── requirements.txt # Python dependencies for the project
├── tests/ # Directory for unit and integration tests
│ ├── **init**.py # Initializes the 'tests' package
│ ├── test_interpreter.py # Unit tests for the interpreter logic
│ └── test_integration.py # Integration tests for end-to-end functionality
└── README.md # Documentation for the HumanScript project
Running Tests
To ensure that everything is working correctly, you can run the provided unit tests and integration tests:

Run the unit tests:

bash
Copy code
python -m unittest tests/test_interpreter.py
Run the integration tests:

bash
Copy code
python -m unittest tests/test_integration.py
Run all tests:

bash
Copy code
python -m unittest discover -s tests
Contributing
We welcome contributions to HumanScript! If you'd like to contribute, please follow these steps:

Fork the repository and clone it locally.
Create a new branch for your feature or bugfix.
Commit your changes with descriptive commit messages.
Push to your fork and create a pull request.
Wait for review and address any feedback.
License
This project is licensed under the MIT License. See the LICENSE file for details.

Changes Made:
Added troubleshooting steps for upgrading pip and installing TensorFlow.
Provided instructions for creating output directories before installing npm packages.
Addressed handling of npm vulnerabilities and outdated packages.
#\x00 \x00w\x00h\x00i\x00t\x00e\x00L\x00i\x00o\x00n\x00_\x00h\x00u\x00m\x00a\x00n\x00s\x00c\x00r\x00i\x00p\x00t\x00
\x00
\x00

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yourusername/humanscript",
    "name": "humanscript",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "your.email@example.com",
    "download_url": "https://files.pythonhosted.org/packages/92/0d/4fc49b4a8e90722f79e943916aa555271ea961f63cca7133868b8b557bb6/humanscript-0.1.0.tar.gz",
    "platform": null,
    "description": "WhiteLion HumanScript programing Language\r\n\r\nHumanScript is a simplified, human-readable programming language designed for generating web and mobile applications. It allows developers and non-developers alike to create projects using straightforward commands, which are then converted into code files for modern frameworks like React and React Native.\r\n\r\nTable of Contents\r\nFeatures\r\nInstallation\r\nUsage\r\nSupported Commands\r\nExample Commands\r\nUsing the Command Line\r\nDirectory Structure\r\nRunning Tests\r\nContributing\r\nLicense\r\nFeatures\r\nHuman-readable commands to generate web and mobile projects.\r\nAutomatic creation of React and React Native project files, including component templates and styles.\r\nSupports both unit tests and integration tests.\r\nEasily customizable project templates.\r\nInstallation\r\nTo install and set up HumanScript, follow these steps:\r\n\r\nClone the repository:\r\n\r\nbash\r\nCopy code\r\ngit clone https://github.com/yourusername/humanscript.git\r\ncd humanscript\r\nInstall dependencies:\r\n\r\nMake sure you have Python installed (version 3.6 or higher).\r\nInstall the required Python packages:\r\nbash\r\nCopy code\r\npip install -r requirements.txt\r\nIf you encounter issues with pip permissions, try:\r\nbash\r\nCopy code\r\npython.exe -m pip install --upgrade pip --user\r\npip install -r requirements.txt --user\r\nInstall TensorFlow Manually (If Needed):\r\n\r\nIf you encounter issues installing TensorFlow, try:\r\nbash\r\nCopy code\r\npip install tensorflow\r\nInstall Node.js (for running React/React Native projects):\r\n\r\nDownload and install Node.js if it is not already installed.\r\nOnce Node.js is installed, proceed with the next steps.\r\nGenerate the output directories (if not already present):\r\n\r\nCreate the directories for the web and mobile projects:\r\nbash\r\nCopy code\r\nmkdir -p output/WebApp\r\nmkdir -p output/MobileApp\r\nInstall JavaScript dependencies:\r\n\r\nFor web projects:\r\nbash\r\nCopy code\r\ncd output/WebApp\r\nnpm install react react-dom react-scripts --save\r\nFor mobile projects:\r\nbash\r\nCopy code\r\ncd ../MobileApp\r\nnpm install react-native --save\r\nHandling NPM Vulnerabilities (Optional):\r\n\r\nFix vulnerabilities automatically:\r\nbash\r\nCopy code\r\nnpm audit fix\r\nFor a more aggressive approach, use:\r\nbash\r\nCopy code\r\nnpm audit fix --force\r\nUsage\r\nSupported Commands\r\nHumanScript currently supports the following commands:\r\n\r\ngenerate mobile: Generates a React Native mobile app with basic components and styles.\r\ngenerate web: Generates a React web app with basic components and styles.\r\nexecute <filename>: Executes a list of commands from a specified file.\r\nExample Commands\r\nHere are some example commands that can be used with HumanScript:\r\n\r\nGenerate a Mobile App\r\n\r\nplaintext\r\nCopy code\r\ngenerate mobile\r\nGenerate a Web App\r\n\r\nplaintext\r\nCopy code\r\ngenerate web\r\nExecute Commands from a File Create a file named commands.txt with the following content:\r\n\r\nplaintext\r\nCopy code\r\ngenerate mobile\r\ngenerate web\r\nThen run:\r\n\r\nbash\r\nCopy code\r\npython parser.py execute commands.txt\r\nUsing the Command Line\r\nYou can run HumanScript commands from the command line using the provided parser.py script. Here are some examples:\r\n\r\nGenerate a Mobile App\r\n\r\nbash\r\nCopy code\r\npython parser.py \"generate mobile\"\r\nGenerate a Web App\r\n\r\nbash\r\nCopy code\r\npython parser.py \"generate web\"\r\nExecute Commands from a File\r\n\r\nbash\r\nCopy code\r\npython parser.py execute commands.txt\r\nConfiguring the Generated Templates\r\nYou can customize the generated templates by providing additional data. For example:\r\n\r\npython\r\nCopy code\r\n\r\n# Example data for customizing templates\r\n\r\ndata = {\r\n\"header\": \"Welcome to My App\",\r\n\"title\": \"My Application\"\r\n}\r\nThis data will be used to populate placeholders in the generated code files.\r\n\r\nDirectory Structure\r\nThe HumanScript project is organized as follows:\r\n\r\nbash\r\nCopy code\r\nproject_root/\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac mobile_templates.py # Code for generating mobile app templates\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac web_templates.py # Code for generating web app templates\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac parser.py # Command parsing and execution logic\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac requirements.txt # Python dependencies for the project\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac tests/ # Directory for unit and integration tests\r\n\u00e2\u201d\u201a \u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac **init**.py # Initializes the 'tests' package\r\n\u00e2\u201d\u201a \u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac test_interpreter.py # Unit tests for the interpreter logic\r\n\u00e2\u201d\u201a \u00e2\u201d\u201d\u00e2\u201d\u20ac\u00e2\u201d\u20ac test_integration.py # Integration tests for end-to-end functionality\r\n\u00e2\u201d\u201d\u00e2\u201d\u20ac\u00e2\u201d\u20ac README.md # Documentation for the HumanScript project\r\nRunning Tests\r\nTo ensure that everything is working correctly, you can run the provided unit tests and integration tests:\r\n\r\nRun the unit tests:\r\n\r\nbash\r\nCopy code\r\npython -m unittest tests/test_interpreter.py\r\nRun the integration tests:\r\n\r\nbash\r\nCopy code\r\npython -m unittest tests/test_integration.py\r\nRun all tests:\r\n\r\nbash\r\nCopy code\r\npython -m unittest discover -s tests\r\nContributing\r\nWe welcome contributions to HumanScript! If you'd like to contribute, please follow these steps:\r\n\r\nFork the repository and clone it locally.\r\nCreate a new branch for your feature or bugfix.\r\nCommit your changes with descriptive commit messages.\r\nPush to your fork and create a pull request.\r\nWait for review and address any feedback.\r\nLicense\r\nThis project is licensed under the MIT License. See the LICENSE file for details.\r\n\r\nChanges Made:\r\nAdded troubleshooting steps for upgrading pip and installing TensorFlow.\r\nProvided instructions for creating output directories before installing npm packages.\r\nAddressed handling of npm vulnerabilities and outdated packages.\r\n#\\x00 \\x00w\\x00h\\x00i\\x00t\\x00e\\x00L\\x00i\\x00o\\x00n\\x00_\\x00h\\x00u\\x00m\\x00a\\x00n\\x00s\\x00c\\x00r\\x00i\\x00p\\x00t\\x00\r\n\\x00\r\n\\x00\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A human-readable programming language for web and mobile app generation.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/yourusername/humanscript"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3022485498df084a386bacf112a97db9a73d0dfa57ede4acca9e9927e4ea9147",
                "md5": "53eeeab84300dc19d60e17c86f5c0307",
                "sha256": "4e1afa9d431b76b311ed3b94a72806e1e84aba9ef7b21131451307c58a6a461a"
            },
            "downloads": -1,
            "filename": "humanscript-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "53eeeab84300dc19d60e17c86f5c0307",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5591,
            "upload_time": "2024-10-10T23:12:02",
            "upload_time_iso_8601": "2024-10-10T23:12:02.698780Z",
            "url": "https://files.pythonhosted.org/packages/30/22/485498df084a386bacf112a97db9a73d0dfa57ede4acca9e9927e4ea9147/humanscript-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "920d4fc49b4a8e90722f79e943916aa555271ea961f63cca7133868b8b557bb6",
                "md5": "c9ed5db9323a02cb672e1197239376cc",
                "sha256": "5322d3b993fb370492195c0f120675e76371ad14632f08ba01ce101a3f28116d"
            },
            "downloads": -1,
            "filename": "humanscript-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c9ed5db9323a02cb672e1197239376cc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4976,
            "upload_time": "2024-10-10T23:12:04",
            "upload_time_iso_8601": "2024-10-10T23:12:04.250529Z",
            "url": "https://files.pythonhosted.org/packages/92/0d/4fc49b4a8e90722f79e943916aa555271ea961f63cca7133868b8b557bb6/humanscript-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-10 23:12:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "humanscript",
    "github_not_found": true,
    "lcname": "humanscript"
}
        
Elapsed time: 0.36388s