{"id":17113027,"url":"https://github.com/emmt/ytoml","last_synced_at":"2026-01-22T05:34:40.838Z","repository":{"id":222781328,"uuid":"758361372","full_name":"emmt/ytoml","owner":"emmt","description":"Yorick plug-in for TOML files","archived":false,"fork":false,"pushed_at":"2025-12-16T12:51:16.000Z","size":71,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-20T02:56:51.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emmt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2024-02-16T06:35:10.000Z","updated_at":"2025-12-16T12:51:20.000Z","dependencies_parsed_at":"2024-03-04T11:31:42.577Z","dependency_job_id":"199c5959-0e04-457d-a1d4-2246f1e4854e","html_url":"https://github.com/emmt/ytoml","commit_stats":null,"previous_names":["emmt/ytoml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emmt/ytoml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2Fytoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2Fytoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2Fytoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2Fytoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emmt","download_url":"https://codeload.github.com/emmt/ytoml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2Fytoml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28656322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-14T17:02:24.316Z","updated_at":"2026-01-22T05:34:40.824Z","avatar_url":"https://github.com/emmt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Yorick interface to TOML files\n\nThis repository provides a plug-in to deal with [TOML\nfiles](https://toml.io/en/) in [Yorick](http://github.com/LLNL/yorick).\n\n`ytoml` currently uses a patched version of the C parser in\n[toml-c](https://github.com/arp242/toml-c). See\n[toml-c/issues/2](https://github.com/arp242/toml-c/issues/2) for a description\nof the issues fixed for this plug-in. Future plans are to switch to\n[tomlc99](https://github.com/cktan/tomlc99) for parsing TOML.\n\n\n## Usage\n\nIf the plug-in has been properly installed, it is sufficient to use any\nfunction of the plug-in to automatically load it. You may force the loading of\nthe plug-in by something like:\n\n``` c\n#include \"toml.i\"\n```\n\nor\n\n``` c\nrequire, \"toml.i\";\n```\n\nin your code.\n\nTo read a TOML table from a string buffer or from a file, do:\n\n``` c\ntbl = toml_parse(buffer);\ntbl = toml_parse_file(filename);\n```\n\nEntries in a table can be accessed by an integer index `idx` or by a string\n`key`:\n\n``` c\nval = tbl(key);\nval = tbl(idx);\n```\n\nwhere the value `val` can be:\n\n- a boolean represented by a Yorick's `int`: `0n` for false, `1n` for true;\n- an integer represented by a Yorick's `long`;\n- a floating-point represented by a Yorick's `double`;\n- a string represented by a Yorick's `string`;\n- a timestamp;\n- a TOML table;\n- a TOML array.\n\nA TOML array is similar to a TOML table except that it can only be indexed by\nintegers.\n\nThe number of entries in a TOML table or array, say `obj`, is given by\n`obj.len` and Yorick's indexing rules hold, that is `obj(0)` yields the last\nentry, `obj(-1)` yields the before last entry and so on.\n\nOther members are:\n\n- `obj.len` yields the number of entries in `obj`;\n- `obj.root` yields the root TOML table to which `obj` belongs to;\n- `obj.is_root` yields whether `obj` is the root TOML table;\n\nTo identify the type of TOML object, call:\n\n``` c\nid = toml_type(obj);\n```\n\nwhich yields `1` if `obj` is a TOML table, `2` if `obj` is a TOML table, and\n`0` otherwise.\n\n\n## Installation\n\n### Prerequisites\n\nTo install this plug-in, you must have [Yorick](http://github.com/LLNL/yorick)\nand Git installed on your machine.\n\n\n### Installation with `EasyYorick`\n\nThe easiest installation is to use\n[`EasyYorick`](https://github.com/emmt/EasyYorick) for installing Yorick and\nthis plug-in (and many others). Assuming `EasyYorick` has been installed,\ninstalling the `YTOML` plug-in is as simple as:\n\n``` sh\nypkg upgrade ypkg\nypkg install ytoml\n```\n\n\n### Manual installation\n\nIn short, building and installing the plug-in can be as quick as:\n\n``` sh\ncd $BUILD_DIR\n$SRC_DIR/configure\nmake\nmake install\n```\n\nwhere `$BUILD_DIR` is the build directory (at your convenience) and `$SRC_DIR`\nis the source directory of the plug-in code. The build and source directories\ncan be the same in which case, call `./configure` to configure for building.\n\nMore detailed installation explanations are given below.\n\n1. You must have [Yorick](http://github.com/LLNL/yorick) and Git installed on\n   your machine.\n\n2. Unpack the software code somewhere or clone the Git repository with:\n\n   ```sh\n   git clone https://github.com/emmt/ytoml\n   ```\n\n3. Configure for compilation.  There are two possibilities:\n\n   For an **in-place build**, go to the source directory, say `$SRC_DIR`, of\n   the plug-in code and run the configuration script:\n\n   ``` sh\n   cd $SRC_DIR\n   ./configure\n   ```\n\n   To see the configuration options, call:\n\n   ``` sh\n   ./configure --help\n   ```\n\n   In particular the options `CPPFLAGS=...`, `CFLAGS=...`, and `LDFLAGS=...` or\n   `--deplibs` may be used to specify additional options for the\n   preprocessor, the compiler, and the linker.\n\n   To compile in a **different build directory**, say `$BUILD_DIR`, create the\n   build directory, go to the build directory and run the configuration script:\n\n   ``` sh\n   mkdir -p $BUILD_DIR\n   cd $BUILD_DIR\n   $SRC_DIR/configure\n   ```\n\n   where `$SRC_DIR` is the path to the source directory of the plug-in code.\n   To see the configuration options, call:\n\n   ``` sh\n   $SRC_DIR/configure --help\n   ```\n\n4. Compile the code:\n\n   ``` sh\n   make\n   ```\n\n4. Install the plug-in in Yorick directories:\n\n   ``` sh\n   make install\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmt%2Fytoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femmt%2Fytoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmt%2Fytoml/lists"}