Jpp  master_rocky
the software that should make you happy
csv2shell.cc
Go to the documentation of this file.
1 #include "csv2shell.hh"
2 
3 template <>
4 void convertHeader<SHELL>(std::ostream& out, const Header& header) {
5  out << "#!/bin/zsh\n";
6  out << "# " << header.description << "\n";
7  out << "# " << header.url << "\n";
8  out << "\n";
9 }
10 
11 template <>
12 void convertCSV<SHELL>(std::ostream& out, const CSV& csv) {
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 }
void convertHeader< SHELL >(std::ostream &out, const Header &header)
Definition: csv2shell.cc:4
void convertCSV< SHELL >(std::ostream &out, const CSV &csv)
Definition: csv2shell.cc:12
Definition: csv2code.hh:15
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
std::string description
Definition: csv2code.hh:10
std::string url
Definition: csv2code.hh:11