Giter VIP home page Giter VIP logo

pl-comparer's Introduction

Package list comprare

Shared library for comparing binary packages of 2 branches. Works only with json sorted in descending order!

Output JSON structure:

  • missing (all packages that are in the 1st but not in the 2nd)
  • extra (all packages that are in the 2nd but are not in the 1st)
  • updated (all packages whose version-release is greater in the 1st than in the 2nd)

Examples

Some examples to give you an idea how to use the class. Beside the examples below, you may want to browse the standalone example files.

Has a dependency on nlohmann::json.

Add to project

#include <pl-comparer/pl-comparer.h>
using namespace PackageListComparer;
using json = nlohmann::json;

Getting binary packages

std::string arch = "x86_64";
std::string first = "sisyphus";
std::string second = "p10";
json source = loadJson(first, arch);
json target = loadJson(second, arch);

Run comparison

Make comparison and get result:

nlohmann::json resultJson = comparing(first, second);

CLI utility

Then the command line is given as:

plcomparer -a x86_64 -s sisyphus -t p10
  • a [branch] Arch selection.
  • s [arch] Branch source name.
  • t [arch] Branch target name.
  • p Print Json comparison result.
  • d Print beautiful Json dump comparison result.
  • f Saving beautiful Json dump comparison result.
  • h Print this help message and exit.

Building and installation

For building and installation instructions refer to INSTALL.md.

Plan

  • Basic comparison functionality
  • Get lists of binary packages
  • CLI utility
  • Installation by FHS standard
  • Selecting a branch
  • Added unit tests
  • Getting arch by API

pl-comparer's People

Watchers

 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.