yaml_to_db - convert a subset of YAML into fsdb
yaml_to_db <source.yaml
Converts a very limited subset of YAML into Fsdb format.
The input is YAML-format (not fsdb). The input is parsed as YAML, assuming the file is an array of dictionary entries. We extract the dictionary names and output this as an fsdb table.
We also flatten one level of lists into comma-separated values.
The output is tab-separated fsdb. (Someday more general field separators should be supported.)
This module also supports the standard fsdb options:
Enable debugging output.
Read from InputSource, typically a file name, or - for standard input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
-
Write to OutputDestination, typically a file name, or - for standard output, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
By default, programs process automatically, but Fsdb::Filter objects in Perl do not run until you invoke the run() method. The --(no)autorun option controls that behavior within Perl.
--(no)autorun
Show help.
Show full manual.
- name: ACM role: sponsor alttext: ACM, the Association for Computing Machinery image: logos/acm-small.jpg link: https://www.acm.org/ date: 2016-01-01 - name: SIGCOMM role: sponsor alttext: SIGCOMM, ACM'S Special Interest Group on Communication image: logos/sigcommlogo.png link: http://sigcomm.org date: 2016-01-02 - name: SIGMETRICS role: sponsor alttext: SIGMETRICS, ACM'S Special Interest Group on Performance Evaluation image: logos/sigmetrics-small.png link: http://www.sigmetrics.org date: 2016-01-03
yaml_to_db <gnupod.yaml
#fsdb -F t alttext date image link name role ACM, the Association for Computing Machinery 2016-01-01 logos/acm-small.jpg https://www.acm.org/ ACM sponsor SIGCOMM, ACM'S Special Interest Group on Communication 2016-01-02 logos/sigcommlogo.png http://sigcomm.org SIGCOMM sponsor SIGMETRICS, ACM'S Special Interest Group on Performance Evaluation 2016-01-03 logos/sigmetrics-small.png http://www.sigmetrics.org SIGMETRICS sponsor # | yaml_to_db
Fsdb.
Copyright (C) 2011-2018 by John Heidemann <johnh@isi.edu>
This program is distributed under terms of the GNU general public license, version 2. See the file COPYING with the distribution for details.
To install Fsdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fsdb
CPAN shell
perl -MCPAN -e shell install Fsdb
For more information on module installation, please visit the detailed CPAN module installation guide.