OpenRefine.Net 0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package OpenRefine.Net --version 0.0.2
                    
NuGet\Install-Package OpenRefine.Net -Version 0.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenRefine.Net" Version="0.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenRefine.Net" Version="0.0.2" />
                    
Directory.Packages.props
<PackageReference Include="OpenRefine.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenRefine.Net --version 0.0.2
                    
#r "nuget: OpenRefine.Net, 0.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenRefine.Net@0.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenRefine.Net&version=0.0.2
                    
Install as a Cake Addin
#tool nuget:?package=OpenRefine.Net&version=0.0.2
                    
Install as a Cake Tool

OpenRefine.Net

A .NET client implementation for the OpenRefine API. Build and Tested with OpenRefine v3.4.1.

Supported features:

  • Create project
  • Get project models
  • Apply operations
  • Export tows
  • Delete project
  • Get all projects metadata
  • Check status of async processes

Configuration

By default the OpenRefine server URL is http://127.0.0.1:3333.

var _client = new OpenRefineClient(); // new OpenRefineClient("YOUR_OPENREFINE_URL");

var fileInfo = new FileInfo("Samples/dates.txt");

var content = new byte[fileInfo.Length];

using var fs = fileInfo.OpenRead();
await fs.ReadAsync(content);

var csrf = await _client.GetCsrfTokenAsyc();

var project = await _client.CreateProjectAsync(new CreateProjectRequest
{
    Token = csrf.Token,
    ProjectName = fileInfo.Name,
    FileName = fileInfo.Name,
    Content = content
});

var operations = File.ReadAllText("Samples/operations.json");

var appliedOps = await _client.ApplyOperationsAsync(new ApplyOperationsRequest
{
    Token = csrf.Token,
    ProjectId = project.ProjectId,
    Operations = operations
});

var fileName = await _client.ExportRowsAsync(new ExportRowsRequest { 
    Token = csrf.Token,
    ProjectId = project.ProjectId,
    FileName = "test.csv"
});

var results = File.ReadAllText(fileName);

var deleted = await _client.DeleteProjectAsync(new DeleteProjectRequest {
    Token = csrf.Token,
    ProjectId = project.ProjectId
});

Console.WriteLine(results);

Installation

Clone this repository or use the NuGet package.

Tests

You must have OpenRefine running at http://localhost:3333.

> dotnet test

Contribute

Pull requests with passing tests are welcome!

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 404 3/7/2023
0.0.2 719 5/26/2021
0.0.1 529 5/26/2021