Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
Functions
csv2shell.cc File Reference
#include "csv2shell.hh"

Go to the source code of this file.

Functions

template<>
void convertHeader< SHELL > (std::ostream &out, const Header &header)
 
template<>
void convertCSV< SHELL > (std::ostream &out, const CSV &csv)
 

Function Documentation

◆ convertHeader< SHELL >()

template<>
void convertHeader< SHELL > ( std::ostream &  out,
const Header header 
)

Definition at line 4 of file csv2shell.cc.

4  {
5  out << "#!/bin/zsh\n";
6  out << "# " << header.description << "\n";
7  out << "# " << header.url << "\n";
8  out << "\n";
9 }
std::string description
Definition: csv2code.hh:10
std::string url
Definition: csv2code.hh:11

◆ convertCSV< SHELL >()

template<>
void convertCSV< SHELL > ( std::ostream &  out,
const CSV csv 
)

Definition at line 12 of file csv2shell.cc.

12  {
13  for (auto i = 0; i < csv.types.size(); i++) {
14  out << "export " << csv.names[i] << "=" << csv.numbers[i] << "\n";
15  }
16  out << "\n";
17 }
std::vector< std::string > numbers
Definition: csv2code.hh:18
std::vector< std::string > types
Definition: csv2code.hh:16
std::vector< std::string > names
Definition: csv2code.hh:17