bbatch

0.0.3 • Public • Published

bbatch

a better version of batch (compiler)

Usage

$ bbatch --help
BBatch Help:
bbatch <file> <output>

Documentation

You can add these commands into your .bbat file to use bbatch functionality:

  • bbat.download(url, filename)
    downloads a file
    example: bbat.download("https://example.com","example.html")
  • bbat.getNTVersion(variable)
    saves the nt version to the specified variable
    example: bbat.getNTVersion(version)
  • bbat.getOSArch(variable)
    saves the OS architecture(x86 or x64) to a variable
    example: bbat.getOSArch(arch)
  • bbat.exit()
    ends the program without closing the cmd window
  • bbat.ping(url)
    sends a http request to the specified url without saving its response
    example: bbat.ping("https://www.google.com")
  • bbat.require(name)
    downloads a program from the repo in compilation-time
    example:
bbat.require(example.bat)
call example
  • bbat.requirerepo(name)
    downloads a file from the repo at runtime
    example: bbat.requirerepo(example.bat)
  • bbat.addnircmd()
    adds nircmdc.exe
    required for: bbat.speak
  • bbat.speak(text)
    speaks text
    example: bbat.speak("Hello world!")
  • bbat.msgbox(var,title,buttons,content)
    shows a VBS message box and saves the results to var
    example: bbat.msgbox(var,'Hello',0+64,'Hi')
  • bbat.readfile(file,variable)
    reads the first line of the specified file and saves the result to a variable
    example: bbat.readfile(hello.txt,content)
  • bbat.fileSourceFolder()
    gets the folder where the batch file is located at
    example: echo bbat.fileSourceFolder()
  • bbat.ifCompArg(argument,run)
    runs the batch code on "run" if the bbatch file is compiled with the specified argument
    example: bbat.ifCompArg(--say-hello,echo Hello)

Repo

This is the file repo URL: https://betterbatch.nicejsiscool.ml If the file repo doesn't have the programs you need you can always use the bbat.download function

Readme

Keywords

none

Package Sidebar

Install

npm i bbatch

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

52.2 kB

Total Files

5

Last publish

Collaborators

  • kagamox