[opam-devel] [ocaml-infra] Wireframe demo of OCaml.og

Louis Gesbert louis.gesbert at ocamlpro.com
Fri Mar 15 12:35:00 GMT 2013

Here is a quick & dirty shell/sed script that I used to put links to the github pages, for our projects hosted on github. Better than nothing for now.

If anyone may find it useful:

for f in **/url; do          
    homepage=$(sed \
        's#archive: *"\(http.\?://.\+\.github\.com/[^/]\+\)/.*"#\1#; t ok; s#archive: *"\(http.\?://github.com/[^/]\+/[^/]\+\)/.*"#\1#; t ok; d; :ok' $f)
    if [ -n "$homepage" ]; then
        echo -en "\e[32m$f\e[m... "
        if \! grep -q 'ocamlpro.com' ${f%url}opam; then
            echo '\e[31mNot ours\e[m'
        elif grep -q 'homepage' ${f%url}opam; then
            echo -e '\e[32mAlready there\e[m'
            echo "\e[33mAdding $homepage\e[m"
            echo "homepage: \"$homepage\"" >> ${f%url}opam


Le Friday 15 March 2013 12:34:42, Thomas Gazagnaire a écrit :
> Hi,
> > I mean: could it be possible to create some kind of "info" packages in
> > opam to indicate that a library/tool/... exists but is not packaged
> > yet ? With a flag to make them appear in opam list and search ?
> You can already create "empty" packages with a dummy build instruction which just display "NOT PACKAGED YET!" and exit with a non-zero code, but I doubt this would be very helpful to the user (and quite frustrating). But why not ...
> > This could encourage contributors to package not yet packaged tools and
> > libs.
> > 
> > Regarding tags, it is possible that I missed the information, but is
> > opam going to handle tags associated to packages ? (I saw some
> > tag-based search in packages in Amir's demos)
> Yup, OPAM 1.0.0 supports tags but we haven't advertise that properly yet (the priority was to release the tool with all the rights features in). Now we can concentrate on the package metadata themselves.
> If you look at section 1.2.4 of the dev-manual[1] your can see that you can add these new fields in the .opam:
> homepage: "url"
> authors: [ "me" "you" ]
> tags: [ "foo" "bar" ]
> I encourage everybody with some spare time to add these relevant fields to the existing package metadata :-) Bonus points if you come-up with some automatic tools to do this.
> For the tag conventions, I'm pretty in favor of re-using the great work that has already been put in the hump. Is there a list of tags and their description available somewhere ?
> You can query the tags on the command line: `opam info foo -f tags` will display the tags associated to the package foo but I just realize that the search function doesn't look at the tags yet ... I've opened [2] to to keep track of this.
> > At last, I also saw in Amir's demos news feeds associated to packages.
> > Will the RSS feed be indicated in opam package information ?
> This is a great idea, I'm not sure how to do this properly yet but that's something what we really aim for (ie. give the user the ability to get quick feedback on a given package). This is now tracked by [3].
> --
> Thomas
> [1] https://github.com/OCamlPro/opam/raw/master/doc/dev-manual/dev-manual.pdf
> [2] https://github.com/OCamlPro/opam/issues/535
> [3] https://github.com/OCamlPro/opam/issues/536
> _______________________________________________
> opam-devel mailing list
> opam-devel at lists.ocaml.org
> http://lists.ocaml.org/listinfo/opam-devel

More information about the opam-devel mailing list