• Stars
    star
    287
  • Rank 139,148 (Top 3 %)
  • Language
    C
  • License
    BSD 2-Clause "Sim...
  • Created almost 10 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.

libxo

libxo - A Library for Generating Text, XML, JSON, and HTML Output

The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced. The application calls a function "xo_emit" to product output that is described in a format string. A "field descriptor" tells libxo what the field is and what it means.

Imagine a simplified wc that emits its output fields in a single xo_emit call:

    xo_emit(" {:lines/%7ju/%ju} {:words/%7ju/%ju} "
            "{:characters/%7ju/%ju}{d:filename/%s}\n",
            line_count, word_count, char_count, file);

Output can then be generated in various style, using the "--libxo" option:

    % wc /etc/motd
          25     165    1140 /etc/motd
    % wc --libxo xml,pretty,warn /etc/motd
    <wc>
      <file>
        <filename>/etc/motd</filename>
        <lines>25</lines>
        <words>165</words>
        <characters>1140</characters>
      </file>
    </wc>
    % wc --libxo json,pretty,warn /etc/motd
    {
      "wc": {
        "file": [
          {
            "filename": "/etc/motd",
            "lines": 25,
            "words": 165,
            "characters": 1140
          }
        ]
      }
    }
    % wc --libxo html,pretty,warn /etc/motd
    <div class="line">
      <div class="text"> </div>
      <div class="data" data-tag="lines">     25</div>
      <div class="text"> </div>
      <div class="data" data-tag="words">    165</div>
      <div class="text"> </div>
      <div class="data" data-tag="characters">   1140</div>
      <div class="text"> </div>
      <div class="data" data-tag="filename">/etc/motd</div>
    </div>

View the beautiful documentation at:

http://juniper.github.io/libxo/libxo-manual.html

Analytics

More Repositories

1

py-junos-eznc

Python library for Junos automation
Python
657
star
2

contrail-controller

Contrail Controller
441
star
3

warp17

The Stateful Traffic Generator for Layer 1 to Layer 7
C
414
star
4

ansible-junos-stdlib

Junos modules for Ansible
Python
298
star
5

go-netconf

NETCONF implementation in Go.
Go
244
star
6

open-nti

Open Network Telemetry Collector build with open source tools
Python
226
star
7

contrail-vrouter

Contrail Virtual Router
219
star
8

grpc-c

C implementation of gRPC layered on top of core library
C
211
star
9

open-register-design-tool

Tool to generate register RTL, models, and docs using SystemRDL or JSpec input
Verilog
170
star
10

wistar

Wistar is a tool to help create and share network topologies of virtual machines. It is designed to be light weight enough to run on a laptop or a small dedicated server.
JavaScript
154
star
11

junoscriptorium

A repository for scripts and script libraries
XSLT
151
star
12

vqfx10k-vagrant

Vagrant projects for vQFX10k
HTML
133
star
13

OpenClos

Python
114
star
14

jsnapy

Python version of Junos Snapshot Administrator
Python
112
star
15

yang

Junos Yang module
92
star
16

OpenJNPR-Container-vMX

OpenJNPR-Container-vMX
Shell
87
star
17

jxmlease

A Python module for converting XML to intelligent Python data structures, and converting Python data structures to XML.
Python
81
star
18

netconf-java

Java library for NETCONF
Java
72
star
19

junos-terraform

Go
65
star
20

py-junos-netconify

Junos console/bootstrap automation Python module
Python
65
star
21

net-netconf

A Ruby gem for NETCONF
Ruby
63
star
22

contrail-ansible-deployer

Ansible deployment for contrail
60
star
23

juise

juise is the JUNOS User Interface Script Environment, which allows users to develop, test, and execute script outside of JUNOS. For more information about juise, see:
C
53
star
24

libslax

libslax is a C implementation of the SLAX programming language, a dialect of XSLT that is more perl/C-like and easier to read/code/use. For additional information about SLAX, see
C
49
star
25

contrail-docker

Python
48
star
26

contrail-kubernetes

OpenContrail Kubernetes integration
Go
44
star
27

contrail

Contrail repo for core components (go based)
Go
43
star
28

healthbot-rules

Python
42
star
29

ruby-junos-ez-stdlib

A collection of Ruby classes to make Junos automation Easy. This is the "standard library" supported on all devices.
Ruby
35
star
30

YAPT

Yet Another Provisioning Tool
Python
31
star
31

vmx-docker-lwaftr

vMX Lightweight 4over6 Virtual Network Function with Snabb in a Docker Container
Python
30
star
32

contrail-installer

Install scripts for OpenContrail
Shell
30
star
33

jtimon

Junos Telemetry Interface (JTI) client
Go
30
star
34

py-space-platform

Python library for Junos Space APIs
HTML
28
star
35

Intro-to-Using-Ansible-with-Junos-OS

Examples of Using Ansible with Junos Devices
27
star
36

puppet-netdev-stdlib-junos

Junos specific Provider code for "netdev_stdlib". Netdev is a vendor-neutral network abstraction framework developed by Juniper Networks and contributed freely to the DevOps community.
Ruby
25
star
37

vSRX-AWS

vSRX for Amazon Web Services
HCL
24
star
38

junos-snapshot-administrator

Shell
23
star
39

nita

The parent repo of a framework to automatically build and test networks.
Shell
23
star
40

splitcopy

Improves file transfer rates when copying files to/from JUNOS/EVO/*nix hosts.
Python
22
star
41

ebplane

eBPF based dataplane prototypes
C++
22
star
42

docker-saltstack-junos

Dockerfile to create a working Saltstack container for Junos
Python
21
star
43

contrail-vnc

Contrail Virtual Network Controller
21
star
44

netconf-perl

Perl library for Netconf
Perl
20
star
45

contrail-neutron-plugin

Opencontrail Neutron plugin + extensions
18
star
46

simple_reg_model

System verilog register model for uvm testbenches.
Perl
18
star
47

contrail-operator

Juniper K8s contrail operator
Go
18
star
48

JP4Agent

Juniper's P4 Runtime server implementation.
C++
18
star
49

vijava

17
star
50

contrail-tripleo-heat-templates

Contrail tripleO heat templates
17
star
51

telemetry

Juniper Telemetry models, augments and deviations
17
star
52

ruby-junos-ez-srx

Ruby libraries support Junos automation via NETCONF - "SRX library"
Ruby
16
star
53

contrail-web-core

Contrail web ui backend code
16
star
54

contrail-container-builder

Build contrail networking control components as micro-services
16
star
55

juniper-pytest

Juniper Pytest is an automation developer's toolkit. It provides everything an automation developer might need to automate configuration and validation of Juniper network equipment with Python and Ansible.
Makefile
16
star
56

jet-app-store

App store for Jet Apps
Python
14
star
57

netconf-call-home

C
14
star
58

meshrr

Hierarchical Route Reflectors and Route Servers @ Scale w/ Juniper cRPD & Kubernetes
Python
14
star
59

contrail-dev-env

Shell
13
star
60

contrail-heat

Openstack heat plugin and resources
13
star
61

contrail-charms

Juju charms for Contrail services.
13
star
62

terraform-provider-apstra

Apstra Terraform Provider
Go
13
star
63

topoviz

A network topology visualisation tool. Creates a force directed graph from the output of a JUNOS cli cmd
Perl
12
star
64

yangc

YANG Compiler for JUNOS
C
12
star
65

contrail-server-manager

contrail server management
Python
12
star
66

contrail-sandesh

Contrail analytics IDL
C++
12
star
67

contrail-generateDS

Contrail XML schema code generator
Python
12
star
68

contrail-kubernetes-docs

12
star
69

contrail-test

12
star
70

contrail-packages

Build and packaging scripts for OpenContrail.
11
star
71

contrail-helm-deployer

Contrail Helm based deployment
11
star
72

contrail-fabric-utils

packaging
11
star
73

container-networking-ansible

Ansible provisioning for container networking solutions using OpenContrail
Python
11
star
74

contrail-dpdk

dpdk fork
C
11
star
75

lab-doc-convert

Shell
11
star
76

nita-robot

Robot Framework test automation framework, part of the Juniper NITA solution
Python
11
star
77

nita-webapp

nita-webapp, a lightweight django based webapp that orchestrates jenkins, ansible and robot, part of the Juniper NITA solution
JavaScript
11
star
78

juniper-newrelic-plugin

New Relic Plugin for monitoring Juniper devices
Python
11
star
79

py-jnpr-wlc

EXPERIMENTAL: Python library for Juniper Wireless Lan Controller (WLC) product
Python
10
star
80

virtfs

VirtFS kernel driver for FreeBSD
C
10
star
81

contrail-go-api

golang API bindings for OpenContrail
Go
10
star
82

contrail-web-controller

contrail web ui controller code
10
star
83

vSRX-Azure

Python
9
star
84

TelemetryInterface

9
star
85

nita-yaml-to-excel

yaml2xls, a library and tools for converting between yaml files and MS excel, part of the Juniper NITA solution
Python
9
star
86

contrail-packaging

Contrail VNC packaging
9
star
87

contrail-specs

Repository for docs and specs
9
star
88

vmx-heat-templates

vMX Heat templates
Python
8
star
89

healthbot-py-client

Python library that provides REST interface to the HealthBot server
Python
8
star
90

contrail-build

Contrail VNC build tools
7
star
91

netlink-agent

netlink
C
7
star
92

space-ansible-collection

space-ansible-collection
Python
7
star
93

nita-cli

Python
6
star
94

contrail-chef

Contrail Chef Cookbooks
HTML
6
star
95

nita-ansible

Ansible, a radically simple IT automation engine, part of the Juniper NITA solution
Jinja
6
star
96

qfx5100-book

GitHub Repo for the O'Reilly QFX5100 book by Doug Hanks
Ruby
6
star
97

contrail-ansible

Ansible scripts used by server manager
Python
5
star
98

junos-extension-toolkit

A repository to store JET IDL files
5
star
99

terraform-provider-junos-vsrx

Terraform provider for Junos vSRX devices
Go
5
star
100

contrail-charts

A chart library by Contrail using D3 and Backbone.
JavaScript
5
star