From a2920e8bdb3debe6ed4024a0fc1e089b7dc92bdd Mon Sep 17 00:00:00 2001 From: wes <378351+nisstyre56@users.noreply.github.com> Date: Mon, 5 Mar 2018 21:24:01 -0500 Subject: [PATCH] reorganize package --- .gitignore | 5 + .travis.yml | 61 ++++ LICENSE.txt | 11 + README.md | 3 + bolt.rkt | 65 ++++ doc/bolt/blueboxes.rktd | 2 + doc/bolt/in.sxref | Bin 0 -> 589 bytes doc/bolt/index.html | 2 + doc/bolt/out0.sxref | Bin 0 -> 1073 bytes doc/bolt/out1.sxref | Bin 0 -> 158 bytes doc/bolt/provides.sxref | Bin 0 -> 187 bytes doc/bolt/stamp.sxref | 1 + doc/bolt/synced.rktd | 0 doc/doc-site.css | 0 doc/doc-site.js | 0 doc/manual-fonts.css | 251 +++++++++++++ doc/manual-racket.css | 324 +++++++++++++++++ doc/manual-racket.js | 98 +++++ doc/manual-style.css | 770 ++++++++++++++++++++++++++++++++++++++++ doc/racket.css | 249 +++++++++++++ doc/scribble-common.js | 170 +++++++++ doc/scribble-style.css | 0 doc/scribble.css | 485 +++++++++++++++++++++++++ info.rkt | 11 + main.rkt | 4 + scribblings/bolt.scrbl | 10 + test.rkt | 31 ++ 27 files changed, 2553 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100755 bolt.rkt create mode 100644 doc/bolt/blueboxes.rktd create mode 100644 doc/bolt/in.sxref create mode 100644 doc/bolt/index.html create mode 100644 doc/bolt/out0.sxref create mode 100644 doc/bolt/out1.sxref create mode 100644 doc/bolt/provides.sxref create mode 100644 doc/bolt/stamp.sxref create mode 100644 doc/bolt/synced.rktd create mode 100644 doc/doc-site.css create mode 100644 doc/doc-site.js create mode 100644 doc/manual-fonts.css create mode 100644 doc/manual-racket.css create mode 100644 doc/manual-racket.js create mode 100644 doc/manual-style.css create mode 100644 doc/racket.css create mode 100644 doc/scribble-common.js create mode 100644 doc/scribble-style.css create mode 100644 doc/scribble.css create mode 100644 info.rkt create mode 100644 main.rkt create mode 100644 scribblings/bolt.scrbl create mode 100755 test.rkt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7c9eeed --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.swp +remote-shell +*~ +\#* +compiled diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f9d4cd0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,61 @@ +language: c + +# Based from: https://github.com/greghendershott/travis-racket + +# Optional: Remove to use Travis CI's older infrastructure. +sudo: false + +env: + global: + # Supply a global RACKET_DIR environment variable. This is where + # Racket will be installed. A good idea is to use ~/racket because + # that doesn't require sudo to install and is therefore compatible + # with Travis CI's newer container infrastructure. + - RACKET_DIR=~/racket + matrix: + # Supply at least one RACKET_VERSION environment variable. This is + # used by the install-racket.sh script (run at before_install, + # below) to select the version of Racket to download and install. + # + # Supply more than one RACKET_VERSION (as in the example below) to + # create a Travis-CI build matrix to test against multiple Racket + # versions. + - RACKET_VERSION=6.0 + - RACKET_VERSION=6.1 + - RACKET_VERSION=6.1.1 + - RACKET_VERSION=6.2 + - RACKET_VERSION=6.3 + - RACKET_VERSION=6.4 + - RACKET_VERSION=6.5 + - RACKET_VERSION=6.6 + - RACKET_VERSION=6.7 + - RACKET_VERSION=6.8 + - RACKET_VERSION=6.9 + - RACKET_VERSION=6.10 + - RACKET_VERSION=HEAD + +matrix: + allow_failures: +# - env: RACKET_VERSION=HEAD + fast_finish: true + +before_install: +- git clone https://github.com/greghendershott/travis-racket.git ~/travis-racket +- cat ~/travis-racket/install-racket.sh | bash # pipe to bash not sh! +- export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us + +install: + - raco pkg install --deps search-auto + +before_script: + +# Here supply steps such as raco make, raco test, etc. You can run +# `raco pkg install --deps search-auto` to install any required +# packages without it getting stuck on a confirmation prompt. +script: + - raco test -x -p bolt + +after_success: + - raco setup --check-pkg-deps --pkgs bolt + - raco pkg install --deps search-auto cover cover-coveralls + - raco cover -b -f coveralls -d $TRAVIS_BUILD_DIR/coverage . diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..7ce7bad --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,11 @@ +bolt +Copyright (c) 2018 wes + +This package is distributed under the GNU Lesser General Public +License (LGPL). This means that you can link bolt into proprietary +applications, provided you follow the rules stated in the LGPL. You +can also modify this package; if you distribute a modified version, +you must distribute it under the terms of the LGPL, which in +particular means that you must release the source code for the +modified software. See http://www.gnu.org/copyleft/lesser.html +for more information. diff --git a/README.md b/README.md new file mode 100644 index 0000000..810b014 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +bolt +==== +README text here. diff --git a/bolt.rkt b/bolt.rkt new file mode 100755 index 0000000..ba7f0c6 --- /dev/null +++ b/bolt.rkt @@ -0,0 +1,65 @@ +#lang racket + +(require remote-shell/ssh) + +(define cwd + (make-parameter "~")) + +(define host + (make-parameter #f)) + +(define user + (make-parameter #f)) + +(define commands + (make-parameter #f)) + +(define-syntax-rule + (plan expr ...) + (parameterize + ([commands (list)]) + (begin expr ...))) + +(define-syntax-rule + (with-cwd dir expr ...) + (parameterize + ([cwd (format "~a/~a" (cwd) dir)]) + (begin expr ...))) + +(define-syntax-rule + (with-host remote expr ...) + (parameterize + ([host remote]) + (begin expr ...))) + +(define-syntax-rule + (become username expr ...) + (parameterize + ([user username]) + (begin expr ...))) + +(define (as-user cmd) + (if + (user) + (format "sudo -u ~a sh -c \"~a\"" + (user) + cmd) + cmd)) + +(define (exec cmd) + (displayln + (format "on ~a:" (remote-host (host)))) + (ssh (host) + (as-user + (string-append + (format "cd ~a && " + (cwd)) + cmd)))) + +(define ((make-cmd cmd)) (exec cmd)) + +(define ls (make-cmd "ls")) +(define pwd (make-cmd "pwd")) + +(provide + (all-defined-out) remote) diff --git a/doc/bolt/blueboxes.rktd b/doc/bolt/blueboxes.rktd new file mode 100644 index 0000000..255e69a --- /dev/null +++ b/doc/bolt/blueboxes.rktd @@ -0,0 +1,2 @@ +33 +((3) 0 () 0 () () (h ! (equal))) diff --git a/doc/bolt/in.sxref b/doc/bolt/in.sxref new file mode 100644 index 0000000000000000000000000000000000000000..06c154d5a9fc3fe9d76630bebbcb95d2ed8b705d GIT binary patch literal 589 zcmaJ+O;5r=5M7oQEhd%&ih+xU1LdnwTHAPP(C9DlN~PUSrJ+FCR$@H(7YP5@?FvGO zy2-qKGxK)lZT(X)Rc-K$emOZ-%L2W#*eFu@W0TK`;XH}^jS?!M3&&|oqxJZSETRZV znuuo!p`qtR;rulbB?E)IpVycO=765BlC%ex#q9NQdQ o9Gh5Rn)_fuXPoVPX2}UY9bpNwk8Jsx@n$i@7RNTn4##fs3llzmsQ>@~ literal 0 HcmV?d00001 diff --git a/doc/bolt/index.html b/doc/bolt/index.html new file mode 100644 index 0000000..c821480 --- /dev/null +++ b/doc/bolt/index.html @@ -0,0 +1,2 @@ + +bolt
bolt
6.12

bolt

wes

 (require bolt) package: bolt

Package Description Here

 
\ No newline at end of file diff --git a/doc/bolt/out0.sxref b/doc/bolt/out0.sxref new file mode 100644 index 0000000000000000000000000000000000000000..5a79622ef25a4760b4365bf3347c6cc6b5eb32de GIT binary patch literal 1073 zcmaiyO>fgc5QaDF#BCgqS_vcwt!NaXe6HPc;LwZtkRl<0kf0K$B(>LDvdY@)t~V9w zfxl4YpYju!wUd%2LHJ;gX5M+`-5oc7mEX8$uP@M!=P~3;2$j(@R7Xwp3VG-ZoudKz zf-cZ^DE_t(dM9{jA0B2@@h}w3qf#+fO|?%4R0_eU&iq+re^vMWK`bMZ272<5ClUKe zSfbT@pf#bBKxOaKK2JUUWCYCHv@T#q=gR z79>?NWlD3FnenBQh-FOiK=4~ecycArX_k>7in!)7AvdQv5VZd-fW_F2MjL*|6NB@XE8)qH%rglW5~1jf40f+& zTb7pTs8fTnc)!R&2&KM%U2*b*y5_&CUM;f|zcKv4uHn9@>8a*v0-lQIJh<$Rd$!|z zo$Ajr`ULx1fYQNx?QtIpwhe`E^LUjsKGw!#Ye-gTldfT_aMW3wV0!XV<9-d|E;PA$ h(}uc-ADQx!17WWUFV~^)CPmFe%jC{+8-P}!{R5#699{qb literal 0 HcmV?d00001 diff --git a/doc/bolt/out1.sxref b/doc/bolt/out1.sxref new file mode 100644 index 0000000000000000000000000000000000000000..5c216167a60d0509fd73b7ac73db816c594d986a GIT binary patch literal 158 zcmY$cV=>b+GzwwB0vLf}Ak0t-#1l0*MXDw;GqPsp6&Dz&3or;Uh{nZfb0)`XX~g!& zIp$<0u}Mi4Cl_TVCFP{*7p3Nn`4=A`Nt<>!~^mKmsXawgg*$EkDMXV@#oI;R$vCguPDVT&g> literal 0 HcmV?d00001 diff --git a/doc/bolt/provides.sxref b/doc/bolt/provides.sxref new file mode 100644 index 0000000000000000000000000000000000000000..d4edd49d267ebf1511dbfb225314bc18c02e603a GIT binary patch literal 187 zcmY$cV=>b+GzwwB0@#3Jj0_B{44MoE43-S8KyC*RI~61rm9Qx)YUE@lDJ13Rl;{^H z7iA_T, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +************** End Fira license *********************/ + + diff --git a/doc/manual-racket.css b/doc/manual-racket.css new file mode 100644 index 0000000..dc00431 --- /dev/null +++ b/doc/manual-racket.css @@ -0,0 +1,324 @@ +/* See the beginning of "manual.css". */ + +/* Monospace: */ + +.RktIn, .RktRdr, .RktPn, .RktMeta, +.RktMod, .RktKw, .RktVar, .RktSym, +.RktRes, .RktOut, .RktCmt, .RktVal, +.RktBlk, .RktErr { + font-family: 'Fira-Mono', monospace; + white-space: inherit; + font-size: 1rem; + line-height: 1.5; + +} + +/* this selctor grabs the first linked Racket symbol +in a definition box (i.e., the symbol being defined) */ +a.RktValDef, a.RktStxDef, a.RktSymDef, +span.RktValDef, span.RktStxDef, span.RktSymDef +{ + font-size: 1.1rem; + color: black; + font-weight: 500; +} + + +.inheritedlbl { + font-family: 'Fira', sans-serif; +} + +.RBackgroundLabelInner { + font-family: inherit; +} + +/* ---------------------------------------- */ +/* Inherited methods, left margin */ + +.inherited { + width: 95%; + margin-top: 0.5em; + text-align: left; + background-color: inherit; +} + +.inherited td { + font-size: 82%; + padding-left: 0.5rem; + line-height: 1.3; + text-indent: 0; + padding-right: 0; +} + +.inheritedlbl { + font-style: normal; +} + +/* ---------------------------------------- */ +/* Racket text styles */ + +.RktIn { + color: #cc6633; + background-color: #eee; +} + +.RktInBG { + background-color: #eee; +} + + +.refcolumn .RktInBG { + background-color: white; +} + +.RktRdr { +} + +.RktPn { + color: #843c24; +} + +.RktMeta { + color: black; +} + +.RktMod { + color: inherit; +} + +.RktOpt { + color: black; +} + +.RktKw { + color: black; +} + +.RktErr { + color: red; + font-style: italic; + font-weight: 400; +} + +.RktVar { + position: relative; + left: -1px; font-style: italic; + color: #444; +} + +.SVInsetFlow .RktVar { + font-weight: 400; + color: #444; +} + + +.RktSym { + color: inherit; +} + + + +.RktValLink, .RktStxLink, .RktModLink { + text-decoration: none; + color: #07A; + font-size: 1rem; +} + +/* for syntax links within headings */ +h2 a.RktStxLink, h3 a.RktStxLink, h4 a.RktStxLink, h5 a.RktStxLink, +h2 a.RktValLink, h3 a.RktValLink, h4 a.RktValLink, h5 a.RktValLink, +h2 .RktSym, h3 .RktSym, h4 .RktSym, h5 .RktSym, +h2 .RktMod, h3 .RktMod, h4 .RktMod, h5 .RktMod, +h2 .RktVal, h3 .RktVal, h4 .RktVal, h5 .RktVal, +h2 .RktPn, h3 .RktPn, h4 .RktPn, h5 .RktPn { + color: #333; + font-size: 1.50rem; + font-weight: 400; +} + +.toptoclink .RktStxLink, .toclink .RktStxLink, +.toptoclink .RktValLink, .toclink .RktValLink, +.toptoclink .RktModLink, .toclink .RktModLink { + color: inherit; +} + +.tocset .RktValLink, .tocset .RktStxLink, .tocset .RktModLink, .tocset .RktSym { + color: black; + font-weight: 400; + font-size: 0.9rem; +} + +.tocset td a.tocviewselflink .RktValLink, +.tocset td a.tocviewselflink .RktStxLink, +.tocset td a.tocviewselflink .RktMod, +.tocset td a.tocviewselflink .RktSym { + font-weight: lighter; + color: white; +} + + +.RktRes { + color: #0000af; +} + +.RktOut { + color: #960096; +} + +.RktCmt { + color: #c2741f; +} + +.RktVal { + color: #228b22; +} + +/* ---------------------------------------- */ +/* Some inline styles */ + +.together { /* for definitions grouped together in one box */ + width: 100%; + border-top: 2px solid white; +} + +tbody > tr:first-child > td > .together { + border-top: 0px; /* erase border on first instance of together */ +} + +.RktBlk { + white-space: pre; + text-align: left; +} + +.highlighted { + font-size: 1rem; + background-color: #fee; +} + +.defmodule { + font-family: 'Fira-Mono', monospace; + padding: 0.25rem 0.75rem 0.25rem 0.5rem; + margin-bottom: 1rem; + width: 100%; + background-color: #ebf0f4; +} + +.defmodule a { + color: #444; +} + + +.defmodule td span.hspace:first-child { + position: absolute; + width: 0; + display: inline-block; +} + +.defmodule .RpackageSpec .Smaller, +.defmodule .RpackageSpec .stt { + font-size: 1rem; +} + +/* make parens ordinary color in defmodule */ +.defmodule .RktPn { + color: inherit; +} + +.specgrammar { + float: none; + padding-left: 1em; +} + + +.RBibliography td { + vertical-align: text-top; + padding-top: 1em; +} + +.leftindent { + margin-left: 2rem; + margin-right: 0em; +} + +.insetpara { + margin-left: 1em; + margin-right: 1em; +} + +.SCodeFlow .Rfilebox { + margin-left: -1em; /* see 17.2 of guide, module languages */ +} + +.Rfiletitle { + text-align: right; + background-color: #eee; +} + +.SCodeFlow .Rfiletitle { + border-top: 1px dotted gray; + border-right: 1px dotted gray; +} + + +.Rfilename { + border-top: 0; + border-right: 0; + padding-left: 0.5em; + padding-right: 0.5em; + background-color: inherit; +} + +.Rfilecontent { + margin: 0.5em; +} + +.RpackageSpec { + padding-right: 0; +} + +/* ---------------------------------------- */ +/* For background labels */ + +.RBackgroundLabel { + float: right; + width: 0px; + height: 0px; +} + +.RBackgroundLabelInner { + position: relative; + width: 25em; + left: -25.5em; + top: 0.20rem; /* sensitive to monospaced font choice */ + text-align: right; + z-index: 0; + font-weight: 300; + font-family: 'Fira-Mono', monospace; + font-size: 0.9rem; + color: gray; +} + + +.RpackageSpec .Smaller { + font-weight: 300; + font-family: 'Fira-Mono', monospace; + font-size: 0.9rem; +} + +.RForeground { + position: relative; + left: 0px; + top: 0px; + z-index: 1; +} + +/* ---------------------------------------- */ +/* For section source modules & tags */ + +.RPartExplain { + background: #eee; + font-size: 0.9rem; + margin-top: 0.2rem; + padding: 0.2rem; + text-align: left; +} diff --git a/doc/manual-racket.js b/doc/manual-racket.js new file mode 100644 index 0000000..203d6d3 --- /dev/null +++ b/doc/manual-racket.js @@ -0,0 +1,98 @@ +/* For the Racket manual style */ + +AddOnLoad(function() { + /* Look for header elements that have x-source-module and x-part tag. + For those elements, add a hidden element that explains how to + link to the section, and set the element's onclick() to display + the explanation. */ + var tag_names = ["h1", "h2", "h3", "h4", "h5"]; + for (var j = 0; j < tag_names.length; j++) { + elems = document.getElementsByTagName(tag_names[j]); + for (var i = 0; i < elems.length; i++) { + var elem = elems.item(i); + AddPartTitleOnClick(elem); + } + } +}) + +function AddPartTitleOnClick(elem) { + var mod_path = elem.getAttribute("x-source-module"); + var tag = elem.getAttribute("x-part-tag"); + if (mod_path && tag) { + // Might not be present: + var prefixes = elem.getAttribute("x-part-prefixes"); + + var info = document.createElement("div"); + info.className = "RPartExplain"; + + /* The "top" tag refers to a whole document: */ + var is_top = (tag == "\"top\""); + info.appendChild(document.createTextNode("Link to this " + + (is_top ? "document" : "section") + + " with ")); + + /* Break `secref` into two lines if the module path and tag + are long enough: */ + var is_long = (is_top ? false : ((mod_path.length + + tag.length + + (prefixes ? (16 + prefixes.length) : 0)) + > 60)); + + var line1 = document.createElement("div"); + var line1x = ((is_long && prefixes) ? document.createElement("div") : line1); + var line2 = (is_long ? document.createElement("div") : line1); + + function add(dest, str, cn) { + var s = document.createElement("span"); + s.className = cn; + s.style.whiteSpace = "nowrap"; + s.appendChild(document.createTextNode(str)); + dest.appendChild(s); + } + /* Construct a `secref` call with suitable syntax coloring: */ + add(line1, "\xA0@", "RktRdr"); + add(line1, (is_top ? "other-doc" : "secref"), "RktSym"); + add(line1, "[", "RktPn"); + if (!is_top) + add(line1, tag, "RktVal"); + if (is_long) { + /* indent additional lines: */ + if (prefixes) + add(line1x, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0", "RktPn"); + add(line2, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0", "RktPn"); + } + if (prefixes) { + add(line1x, " #:tag-prefixes ", "RktPn"); + add(line1x, "'", "RktVal"); + add(line1x, prefixes, "RktVal"); + } + if (!is_top) + add(line2, " #:doc ", "RktPn"); + add(line2, "'", "RktVal"); + add(line2, mod_path, "RktVal"); + add(line2, "]", "RktPn"); + + info.appendChild(line1); + if (is_long) + info.appendChild(line1x); + if (is_long) + info.appendChild(line2); + + info.style.display = "none"; + + /* Add the new element afterthe header: */ + var n = elem.nextSibling; + if (n) + elem.parentNode.insertBefore(info, n); + else + elem.parentNode.appendChild(info); + + /* Clicking the header shows the explanation element: */ + elem.onclick = function () { + if (info.style.display == "none") + info.style.display = "block"; + else + info.style.display = "none"; + } + } +} diff --git a/doc/manual-style.css b/doc/manual-style.css new file mode 100644 index 0000000..074addb --- /dev/null +++ b/doc/manual-style.css @@ -0,0 +1,770 @@ + +/* See the beginning of "scribble.css". + This file is used by the `scribble/manual` language, along with + "manual-racket.css". */ + +@import url("manual-fonts.css"); + +* { + margin: 0; + padding: 0; +} + +@media all {html {font-size: 15px;}} +@media all and (max-width:940px){html {font-size: 14px;}} +@media all and (max-width:850px){html {font-size: 13px;}} +@media all and (max-width:830px){html {font-size: 12px;}} +@media all and (max-width:740px){html {font-size: 11px;}} + +/* CSS seems backward: List all the classes for which we want a + particular font, so that the font can be changed in one place. (It + would be nicer to reference a font definition from all the places + that we want it.) + + As you read the rest of the file, remember to double-check here to + see if any font is set. */ + +/* Monospace: */ +.maincolumn, .refpara, .refelem, .tocset, .stt, .hspace, .refparaleft, .refelemleft { + font-family: 'Fira-Mono', monospace; + white-space: inherit; + font-size: 1rem; +} + +/* embolden the "Racket Guide" and "Racket Reference" links on the TOC */ +/* there isn't an obvious tag in the markup that designates the top TOC page, which is called "start.scrbl" */ +/* nor a tag that designates these two links as special */ +/* so we'll use this slightly tortured sibling selector that hooks onto the h2 tag */ +h2[x-source-module='(lib "scribblings/main/start.scrbl")'] ~ table a[href="guide/index.html"], +h2[x-source-module='(lib "scribblings/main/start.scrbl")'] ~ table a[href="reference/index.html"] { + font-weight: bold; +} + + +h2 .stt { + font-size: 2.3rem; + /* prevent automatic bolding from h2 */ + font-weight: 400; +} + +.toptoclink .stt { + font-size: inherit; +} +.toclink .stt { + font-size: 90%; +} + +.RpackageSpec .stt { + font-weight: 300; + font-family: 'Fira-Mono', monospace; + font-size: 0.9rem; +} + +h3 .stt, h4 .stt, h5 .stt { + color: #333; + font-size: 1.65rem; + font-weight: 400; +} + + +/* Serif: */ +.main, .refcontent, .tocview, .tocsub, .sroman, i { + font-family: 'Charter-Racket', serif; + font-size: 1.18rem; +/* Don't use font-feature-settings with Charter, +it fouls up loading for reasons mysterious */ +/* font-feature-settings: 'tnum' 1, 'liga' 0; */ +} + + +/* Sans-serif: */ +.version, .versionNoNav, .ssansserif { + font-family: 'Fira', sans-serif; +} + +/* used mostly for DrRacket menu commands */ +.ssansserif { + font-family: 'Fira', sans-serif; + font-size: 0.9em; +} + +.tocset .ssansserif { + font-size: 100%; +} + +/* ---------------------------------------- */ + +p, .SIntrapara { + display: block; + margin: 0 0 1em 0; + line-height: 1.4; +} + +.compact { + padding: 0 0 1em 0; +} + +li { + list-style-position: outside; + margin-left: 1.2em; +} + +h1, h2, h3, h4, h5, h6, h7, h8 { + font-family: 'Fira', sans-serif; + font-weight: 300; + font-size: 1.6rem; + color: #333; + margin-top: inherit; + margin-bottom: 1rem; + line-height: 1.25; + +} + +h3, h4, h5, h6, h7, h8 { + border-top: 1px solid black; +} + + + +h2 { /* per-page main title */ + font-family: 'Cooper-Hewitt'; + margin-top: 4rem; + font-size: 2.3rem; + font-weight: bold; + line-height: 1.2; + width: 90%; + /* a little nudge to make text visually lower than 4rem rule in left margin */ + position: relative; + top: 6px; +} + +h3, h4, h5, h6, h7, h8 { + margin-top: 2em; + padding-top: 0.1em; + margin-bottom: 0.75em; +} + +/* ---------------------------------------- */ +/* Main */ + +body { + color: black; + background-color: white; +} + +.maincolumn { + width: auto; + margin-top: 4rem; + margin-left: 17rem; + margin-right: 2rem; + margin-bottom: 10rem; /* to avoid fixed bottom nav bar */ + max-width: 700px; + min-width: 370px; /* below this size, code samples don't fit */ +} + +a { + text-decoration: inherit; +} + +a, .toclink, .toptoclink, .tocviewlink, .tocviewselflink, .tocviewtoggle, .plainlink, +.techinside, .techoutside:hover, .techinside:hover { + color: #07A; +} + +a:hover { + text-decoration: underline; +} + + +/* ---------------------------------------- */ +/* Navigation */ + +.navsettop, .navsetbottom { + left: 0; + width: 15rem; + height: 6rem; + font-family: 'Fira', sans-serif; + font-size: 0.9rem; + border-bottom: 0px solid hsl(216, 15%, 70%); + background-color: inherit; + padding: 0; +} + +.navsettop { + position: absolute; + top: 0; + left: 0; + margin-bottom: 0; + border-bottom: 0; +} + +.navsettop a, .navsetbottom a { + color: black; +} + +.navsettop a:hover, .navsetbottom a:hover { + background: hsl(216, 78%, 95%); + text-decoration: none; +} + +.navleft, .navright { + position: static; + float: none; + margin: 0; + white-space: normal; +} + + +.navleft a { + display: inline-block; +} + +.navright a { + display: inline-block; + text-align: center; +} + +.navleft a, .navright a, .navright span { + display: inline-block; + padding: 0.5rem; + min-width: 1rem; +} + + +.navright { + height: 2rem; + white-space: nowrap; +} + + +.navsetbottom { + display: none; +} + +.nonavigation { + color: #889; +} + +.searchform { + display: block; + margin: 0; + padding: 0; + border-bottom: 1px solid #eee; + height: 4rem; +} + +.nosearchform { + margin: 0; + padding: 0; + height: 4rem; +} + +.searchbox { + font-size: 0.9rem; + width: 12rem; + margin: 1rem; + padding: 0.25rem 0.4rem ; + vertical-align: middle; + background-color: white; + font-family: 'Fira-Mono', monospace; +} + + +#search_box { + font-family: 'Fira-Mono', monospace; + font-size: 1rem; + padding: 0.25rem 0.3rem ; +} + +/* Default to local view. Global will specialize */ +.plt_global_only { display: none; } +.plt_local_only { display: block; } + +/* ---------------------------------------- */ +/* Version */ + +.versionbox { + position: absolute; + float: none; + top: 0.25rem; + left: 17rem; + z-index: 11000; + height: 2em; + font-size: 70%; + font-weight: lighter; + width: inherit; + margin: 0; +} +.version, .versionNoNav { + font-size: inherit; +} +.version:before, .versionNoNav:before { + content: "v."; +} + + +/* ---------------------------------------- */ +/* Margin notes */ + +/* cancel scribble.css styles: */ +.refpara, .refelem { + position: static; + float: none; + height: auto; + width: auto; + margin: 0; +} + +.refcolumn { + position: static; + display: block; + width: auto; + font-size: inherit; + margin: 2rem; + margin-left: 2rem; + padding: 0.5em; + padding-left: 0.75em; + padding-right: 1em; + background: hsl(60, 29%, 94%); + border: 1px solid #ccb; + border-left: 0.4rem solid #ccb; +} + + +/* slightly different handling for margin-note* on narrow screens */ +@media all and (max-width:1340px) { + span.refcolumn { + float: right; + width: 50%; + margin-left: 1rem; + margin-bottom: 0.8rem; + margin-top: 1.2rem; + } + +} + +.refcontent, .refcontent p { + line-height: 1.5; + margin: 0; +} + +.refcontent p + p { + margin-top: 1em; +} + +.refcontent a { + font-weight: 400; +} + +.refpara, .refparaleft { + top: -1em; +} + + +@media all and (max-width:600px) { + .refcolumn { + margin-left: 0; + margin-right: 0; + } +} + + +@media all and (min-width:1340px) { + .refcolumn { + margin: 0 -22.5rem 1rem 0; + float: right; + clear: right; + width: 18rem; + } +} + +.refcontent { + font-family: 'Fira', sans-serif; + font-size: 1rem; + line-height: 1.6; + margin: 0 0 0 0; +} + + +.refparaleft, .refelemleft { + position: relative; + float: left; + right: 2em; + height: 0em; + width: 13em; + margin: 0em 0em 0em -13em; +} + +.refcolumnleft { + background-color: hsl(60, 29%, 94%); + display: block; + position: relative; + width: 13em; + font-size: 85%; + border: 0.5em solid hsl(60, 29%, 94%); + margin: 0 0 0 0; +} + + +/* ---------------------------------------- */ +/* Table of contents, left margin */ + +.tocset { + position: absolute; + float: none; + left: 0; + top: 0rem; + width: 14rem; + padding: 7rem 0.5rem 0.5rem 0.5rem; + background-color: hsl(216, 15%, 70%); + margin: 0; + +} + +.tocset td { + vertical-align: text-top; + padding-bottom: 0.4rem; + padding-left: 0.2rem; + line-height: 1.1; + font-family: 'Fira', sans-serif; +} + +.tocset td a { + color: black; + font-weight: 400; +} + + +.tocview { + text-align: left; + background-color: inherit; +} + + +.tocview td, .tocsub td { + line-height: 1.3; +} + + +.tocview table, .tocsub table { + width: 90%; +} + +.tocset td a.tocviewselflink { + font-weight: lighter; + font-size: 110%; /* monospaced styles below don't need to enlarge */ + color: white; +} + +.tocviewselflink { + text-decoration: none; +} + +.tocsub { + text-align: left; + margin-top: 0.5em; + background-color: inherit; +} + +.tocviewlist, .tocsublist { + margin-left: 0.2em; + margin-right: 0.2em; + padding-top: 0.2em; + padding-bottom: 0.2em; +} +.tocviewlist table { + font-size: 82%; +} + +.tocviewlisttopspace { + margin-bottom: 1em; +} + +.tocviewsublist, .tocviewsublistonly, .tocviewsublisttop, .tocviewsublistbottom { + margin-left: 0.4em; + border-left: 1px solid #99a; + padding-left: 0.8em; +} +.tocviewsublist { + margin-bottom: 1em; +} +.tocviewsublist table, +.tocviewsublistonly table, +.tocviewsublisttop table, +.tocviewsublistbottom table, +table.tocsublist { + font-size: 1rem; +} + +.tocviewsublist td, +.tocviewsublistbottom td, +.tocviewsublisttop td, +.tocsub td, +.tocviewsublistonly td { + font-size: 90%; +} + +/* shrink the monospaced text (`stt`) within nav */ +.tocviewsublist td .stt, +.tocviewsublistbottom td .stt, +.tocviewsublisttop td .stt, +.tocsub td .stt, +.tocviewsublistonly td .stt { + font-size: 95%; +} + + +.tocviewtoggle { + font-size: 75%; /* looks better, and avoids bounce when toggling sub-sections due to font alignments */ +} + +.tocsublist td { + padding-left: 0.5rem; + padding-top: 0.25rem; + text-indent: 0; +} + +.tocsublinknumber { + font-size: 100%; +} + +.tocsublink { + font-size: 82%; + text-decoration: none; +} + +.tocsubseclink { + font-size: 100%; + text-decoration: none; +} + +.tocsubnonseclink { + font-size: 82%; + text-decoration: none; + margin-left: 1rem; + padding-left: 0; + display: inline-block; +} + +/* the label "on this page" */ +.tocsubtitle { + display: block; + font-size: 62%; + font-family: 'Fira', sans-serif; + font-weight: bolder; + font-style: normal; + letter-spacing: 2px; + text-transform: uppercase; + margin: 0.5em; +} + +.toptoclink { + font-weight: bold; + font-size: 110%; + margin-bottom: 0.5rem; + margin-top: 1.5rem; + display: inline-block; +} + +.toclink { + font-size: inherit; +} + +/* ---------------------------------------- */ +/* Some inline styles */ + +.indexlink { + text-decoration: none; +} + +pre { + margin-left: 2em; +} + +blockquote { + margin-left: 2em; + margin-right: 2em; + margin-bottom: 1em; +} + +.SCodeFlow { + border-left: 1px dotted black; + padding-left: 1em; + padding-right: 1em; + margin-top: 1em; + margin-bottom: 1em; + margin-left: 0em; + margin-right: 2em; + white-space: nowrap; + line-height: 1.5; +} + +.SCodeFlow img { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +/* put a little air between lines of code sample */ +/* Fira Mono appears taller than Source Code Pro */ +.SCodeFlow td { + padding-bottom: 1px; +} + +.boxed { + margin: 0; + margin-top: 2em; + padding: 0.25em; + padding-top: 0.3em; + padding-bottom: 0.4em; + background: #f3f3f3; + box-sizing:border-box; + border-top: 1px solid #99b; + background: hsl(216, 78%, 95%); + background: -moz-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); + background: -webkit-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); + background: -o-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); + background: -ms-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); + background: linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); +} + +blockquote > blockquote.SVInsetFlow { +/* resolves issue in e.g. /reference/notation.html */ + margin-top: 0em; +} + +.leftindent .SVInsetFlow { /* see e.g. section 4.5 of Racket Guide */ + margin-top: 1em; + margin-bottom: 1em; +} + +.SVInsetFlow a, .SCodeFlow a { + color: #07A; +} + +.SubFlow { + display: block; + margin: 0em; +} + +.boxed { + width: 100%; + background-color: inherit; +} + +.techoutside { text-decoration: none; } + +.SAuthorListBox { + position: static; + float: none; + font-family: 'Fira', sans-serif; + font-weight: 300; + font-size: 110%; + margin-top: 1rem; + margin-bottom: 2rem; + width: 30rem; + height: auto; +} + +.author > a { /* email links within author block */ + font-weight: inherit; + color: inherit; +} + +.SAuthorList { + font-size: 82%; +} +.SAuthorList:before { + content: "by "; +} +.author { + display: inline; + white-space: nowrap; +} + +/* phone + tablet styles */ + +@media all and (max-width:720px){ + + + @media all and (max-width:720px){ + + @media all {html {font-size: 15px;}} + @media all and (max-width:700px){html {font-size: 14px;}} + @media all and (max-width:630px){html {font-size: 13px;}} + @media all and (max-width:610px){html {font-size: 12px;}} + @media all and (max-width:550px){html {font-size: 11px;}} + @media all and (max-width:520px){html {font-size: 10px;}} + + .navsettop, .navsetbottom { + display: block; + position: absolute; + width: 100%; + height: 4rem; + border: 0; + background-color: hsl(216, 15%, 70%); + } + + .searchform { + display: inline; + border: 0; + } + + .navright { + position: absolute; + right: 1.5rem; + margin-top: 1rem; + border: 0px solid red; + } + + .navsetbottom { + display: block; + margin-top: 8rem; + } + + .tocset { + display: none; + } + + .tocset table, .tocset tbody, .tocset tr, .tocset td { + display: inline; + } + + .tocview { + display: none; + } + + .tocsub .tocsubtitle { + display: none; + } + + .versionbox { + top: 4.5rem; + left: 1rem; /* same distance as main-column */ + z-index: 11000; + height: 2em; + font-size: 70%; + font-weight: lighter; + } + + + .maincolumn { + margin-left: 1em; + margin-top: 7rem; + margin-bottom: 0rem; + } + + } + +} + +/* print styles : hide the navigation elements */ +@media print { + .tocset, + .navsettop, + .navsetbottom { display: none; } + .maincolumn { + width: auto; + margin-right: 13em; + margin-left: 0; + } +} diff --git a/doc/racket.css b/doc/racket.css new file mode 100644 index 0000000..b44fef5 --- /dev/null +++ b/doc/racket.css @@ -0,0 +1,249 @@ + +/* See the beginning of "scribble.css". */ + +/* Monospace: */ +.RktIn, .RktRdr, .RktPn, .RktMeta, +.RktMod, .RktKw, .RktVar, .RktSym, +.RktRes, .RktOut, .RktCmt, .RktVal, +.RktBlk { + font-family: monospace; + white-space: inherit; +} + +/* Serif: */ +.inheritedlbl { + font-family: serif; +} + +/* Sans-serif: */ +.RBackgroundLabelInner { + font-family: sans-serif; +} + +/* ---------------------------------------- */ +/* Inherited methods, left margin */ + +.inherited { + width: 100%; + margin-top: 0.5em; + text-align: left; + background-color: #ECF5F5; +} + +.inherited td { + font-size: 82%; + padding-left: 1em; + text-indent: -0.8em; + padding-right: 0.2em; +} + +.inheritedlbl { + font-style: italic; +} + +/* ---------------------------------------- */ +/* Racket text styles */ + +.RktIn { + color: #cc6633; + background-color: #eeeeee; +} + +.RktInBG { + background-color: #eeeeee; +} + +.RktRdr { +} + +.RktPn { + color: #843c24; +} + +.RktMeta { + color: black; +} + +.RktMod { + color: black; +} + +.RktOpt { + color: black; +} + +.RktKw { + color: black; +} + +.RktErr { + color: red; + font-style: italic; +} + +.RktVar { + color: #262680; + font-style: italic; +} + +.RktSym { + color: #262680; +} + +.RktSymDef { /* used with RktSym at def site */ +} + +.RktValLink { + text-decoration: none; + color: blue; +} + +.RktValDef { /* used with RktValLink at def site */ +} + +.RktModLink { + text-decoration: none; + color: blue; +} + +.RktStxLink { + text-decoration: none; + color: black; +} + +.RktStxDef { /* used with RktStxLink at def site */ +} + +.RktRes { + color: #0000af; +} + +.RktOut { + color: #960096; +} + +.RktCmt { + color: #c2741f; +} + +.RktVal { + color: #228b22; +} + +/* ---------------------------------------- */ +/* Some inline styles */ + +.together { + width: 100%; +} + +.prototype, .argcontract, .RBoxed { + white-space: nowrap; +} + +.prototype td { + vertical-align: text-top; +} + +.RktBlk { + white-space: inherit; + text-align: left; +} + +.RktBlk tr { + white-space: inherit; +} + +.RktBlk td { + vertical-align: baseline; + white-space: inherit; +} + +.argcontract td { + vertical-align: text-top; +} + +.highlighted { + background-color: #ddddff; +} + +.defmodule { + width: 100%; + background-color: #F5F5DC; +} + +.specgrammar { + float: right; +} + +.RBibliography td { + vertical-align: text-top; +} + +.leftindent { + margin-left: 1em; + margin-right: 0em; +} + +.insetpara { + margin-left: 1em; + margin-right: 1em; +} + +.Rfilebox { +} + +.Rfiletitle { + text-align: right; + margin: 0em 0em 0em 0em; +} + +.Rfilename { + border-top: 1px solid #6C8585; + border-right: 1px solid #6C8585; + padding-left: 0.5em; + padding-right: 0.5em; + background-color: #ECF5F5; +} + +.Rfilecontent { + margin: 0em 0em 0em 0em; +} + +.RpackageSpec { + padding-right: 0.5em; +} + +/* ---------------------------------------- */ +/* For background labels */ + +.RBackgroundLabel { + float: right; + width: 0px; + height: 0px; +} + +.RBackgroundLabelInner { + position: relative; + width: 25em; + left: -25.5em; + top: 0px; + text-align: right; + color: white; + z-index: 0; + font-weight: bold; +} + +.RForeground { + position: relative; + left: 0px; + top: 0px; + z-index: 1; +} + +/* ---------------------------------------- */ +/* History */ + +.SHistory { + font-size: 82%; +} diff --git a/doc/scribble-common.js b/doc/scribble-common.js new file mode 100644 index 0000000..1ec7da5 --- /dev/null +++ b/doc/scribble-common.js @@ -0,0 +1,170 @@ +// Common functionality for PLT documentation pages + +// Page Parameters ------------------------------------------------------------ + +var page_query_string = location.search.substring(1); + +var page_args = + ((function(){ + if (!page_query_string) return []; + var args = page_query_string.split(/[&;]/); + for (var i=0; i= 0) args[i] = [a.substring(0,p), a.substring(p+1)]; + else args[i] = [a, false]; + } + return args; + })()); + +function GetPageArg(key, def) { + for (var i=0; i= 0 && cur.substring(0,eql) == key) + return unescape(cur.substring(eql+1)); + } + return def; + } +} + +function SetCookie(key, val) { + try { + localStorage[key] = val; + } catch(e) { + var d = new Date(); + d.setTime(d.getTime()+(365*24*60*60*1000)); + try { + document.cookie = + key + "=" + escape(val) + "; expires="+ d.toGMTString() + "; path=/"; + } catch (e) {} + } +} + +// note that this always stores a directory name, ending with a "/" +function SetPLTRoot(ver, relative) { + var root = location.protocol + "//" + location.host + + NormalizePath(location.pathname.replace(/[^\/]*$/, relative)); + SetCookie("PLT_Root."+ver, root); +} + +// adding index.html works because of the above +function GotoPLTRoot(ver, relative) { + var u = GetCookie("PLT_Root."+ver, null); + if (u == null) return true; // no cookie: use plain up link + // the relative path is optional, default goes to the toplevel start page + if (!relative) relative = "index.html"; + location = u + relative; + return false; +} + +// Utilities ------------------------------------------------------------------ + +var normalize_rxs = [/\/\/+/g, /\/\.(\/|$)/, /\/[^\/]*\/\.\.(\/|$)/]; +function NormalizePath(path) { + var tmp, i; + for (i = 0; i < normalize_rxs.length; i++) + while ((tmp = path.replace(normalize_rxs[i], "/")) != path) path = tmp; + return path; +} + +// `noscript' is problematic in some browsers (always renders as a +// block), use this hack instead (does not always work!) +// document.write(""); + +// Interactions --------------------------------------------------------------- + +function DoSearchKey(event, field, ver, top_path) { + var val = field.value; + if (event && event.keyCode == 13) { + var u = GetCookie("PLT_Root."+ver, null); + if (u == null) u = top_path; // default: go to the top path + u += "search/index.html?q=" + encodeURIComponent(val); + u = MergePageArgsIntoUrl(u); + location = u; + return false; + } + return true; +} + +function TocviewToggle(glyph, id) { + var s = document.getElementById(id).style; + var expand = s.display == "none"; + s.display = expand ? "block" : "none"; + glyph.innerHTML = expand ? "▼" : "►"; +} + +// Page Init ------------------------------------------------------------------ + +// Note: could make a function that inspects and uses window.onload to chain to +// a previous one, but this file needs to be required first anyway, since it +// contains utilities for all other files. +var on_load_funcs = []; +function AddOnLoad(fun) { on_load_funcs.push(fun); } +window.onload = function() { + for (var i=0; i + .techinside doesn't work with IE, so use both (and IE doesn't + work with inherit in the second one, so use blue directly) */ +.techinside { color: black; } +.techinside:hover { color: blue; } +.techoutside:hover>.techinside { color: inherit; } + +.SCentered { + text-align: center; +} + +.imageleft { + float: left; + margin-right: 0.3em; +} + +.Smaller { + font-size: 82%; +} + +.Larger { + font-size: 122%; +} + +/* A hack, inserted to break some Scheme ids: */ +.mywbr { + display: inline-block; + height: 0; + width: 0; + font-size: 1px; +} + +.compact li p { + margin: 0em; + padding: 0em; +} + +.noborder img { + border: 0; +} + +.SAuthorListBox { + position: relative; + float: right; + left: 2em; + top: -2.5em; + height: 0em; + width: 13em; + margin: 0em -13em 0em 0em; +} +.SAuthorList { + font-size: 82%; +} +.SAuthorList:before { + content: "by "; +} +.author { + display: inline; + white-space: nowrap; +} + +/* print styles : hide the navigation elements */ +@media print { + .tocset, + .navsettop, + .navsetbottom { display: none; } + .maincolumn { + width: auto; + margin-right: 13em; + margin-left: 0; + } +} diff --git a/info.rkt b/info.rkt new file mode 100644 index 0000000..650d7eb --- /dev/null +++ b/info.rkt @@ -0,0 +1,11 @@ +#lang info +(define collection "bolt") +(define deps '("base" + "rackunit-lib" + "remote-shell")) + +(define build-deps '("scribble-lib" "racket-doc")) +(define scribblings '(("scribblings/bolt.scrbl" ()))) +(define pkg-desc "Description Here") +(define version "0.0") +(define pkg-authors '(wes)) diff --git a/main.rkt b/main.rkt new file mode 100644 index 0000000..e979ff7 --- /dev/null +++ b/main.rkt @@ -0,0 +1,4 @@ +#lang racket/base + +(require "bolt.rkt") +(provide (all-from-out "bolt.rkt")) diff --git a/scribblings/bolt.scrbl b/scribblings/bolt.scrbl new file mode 100644 index 0000000..394c880 --- /dev/null +++ b/scribblings/bolt.scrbl @@ -0,0 +1,10 @@ +#lang scribble/manual +@require[@for-label[bolt + racket/base]] + +@title{bolt} +@author{wes} + +@defmodule[bolt] + +Package Description Here diff --git a/test.rkt b/test.rkt new file mode 100755 index 0000000..5aca1e7 --- /dev/null +++ b/test.rkt @@ -0,0 +1,31 @@ +#! /usr/bin/env racket +#lang racket + +(require bolt) + +(define linode + (remote + #:host "linode" + #:user "wes" + #:key "/home/wes/.ssh/id_rsa.key")) + +(define (test) + (with-cwd "gforth" + (exec "sudo whoami") + (with-cwd "src" + (pwd) + (ls) + (with-cwd "gforth-0.7.3" + (ls)))) + (pwd) + (exec "cat /etc/passwd") + (become "http" (ls))) + +; This is based on an entry in ~/.ssh/config +(with-host linode + (become "root" + (become "http" + (pwd) + (exec "ls /etc")) + (pwd)) + (pwd))