Giter Site home page Giter Site logo

mikhaillipanin / tojos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yegor256/tojos

0.0 0.0 0.0 124 KB

Text Object Java Objects (TOJOs): an object representation of a multi-line structured text file like CSV

License: MIT License

Java 100.00%

tojos's Introduction

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

mvn PDD status Maintainability Maven Central Javadoc codecov Hits-of-Code Lines of code License

It's a simple manager of "records" in a text file of CSV, JSON, etc. format. It's something you would use when you don't want to run a full database, but just a list of lines in a file is not enough. You need a file with structured records.

You add this to your pom.xml:

<dependency>
  <groupId>com.yegor256</groupId>
  <artifactId>tojos</artifactId>
</dependency>

Then, to manage books.csv file:

import com.yegor256.tojos.MnCsv;
import com.yegor256.tojos.TjDefault;
import com.yegor256.tojos.Tojo;
import com.yegor256.tojos.Tojos;

Tojos tojos = new TjDefault(new MnCsv("books.csv"));
Tojo t1 = tojos.add("Object Thinking"); // unique ID
t1.set("author", "David West");
Tojo t2 = tojos.select(
    t -> t.get("author").equals("David West")
).get(0);

Each record has a unique ID, which is also the first column.

How to Contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

You will need Maven 3.3+ and Java 8+.

tojos's People

Contributors

baudoliver7 avatar l3r8yj avatar mximp avatar renovate[bot] avatar rultor avatar yegor256 avatar

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.