Skip to content

.NET / Mono library to use in C# scripts with Nautilus, Nemo and Caja filemanagers support

License

Notifications You must be signed in to change notification settings

r7-labs/R7.Scripting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About R7.Scripting

R7.Scripting is .NET/Mono library designed to simplify the development of C# scripts.

Features

  • Support for Nautilus, Nemo and Caja filemanagers.
  • Desktop notifications for scripts (via notify-sharp).
  • Easy access to environment variables.
  • Simple external commands execution.
  • Error logging (to a file).

License

GPLv3

The R7.Scripting is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Options for C# script runners

Mono provides C# interactive console (REPL) through csharp command, so you can create executable scripts with C# just by adding #!/usr/bin/csharp as first line of source file. More info...

If you need more from your C# scripts (i.e. pass command-line arguments to them, know script source location, run script in a terminal window) - you could run them using csexec. Get it here: https://github.com/roman-yagodin/csexec, install, then add #!/usr/bin/csexec -r:R7.Scripting.dll as a first line. More info...

Install library

  • Place R7.Scripting.dll and notify-sharp.dll at ~/.config/csharp.

Simple script

#!/usr/bin/csexec -r:R7.Scripting.dll

using System;
using System.IO;
using R7.Scripting;

public static class Program
{
    public static int Main (string [] args)
    {
        var script = new Script (args, () => { 
            // TODO: place your code here
        });

        return script.Run ();
    }
}

Warning: in development!

The library's code is in process of constant change, so do not expect any kind of stable API.

About

.NET / Mono library to use in C# scripts with Nautilus, Nemo and Caja filemanagers support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages