Giter Site home page Giter Site logo

gentee / eonza Goto Github PK

View Code? Open in Web Editor NEW
158.0 158.0 10.0 17.64 MB

Eonza is an automation tool. It allows you to create scripts without programming.

Home Page: https://www.eonza.org

License: MIT License

Go 100.00%
automation scheduler scripts task-manager

eonza's Introduction

Gentee script programming language

Build Status Go Report Card GoDoc

Gentee is a free open source script programming language. The Gentee programming language is designed to create scripts to automate repetitive actions and processes on your computer. If you use or plan to use .bat files, bash, PowerShell or special programs to automate actions, then try doing the same thing with Gentee.

Want to see a sample application that successfully uses the Gentee programming language? Take a look at Eonza, a free cross-platform program for easy creation and management of scripts.

Documentation

All documentation is available on GitHub.

Download

You can download other binary distributions for Linux, macOS, Windows here.

Go integration

You can use the Gentee compiler and virtual machine in golang projects without any restrictions.
Documentation is available here.

How to run Gentee scripts

$ go get -u github.com/gentee/gentee
$ cd gentee/gentee/cli
$ go build
  • Specify the script file when running gentee. The script file can have any extension.
Linux: ./gentee myscript.g 
Wndows: gentee.exe myscript.g
  • Also, you can associate the gentee program with script files in your operating system.

Gentee compiler/interpreter

gentee [-ver] [-t] <scriptname> [command-line parameters for script]

By default, the program prints the output of the script to the console and returns 0 if successful.

Command line parameters

  • scriptname - full or relative path to the script file. You can specify the command line parameters for the script after the script file name.
  • -ver - show the current version of Gentee language.
  • -t - test the script. When using this parameter, the script must have the result parameter in the header with the expected value (example). In this mode, the program does not output the result of the script execution to the console. If the result does not match, an error message is displayed and an error code 4 is returned.

Error code

Code Description
1 The script file was not found.
2 Compilation error.
3 Runtime Error.
4 The result is erroneous at start with the -t parameter.

Support

If you have any questions and suggestions or would like to help in the development, add your issue here.

License

MIT

Copyright (c) 2018-present, Alexey Krivonogov

eonza's People

Contributors

gentee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

eonza's Issues

Problem using POST requests in simplest form

First off congratulations on your amazing work, I've been looking for an alternative to EventGhost and this looks like it could fit the bill perfectly...if only I could get it to work!

Running the executable from a Windows 11 system, I've created a simple script to launch notepad (which has been tested and works by using the run button. An event named "notepad" has then been created to run this script using a POST request: http://localhost:3234/api/event. I've tried both with and without a content-type: text/html; and added

name: "notepad"

but this returns...

{
  "success": false,
  "error": "code=415, message=Unsupported Media Type"
}

Whitelist, password and token have all not been set, as this appears to be optional but of course recommended. I've also tried appending:

data: ""

to the parameters but still get the same response.

Finally, and perhaps I should open another issue but if I use the same URL but with 127.0.0.1 instead of locahost I get:

{
  "message": "Access denied"
}  

I've also tried setting the eonza.yaml http config section to the hostname of the local pc and also the local ip address but the executable will then not launch and just states:

[FTAL] 2022/09/21 21:08:57 open : The system cannot find the file specified.

"debug" logging was also set in the config file but no [DEBUG] events get logged and nothing to help with what file cannot be found. Are the "cert" and "priv" certificate fields mandatory i.e. cannot be blank if anything other than localhost is used perhaps?

Every new window opened increases port number by a value of 1

I'm not sure if this is a bug or configuration problem but loaded up on a VPS but when I click on things that want to open a new window (i.e. Welcome button, Tools button, a task status, etc), that new window has a port value increased by an increment of 1 each time.

Run scripts at reboot

Would it be possible to add an option to the scheduler to run scripts at boot ?

Thanks for the amazing project !

Acces Denied Error On local

2 things tried.
1-)

  • install eonza like document explain

  • set host as localhost

  • whitelist your local ip

    I got access denied error on trying 127.0.0.1: or 0.0.0.0:. Couldnt solve it so 2. way tried.

2-)

  • Do everything on 1.

  • Install nginx and do simple reverse proxy

      server {
       
      listen       80;
    
      listen       [::]:80;
    
      server_name  _;
    
      root         /usr/share/nginx/html;
    
      include /etc/nginx/default.d/*.conf;
    
      error_page 404 /404.html;
      location = /404.html {
      }
    
      error_page 500 502 503 504 /50x.html;
      location = /50x.html {
      }
      location / {
      proxy_pass http://localhost:3235;
      proxy_set_header X-Forwarded-Host $host;
      proxy_set_header Host "localhost";
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Real-IP localhost;
      }
      }
    
    • I can get response from localhost: 127.0.01: and 0.0.0.0:. So far so good.

    My remote machine is on aws btw. I set loadbalancer and target group. Set port as 80. Set route53.
    And baam from outside to eonza gave access denied error again.
    How can i solve it?

    Eonza.yaml:

    mode: default
    assetsdir: ""
    packagesdir: ""
    log:
    dir: ""
    mode: file
    level: info
    users:
      dir: ""
    http:
      host: localhost
      port: 3235
      open: false
      theme: default
      #    cert: "/home/x/eonza/ssl/eonza.crt"
      #    priv: "/home/x/eonza/ssl/eonza.key"
      playground:
      dir: ""
      summary: 20000000
      files: 250
      size: 3000000
      tasks: 3
    whitelist:
      - ::1/128
      - 127.0.0.0/31
      - 10.0.0.0/24
      - localhost
      - 127.0.0.1`
    

In need help in how to use this application

I understand what the application does, but I am unable to use it in real time. I have few questions.

  1. will i be able to run docker container using this.
  2. I want to install wordpress, mysql, php and phpmuadmin in the docker container name which i give.

Sorry if i have asked in the wrong area,if you have any discord channel or forum let me know I will ask my question there.

vijey

'Access Denied' at first access

Hi,

Eonza keeps return me 'Access Denied' after first installation.

OS: Linux server 4.15.0-137-generic #141-Ubuntu SMP
Eonza web page hosted by: Apache 2.4.29 reverse proxy

Eonza config:

mode: default
assetsdir: ""
packagesdir: ""
log:
    dir: ""
    mode: file
    level: info
users:
    dir: ""
http:
    host: localhost
    port: 9500
    localport: 0
    open: false
    theme: default
    jwtkey: b3j5yqphe5zh
    cert: ""
    priv: ""
playground:
    dir: ""
    summary: 0
    files: 0
    size: 0
    tasks: 0
whitelist:
    - 127.0.0.1/31
    - 192.168.0.0/23
    - <a public ip>

Apache VirtualServer config:

<IfModule mod_ssl.c>
	<VirtualHost 192.168.0.10:443>
		ServerAdmin [email protected]
		ServerName tools.majordevelop.it

		DocumentRoot /var/www/html/tools/
	

		ProxyPass /scripts http://127.0.0.1:9500/
		ProxyPassReverse /scripts http://127.0.0.1:9500/
		ProxyPass /.well-known/ !
		
		ProxyPreserveHost On
		
		
		RequestHeader set X-Forwarded-Proto https
		RequestHeader set X-Forwarded-Ssl on
		RequestHeader set X-Url-Scheme https
		
		
		Protocols h2 http/1.1

		
		BrowserMatch "MSIE [2-6]" \
			nokeepalive ssl-unclean-shutdown \
			downgrade-1.0 force-response-1.0
			
		
		SSLEngine On
                
		Include /etc/letsencrypt/options-ssl-apache.conf
		SSLCertificateFile /etc/letsencrypt/live/tools.majordevelop.it/fullchain.pem
		SSLCertificateKeyFile /etc/letsencrypt/live/tools.majordevelop.it/privkey.pem
		
		SSLCipherSuite HIGH:RC4-SHA:AES128-SHA:!aNULL:!MD5
		SSLHonorCipherOrder on

		SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
		
		
		<FilesMatch ".(cgi|shtml|phtml|php)$">
				SSLOptions +StdEnvVars
		</FilesMatch>

		<Directory /usr/lib/cgi-bin>
				SSLOptions +StdEnvVars
		</Directory>	
	</VirtualHost>
</IfModule>

<VirtualHost 192.168.0.10:80>
	ServerName tools.majordevelop.it

	RewriteEngine On
	RewriteCond %{HTTPS} off
	RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

	ErrorLog /var/log/apache2/redirect.error.log
	LogLevel warn
</VirtualHost>

After installation (./eonza -install -psw=mypassword) and starting systemd service, the socket 127.0.0.1:9500 stay in listening but every times I try to reach tools.majordevelop.it/scripts the page return me 403 with Json 'message: Access denied'.

I installed Eonza in /opt/eonza, created user eonza and give permission rwx to /opt/eonza.

Permission:

total 23M
drwxr-xr-x  4 eonza eonza 4,0K lug 13 14:10 .
drwxr-xr-x 12 root  root  4,0K lug 13 10:01 ..
-rwxrwxr-x  1 eonza eonza  23M lug 13 10:00 eonza
-rwxr-xr-x  1 eonza eonza  440 lug 13 12:43 eonza.eon
-rwxr-xr-x  1 eonza eonza 6,2K lug 13 11:58 eonza.eox
-rwxr-xr-x  1 eonza eonza  404 lug 13 14:10 eonza.yaml
drwxr-xr-x  2 eonza eonza 4,0K lug 13 11:58 log
drwxr-xr-x  2 eonza eonza 4,0K lug 13 11:58 users

Feature request: Implement auto executing actions on specific system dbus events

Will be good to add ability to automate launching scripts not only by schedule, but by system events too (dbus on Linux and events on Windows), is it possible? For example, if the user inserts a specific flash drive, or usb mouse, or bluetooth device is connected/disconnected, WiFi network with specific name is connected, etc.

If something like this already exists, please describe how to use it.

And if such tool is already exists as separate project, please point to it. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.