1 /* 2 3 serializing tag info to/from human-readable text 4 5 copyright (c) 2015 squell <squell@alumina.nl> 6 7 use, modification, copying and distribution of this software is permitted 8 under the conditions described in the file 'COPYING'. 9 10 Usage: 11 12 output(tags, filename, out) 13 14 Output the selected tags (a vector) contained in fn to the output file 15 16 output(begin, end, out) 17 18 Output the selected range of frames from a metadata::listing 19 20 21 Output format: 22 23 A simple a textfile in two logical columns (seperated by tabs): 24 25 1) the first column contains "keys" whereas the 26 2) second column contains data pertaining to the most recent key 27 28 Output can come in two forms: 29 1) key<tab>value 30 a simple key-value pair, with value not containing newlines 31 32 2) key<newline><tab>value1[<newline><tab>value2 ... <newline><tab>valueN] 33 34 in this case value is the concatenation of the value1...valueN pairs, 35 joined together by newlines (as in Python's .join function) 36 37 Keys come in two forms: {FIELD}'s that mention metadata fields (actual data 38 read from a tags), and #directive's (information about the file/tags). 39 40 */ 41 42 #ifndef DUMPTAG_H 43 #define DUMPTAG_H 44 45 #include <cstdio> 46 #include "set_base.h" 47 #include "setgroup.h" 48 49 namespace tag { 50 51 void output(combined<reader> const& tags, const char* filename, std::FILE* out); 52 void output(metadata::array::const_iterator begin, metadata::array::const_iterator end, std::FILE* out); 53 54 } 55 56 #endif 57