package oframl
All checked builds pass sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Farcaster Frames in OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.0.1.tar.gz
md5=a38e5b6b0e2b52a1093ca027fd9c3e09
sha512=8338e3b762bec277f4532ae51a2420041398943e21d312afd0acdd2dd4a25c01e0e7ebd021dad7444f578eeac3e50482907e5a9aa0791717d718064d5e2feb19
Description
A framework for building Farcaster Frames in OCaml
README
Oframl
Oframl is a simple framework for building Farcaster Frames in OCaml.
Usage
open Oframl
let image_handler (data : string) =
let str = if String.equal data "initial" then
"Click to fetch FID"
else
[%string "FID: %{data}"]
in
[%string
{|<svg width='191' height='100' xmlns='http://www.w3.org/2000/svg'>
<rect width='100%' height='100%' fill='black'/>
<text x='95.5' y='50' text-anchor='middle'
dominant-baseline='middle'
font-family='Arial' font-size='12' fill='white'>
%{str}
</text>
</svg>|}]
;;
let frame_handler (): frame =
{ title = "FID Check"
; image_extra_data = "initial"
; post_extra_data = ""
; buttons = [ { content = "Check FID" } ]
}
;;
let post_handler (act : action) (_data : string) : frame =
{ title = "FID Check"
; image_extra_data = string_of_int act.fid
; post_extra_data = ""
; buttons = []
}
;;
let base_url = "https://df78-72-69-118-50.ngrok-free.app" in
let start = Server.start base_url frame_handler post_handler image_handler in
Lwt_main.run startExamples
To view more examples see examples
Dependencies (8)
- ppx_string
- ppx_deriving_yojson
- yojson
- cohttp-lwt-unix
-
lwt
>= "5.3.0" - cohttp
-
dune
>= "3.12" -
ocaml
>= "4.11"
Dev Dependencies (1)
-
odoc
with-doc
Used by
None
Conflicts
None
Build status
Results of building oframl with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.0.1 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page