{"id":19460958,"url":"https://github.com/smolkaj/ocaml-open","last_synced_at":"2025-10-11T07:38:24.815Z","repository":{"id":95722129,"uuid":"111153573","full_name":"smolkaj/ocaml-open","owner":"smolkaj","description":"Conveniently open files such as PDFs in their default applications.","archived":false,"fork":false,"pushed_at":"2025-05-21T04:57:22.000Z","size":532,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T11:48:44.135Z","etag":null,"topics":["library","ocaml"],"latest_commit_sha":null,"homepage":"https://smolkaj.github.io/ocaml-open/open/","language":"OCaml","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/smolkaj.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2017-11-17T21:43:27.000Z","updated_at":"2023-07-03T17:13:13.000Z","dependencies_parsed_at":"2024-11-10T17:51:26.714Z","dependency_job_id":null,"html_url":"https://github.com/smolkaj/ocaml-open","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/smolkaj/ocaml-open","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smolkaj%2Focaml-open","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smolkaj%2Focaml-open/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smolkaj%2Focaml-open/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smolkaj%2Focaml-open/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smolkaj","download_url":"https://codeload.github.com/smolkaj/ocaml-open/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smolkaj%2Focaml-open/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006625,"owners_count":26084131,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":["library","ocaml"],"created_at":"2024-11-10T17:39:06.399Z","updated_at":"2025-10-11T07:38:24.790Z","avatar_url":"https://github.com/smolkaj.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ocaml-open: open files in their default applications\n\n[![Build Status](https://github.com/smolkaj/ocaml-open/workflows/build%20and%20test/badge.svg?branch=master)](https://github.com/smolkaj/ocaml-open/actions)\n\nConveniently open files such as PDFs in their default applications straigt from OCaml.\n\n## Quick start\nYou can install the library using `opam`:\n```\n$ opam install open\n```\nThen in `utop` or `ocaml`,\n```\n$ ocaml\n\u003e #require \"open\";;\n\u003e Open.in_default_app \"/home/steffen/ocaml.svg\";;\n- : bool = true\n// SVG viewer opens and displays ocaml.svg\n```\n![OCaml](http://ocaml.org/logo/Colour/SVG/colour-logo.svg)\n\nThe boolean returned by `Open.in_default_app` indicates whether the open command exited normally:\n```\n\u003e Open.in_default_app \"/path/to/non-existent.file\";;\n- : bool = false\n// nothing happens\n```\n\nBoth absolute and relative paths are supported:\n```\n\u003e Open.in_default_app \".\";;\n- : bool = true\n// file manager displays current working directory\n```\n\n## API\nThe tiny API is documented [here](https://smolkaj.github.io/ocaml-open/).\n\n## Building from source\n\n### Dependencies\nThe library requires [`dune`](https://github.com/ocaml/dune) (formerly known as jbuilder) to build, but has no other dependencies.\n\n### Building Library and Examples\nRun `make` to build and `make test` to see the library in action. This should open several files from the `examples/basic` folder.\n\nThere is also a more sophisticated example in `examples/graphviz` that requires graphivz and Jane Street's [`core`](https://opensource.janestreet.com/core/) (version v0.9.0 or higher). You can build \u0026 run it as follows:\n```\ndune build @graphviz\n```\n\n## Limitations and Implementation\nThe library has been tested under Linux, MacOS, and Cygwin. There is experimental support for native Windows, but this is untested.\nThe implementation uses\n* `xdg-open` on Linux\n* `open` on MacOS\n* `cygstart` on Cygiwn, and\n* `cmd start` on Windows.\n\n## Suggestion and Contributions\nSuggestions and contributions are always welcome. Feel free to submit pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmolkaj%2Focaml-open","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmolkaj%2Focaml-open","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmolkaj%2Focaml-open/lists"}