Cadabra
Computer algebra system for field theory problems
Typedefs | Functions | Variables
cdb-nbtool.cc File Reference
#include <internal/difflib.h>
#include <internal/string_tools.h>
#include <internal/uuid.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include "process.hpp"
#include "nlohmann/json.hpp"

Typedefs

using Cells = std::pair< std::vector< std::string >, std::vector< std::string > >
 

Functions

void strip_newline (std::string &s)
 
std::string run_command (std::string command)
 
std::string run_git_command (std::string command)
 
std::string diff_substr (const std::string &s, size_t i1, size_t i2, difflib::tag_t tag)
 
void compare_cell (const std::string &a_, const std::string &b_, const std::string &id)
 
Cells cnb_to_cells (std::istream &stream)
 
void cnb_diff (std::istream &a, std::istream &b)
 
std::vector< std::string > split_to_maxlength (std::string s, int maxlength)
 
void help ()
 
void view (const char *fname)
 
void diff (const char *a, const char *b)
 
void gitdiff (const char *a, const char *b, const char *relpath)
 
void clean (const char *a)
 
int run (int argc, char **argv)
 
int main (int argc, char **argv)
 

Variables

const char * colour_insert = "\033[32m"
 
const char * colour_delete = "\033[31m"
 
const char * colour_insert_bg = "\033[42m"
 
const char * colour_delete_bg = "\033[41m"
 
const char * colour_info = "\033[36m"
 
const char * colour_modified = "\033[33m"
 
const char * colour_reset = "\033[0m"
 
std::string git_path
 

Typedef Documentation

◆ Cells

using Cells = std::pair<std::vector<std::string>, std::vector<std::string> >

Function Documentation

◆ clean()

void clean ( const char *  a)

◆ cnb_diff()

void cnb_diff ( std::istream &  a,
std::istream &  b 
)

◆ cnb_to_cells()

Cells cnb_to_cells ( std::istream &  stream)

◆ compare_cell()

void compare_cell ( const std::string &  a_,
const std::string &  b_,
const std::string &  id 
)

◆ diff()

void diff ( const char *  a,
const char *  b 
)

◆ diff_substr()

std::string diff_substr ( const std::string &  s,
size_t  i1,
size_t  i2,
difflib::tag_t  tag 
)

◆ gitdiff()

void gitdiff ( const char *  a,
const char *  b,
const char *  relpath 
)

◆ help()

void help ( )

◆ main()

int main ( int  argc,
char **  argv 
)

◆ run()

int run ( int  argc,
char **  argv 
)

◆ run_command()

std::string run_command ( std::string  command)

◆ run_git_command()

std::string run_git_command ( std::string  command)

◆ split_to_maxlength()

std::vector<std::string> split_to_maxlength ( std::string  s,
int  maxlength 
)

◆ strip_newline()

void strip_newline ( std::string &  s)

◆ view()

void view ( const char *  fname)

Variable Documentation

◆ colour_delete

const char* colour_delete = "\033[31m"

◆ colour_delete_bg

const char* colour_delete_bg = "\033[41m"

◆ colour_info

const char* colour_info = "\033[36m"

◆ colour_insert

const char* colour_insert = "\033[32m"

◆ colour_insert_bg

const char* colour_insert_bg = "\033[42m"

◆ colour_modified

const char* colour_modified = "\033[33m"

◆ colour_reset

const char* colour_reset = "\033[0m"

◆ git_path

std::string git_path