Fsdb::F...l_to_db(3)
β¨ yaml_to_db β¨ (the manual page is Fsdb::F...l_to_db(3))
okay so bestie, this is the User Contributed Perl Documentation page for yaml_to_db, and it is lowkey iconic in a βtiny filter that does one thingβ way. π
Weβre gonna get you comfy with it, no cap.
π NAME π
yaml_to_db β convert a subset of YAML into fsdb. Thatβs the whole vibe. π¦
π SYNOPSIS π
yaml_to_db <source.yaml
π§ DESCRIPTION π§
So hereβs the tea: this thing converts a very limited subset of YAML into Fsdb format. It is not out here doing general YAML sorcery β itβs a niche little gremlin and we love her. π«Ά
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. Slay. β¨
We also flatten one level of lists into comma-separated values. iykyk π
The output is tab-separated fsdb. (Someday more general field separators should be supported.) Not today, though. π
π OPTIONS π
This module also supports the standard fsdb options:
-dβ enable debugging output. Spill the diagnostics, bestie. π-ior--inputInputSource β read from InputSource, typically a file name, or"-"for standard input, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects. π₯-oor--outputOutputDestination β write to OutputDestination, typically a file name, or"-"for standard output, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects. π€--autorunor--noautorunβ by default, programs process automatically, butFsdb::Filterobjects in Perl do not run until you invoke therun()method. The"--(no)autorun"option controls that behavior within Perl. ποΈ--helpβ show help. π--manβ show full manual. π
πΈ SAMPLE USAGE πΈ
π₯ Input:
- 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
πͺ Command:
yaml_to_db <gnupod.yaml
π€ Output:
#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
π SEE ALSO π
Fsdb. Go check the mothership, bestie. π
π CLASS FUNCTIONS π
π§ new
$filter = new Fsdb::Filter::yaml_to_db(@arguments);
Create a new yaml_to_db object, taking command-line arguments. Main character constructor energy. β¨
π set_defaults
$filter->set_defaults();
Internal: set up defaults. Housekeeping, but make it cute. π§Ή
π¦ parse_options
$filter->parse_options(@ARGV);
Internal: parse command-line arguments. Reading the room, aka the @ARGV. π
π setup
$filter->setup();
Internal: setup, parse headers. Getting the table ready for its close-up. π
π₯ run
$filter->run();
Internal: run over each rows. Go off, filter. π₯
π AUTHOR and COPYRIGHT π
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. π
Thatβs the tea! This page came from perl v5.32.1, dated 2024-08-02, and it is the Fsdb::F...l_to_db(3) manual page. Stay slaying, bestie. πβ¨π
π¦ where this page comes from
- epel 9: perl-Fsdb 2:3.9-1.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms