{"id":20074180,"url":"https://github.com/juniper/libxo","last_synced_at":"2025-04-05T04:11:53.116Z","repository":{"id":18518708,"uuid":"21716728","full_name":"Juniper/libxo","owner":"Juniper","description":"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.","archived":false,"fork":false,"pushed_at":"2024-04-19T06:04:50.000Z","size":5714,"stargazers_count":316,"open_issues_count":21,"forks_count":47,"subscribers_count":25,"default_branch":"main","last_synced_at":"2024-10-13T17:09:57.835Z","etag":null,"topics":["cbor","freebsd","html","json","xml"],"latest_commit_sha":null,"homepage":"http://juniper.github.io/libxo/libxo-manual.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Juniper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-07-11T01:25:55.000Z","updated_at":"2024-10-11T21:37:29.000Z","dependencies_parsed_at":"2023-02-12T12:02:04.531Z","dependency_job_id":"44dbebf4-b627-4f30-883c-8830bfa10335","html_url":"https://github.com/Juniper/libxo","commit_stats":{"total_commits":2454,"total_committers":15,"mean_commits":163.6,"dds":"0.014262428687856543","last_synced_commit":"290d88625c683bca60e05e68dd2003c290f50f99"},"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Flibxo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Flibxo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Flibxo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Flibxo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Juniper","download_url":"https://codeload.github.com/Juniper/libxo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284951,"owners_count":20913704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cbor","freebsd","html","json","xml"],"created_at":"2024-11-13T14:49:41.512Z","updated_at":"2025-04-05T04:11:53.093Z","avatar_url":"https://github.com/Juniper.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"libxo\n=====\n\nlibxo - A Library for Generating Text, XML, JSON, and HTML Output\n\nThe libxo library allows an application to generate text, XML, JSON,\nand HTML output using a common set of function calls.  The application\ndecides at run time which output style should be produced.  The\napplication calls a function \"xo_emit\" to product output that is\ndescribed in a format string.  A \"field descriptor\" tells libxo what\nthe field is and what it means.\n\nImagine a simplified ``wc`` that emits its output fields in a single\nxo_emit call:\n\n```\n    xo_emit(\" {:lines/%7ju/%ju} {:words/%7ju/%ju} \"\n            \"{:characters/%7ju/%ju}{d:filename/%s}\\n\",\n            line_count, word_count, char_count, file);\n```\n\nOutput can then be generated in various style, using the \"--libxo\"\noption: \n\n```\n    % wc /etc/motd\n          25     165    1140 /etc/motd\n    % wc --libxo xml,pretty,warn /etc/motd\n    \u003cwc\u003e\n      \u003cfile\u003e\n        \u003cfilename\u003e/etc/motd\u003c/filename\u003e\n        \u003clines\u003e25\u003c/lines\u003e\n        \u003cwords\u003e165\u003c/words\u003e\n        \u003ccharacters\u003e1140\u003c/characters\u003e\n      \u003c/file\u003e\n    \u003c/wc\u003e\n    % wc --libxo json,pretty,warn /etc/motd\n    {\n      \"wc\": {\n        \"file\": [\n          {\n            \"filename\": \"/etc/motd\",\n            \"lines\": 25,\n            \"words\": 165,\n            \"characters\": 1140\n          }\n        ]\n      }\n    }\n    % wc --libxo html,pretty,warn /etc/motd\n    \u003cdiv class=\"line\"\u003e\n      \u003cdiv class=\"text\"\u003e \u003c/div\u003e\n      \u003cdiv class=\"data\" data-tag=\"lines\"\u003e     25\u003c/div\u003e\n      \u003cdiv class=\"text\"\u003e \u003c/div\u003e\n      \u003cdiv class=\"data\" data-tag=\"words\"\u003e    165\u003c/div\u003e\n      \u003cdiv class=\"text\"\u003e \u003c/div\u003e\n      \u003cdiv class=\"data\" data-tag=\"characters\"\u003e   1140\u003c/div\u003e\n      \u003cdiv class=\"text\"\u003e \u003c/div\u003e\n      \u003cdiv class=\"data\" data-tag=\"filename\"\u003e/etc/motd\u003c/div\u003e\n    \u003c/div\u003e\n```\n\nView the beautiful documentation at:\n\nhttp://juniper.github.io/libxo/libxo-manual.html\n\n[![Analytics](https://ga-beacon.appspot.com/UA-56056421-1/Juniper/libxo/Readme)](https://github.com/Juniper/libxo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniper%2Flibxo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuniper%2Flibxo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniper%2Flibxo/lists"}