From 2c94fee1e0634b2e3434250841784487159d22c4 Mon Sep 17 00:00:00 2001 From: gurleennsidhuu <64313783+gurleennsidhuu@users.noreply.github.com> Date: Tue, 4 May 2021 16:29:10 +0530 Subject: [PATCH 1/2] deleted dead scripts from script/ and opam.ocaml.org/ --- opam.ocaml.org/contact.xhtml | 13 -- opam.ocaml.org/home.xhtml | 78 --------- opam.ocaml.org/link_blog_doc_ext.sh | 11 -- opam.ocaml.org/packages | 0 opam.ocaml.org/universe.xhtml | 27 ---- script/meetings.ml | 243 ---------------------------- script/ocamlapplet.bash | 31 ---- 7 files changed, 403 deletions(-) delete mode 100644 opam.ocaml.org/contact.xhtml delete mode 100644 opam.ocaml.org/home.xhtml delete mode 100755 opam.ocaml.org/link_blog_doc_ext.sh delete mode 100644 opam.ocaml.org/packages delete mode 100644 opam.ocaml.org/universe.xhtml delete mode 100644 script/meetings.ml delete mode 100755 script/ocamlapplet.bash diff --git a/opam.ocaml.org/contact.xhtml b/opam.ocaml.org/contact.xhtml deleted file mode 100644 index fce19b091..000000000 --- a/opam.ocaml.org/contact.xhtml +++ /dev/null @@ -1,13 +0,0 @@ -
-
-

Contact

- -
-
diff --git a/opam.ocaml.org/home.xhtml b/opam.ocaml.org/home.xhtml deleted file mode 100644 index d15f944f5..000000000 --- a/opam.ocaml.org/home.xhtml +++ /dev/null @@ -1,78 +0,0 @@ - - -
-

- -  OCaml Package Manager -

-
-

OPAM is a source-based package manager for OCaml. It supports multiple simultaneous - compiler installations, flexible package constraints, and a Git-friendly development - workflow. Managing your OCaml installation can be as simple as:

-
-opam list -a         # List the available packages
-opam install lwt     # Install LWT
-opam update          # Update the package list
-...
-opam upgrade         # Upgrade the installed packages to their latest version
-
-
-
- -
- - -
-
-

News

- -
-
-

Contribute

-

- - Report bugs and - ask for features in - the OPAM tool
- - Report packaging issues or - request new packages

-

- Address general queries on the tool and packages
- Discuss the tool internals
- Check the state of the packages
-

-
- - - -
-
- -
-
- - - -
-
diff --git a/opam.ocaml.org/link_blog_doc_ext.sh b/opam.ocaml.org/link_blog_doc_ext.sh deleted file mode 100755 index 24da82fd5..000000000 --- a/opam.ocaml.org/link_blog_doc_ext.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -set -ex - -BLOG=$1 -DOC=$2 -EXT=$3 - -ln -n -s -f "$BLOG" blog -ln -n -s -f "$DOC" doc -ln -n -s -f "$EXT" ext diff --git a/opam.ocaml.org/packages b/opam.ocaml.org/packages deleted file mode 100644 index e69de29bb..000000000 diff --git a/opam.ocaml.org/universe.xhtml b/opam.ocaml.org/universe.xhtml deleted file mode 100644 index bce821f00..000000000 --- a/opam.ocaml.org/universe.xhtml +++ /dev/null @@ -1,27 +0,0 @@ - -
-
- -
- -
- - - - - - - - - -
NameVersionDescription
-
diff --git a/script/meetings.ml b/script/meetings.ml deleted file mode 100644 index 642002a90..000000000 --- a/script/meetings.ml +++ /dev/null @@ -1,243 +0,0 @@ -(* file: meetings.ml - author: Philippe Wang - licence: ISC - date: 2014 - about: This small program was designed for the ocaml.org website. - depends on glical 0.0.3 (later versions might work) - glical: https://github.com/pw374/glical -*) - -let debug = false - -open Printf -open Glical -open Ical - - -let print_announcement out long_title href short_title date = - fprintf out - " -
  • -
    -

    %s

    -

    %s

    - -
    -
  • " - long_title - href - short_title - date - long_title - href - -let print_news out long_title href short_title date = - fprintf out - " -
  • -
    -

    %s

    -

    %s

    - News -
    -
  • " - long_title - href - short_title - date - long_title - href - - -let ( |> ) x f = f x - -let rec extract_vevents ical = - List.fold_left - (fun accu -> function - | Block (loc, "VEVENT", b) as e - when - (try - ignore - (List.find - (function - | Assoc(_, ("DTSTAMP"|"DTSTART"), _, _) -> true - | _ -> false) - b); - true - with Not_found -> false) - -> e::accu - | Block (_, _, b) -> extract_vevents b @ accu - | _ -> accu) - [] - ical - - -let sort_by_date ical = - let compare a b = match a, b with - | Assoc(_, _, _, v1), Assoc(_, _, _, v2) -> - begin match v1#value, v2#value with - | `Datetime d1, `Datetime d2 -> - Pervasives.compare d1 d2 - | _, `Datetime _ -> 1 - | `Datetime _, _ -> -1 - | _ -> compare a b - end - | _ -> compare a b - in - let module S = - Set.Make( - struct - type t = - [`Text of string list - | `Raw of string - | `Datetime of Datetime.t - ] Ical.element - let compare = compare - end) - in - let ls ical = - List.fold_left (fun accu e -> S.add e accu) S.empty ical - |> S.elements - in - let rec sort = function - | Block(loc, s, v)::tl -> - ls (Block(loc, s, sort v)::(sort tl)) - | (Assoc(loc, s, p, r) as e)::tl -> - ls (e::sort tl) - | [] -> [] - in sort ical - -let eprint_size ical = - if debug then eprintf "ical size: %d\n%!" (List.length ical); - ical - -let ical : - [`Datetime of Glical.Datetime.t - | `Raw of string - | `Text of string list ] Ical.t - = - channel_contents stdin - |> lex_ical - |> parse_ical |> eprint_size - |> extract_vevents |> eprint_size - |> Datetime.parse_datetime |> eprint_size - |> sort_by_date |> eprint_size - - - - -let htmlentities s = - let b = Buffer.create (String.length s * 2) in - let rec loop i = - if i = String.length s then - () - else - let () = - match s.[i] with - | ( '0' .. '9' | 'a' .. 'z' | 'A' .. 'Z' ) as c -> Buffer.add_char b c - | '"' -> Buffer.add_string b """ - | '\'' -> Buffer.add_string b "'" - | '&' -> Buffer.add_string b "&" - | '<' -> Buffer.add_string b "<" - | '>' -> Buffer.add_string b ">" - | c -> Buffer.add_char b c - in loop (succ i) - in - loop 0; - Buffer.contents b - - -let () = - List.iter - (function - | Block(_, _, e) -> - let summary = - try - match - List.find - (function - | Assoc(_, "SUMMARY", _, x) -> true - | _ -> false) - e - with - | Assoc(_, _, _, x) -> - String.concat " " (text_of_raw x#location x#to_string) - |> htmlentities - | _ -> failwith "SUMMARY" - with Not_found -> "summary missing" - in - let description = - try - match - List.find - (function - | Assoc(_, "DESCRIPTION", _, x) -> true - | _ -> false) - e - with - | Assoc(_, _, _, x) -> - String.concat " " (text_of_raw x#location x#to_string) - |> htmlentities - | _ -> failwith "DESCRIPTION" - with Not_found -> "description missing" - in - let url = - try - match - List.find - (function - | Assoc(_, "URL", _, x) -> true - | _ -> false) - e - with - | Assoc(_, _, _, x) -> - String.concat " " (text_of_raw x#location x#to_string) - |> htmlentities - | _ -> failwith "URL" - with Not_found -> "url missing" - in - let dtstamp = - try - match - List.find - (function - | Assoc(_, ("DTSTAMP"|"DTSTART"), _, x) -> true - | _ -> false) - e - with - | Assoc(_, _, _, dt) -> - begin let open Datetime in - match dt#value with - | `Datetime dt -> - sprintf "%s %d, %d" - (match dt.month with - | 1 -> "January" - | 2 -> "February" - | 3 -> "March" - | 4 -> "April" - | 5 -> "May" - | 6 -> "June" - | 7 -> "July" - | 8 -> "August" - | 9 -> "September" - | 10 -> "October" - | 11 -> "November" - | 12 -> "December" - | _ -> assert false - ) - dt.day - dt.year - | _ -> failwith "DTSTAMP|DTSTART" - end - | _ -> failwith "DTSTAMP|DTSTART" - with Not_found -> "date (DTSTAMP|DTSTART) missing" - in - print_news - stdout - description - url - summary - dtstamp - | _ -> () - ) - ical diff --git a/script/ocamlapplet.bash b/script/ocamlapplet.bash deleted file mode 100755 index 25a3ca88d..000000000 --- a/script/ocamlapplet.bash +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -function hash() { - cat | (md5 || md5sum) | sed -e 's| ./*||g' -} - -function id () { - if [[ "$1" != "" ]] - then - echo $1 - else - hash < $tmpfile.ml - fi -} - -tmpfile=$(date +tmp%Y%m%d%H%M%S%N)$RANDOM - -cat > $tmpfile.ml - -script/ocamltohtml < $tmpfile.ml > $tmpfile.html - -if [[ "$TRYOCAMLON" != "" ]] -then - e="$(./htmlescape < $tmpfile.ml)" - echo -n "[try]" >> $tmpfile.html -fi - -cat $tmpfile.html - -rm -f $tmpfile* - From 70b1beacaca1943d0adb740490f84b2efc80cd92 Mon Sep 17 00:00:00 2001 From: gurleennsidhuu <64313783+gurleennsidhuu@users.noreply.github.com> Date: Tue, 4 May 2021 22:53:29 +0530 Subject: [PATCH 2/2] restored files from opam.ocaml.org/. --- opam.ocaml.org/contact.xhtml | 13 ++++++ opam.ocaml.org/home.xhtml | 78 +++++++++++++++++++++++++++++++++++ opam.ocaml.org/packages | 0 opam.ocaml.org/universe.xhtml | 27 ++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 opam.ocaml.org/contact.xhtml create mode 100644 opam.ocaml.org/home.xhtml create mode 100644 opam.ocaml.org/packages create mode 100644 opam.ocaml.org/universe.xhtml diff --git a/opam.ocaml.org/contact.xhtml b/opam.ocaml.org/contact.xhtml new file mode 100644 index 000000000..fce19b091 --- /dev/null +++ b/opam.ocaml.org/contact.xhtml @@ -0,0 +1,13 @@ +
    +
    +

    Contact

    + +
    +
    diff --git a/opam.ocaml.org/home.xhtml b/opam.ocaml.org/home.xhtml new file mode 100644 index 000000000..d15f944f5 --- /dev/null +++ b/opam.ocaml.org/home.xhtml @@ -0,0 +1,78 @@ + + +
    +

    + +  OCaml Package Manager +

    +
    +

    OPAM is a source-based package manager for OCaml. It supports multiple simultaneous + compiler installations, flexible package constraints, and a Git-friendly development + workflow. Managing your OCaml installation can be as simple as:

    +
    +opam list -a         # List the available packages
    +opam install lwt     # Install LWT
    +opam update          # Update the package list
    +...
    +opam upgrade         # Upgrade the installed packages to their latest version
    +
    +
    +
    + +
    + + +
    +
    +

    News

    + +
    +
    +

    Contribute

    +

    + + Report bugs and + ask for features in + the OPAM tool
    + + Report packaging issues or + request new packages

    +

    + Address general queries on the tool and packages
    + Discuss the tool internals
    + Check the state of the packages
    +

    +
    + + + +
    +
    + +
    +
    + + + +
    +
    diff --git a/opam.ocaml.org/packages b/opam.ocaml.org/packages new file mode 100644 index 000000000..e69de29bb diff --git a/opam.ocaml.org/universe.xhtml b/opam.ocaml.org/universe.xhtml new file mode 100644 index 000000000..bce821f00 --- /dev/null +++ b/opam.ocaml.org/universe.xhtml @@ -0,0 +1,27 @@ + +
    +
    + +
    + +
    + + + + + + + + + +
    NameVersionDescription
    +