GithubHelp home page GithubHelp logo

thorvaldaagaard / bridge-bidding-systems Goto Github PK

View Code? Open in Web Editor NEW

This project forked from enerqi/bridge-bidding-systems

0.0 0.0 0.0 1.18 MB

Bridge system notes in BML plus live reload workflow

License: MIT License

Python 16.93% Tcl 83.07%

bridge-bidding-systems's Introduction

Contract Bridge Bidding System

Bridge system notes written with BML. Html can be generated from the .bml files using the bml tools.

Workflow Setup

  • Download the BML tools and this repository.
  • Install Python v3 programming language, preferrably not system wide to make permissions easier and make sure Python 3 is added to PATH via the installer options.
  • Install doit from public Python packages repository: pip install --user doit If pip is not found then the Scripts directory needs adding to the PATH environment variable, e.g. the C:/Users/$MyUser/AppData/Roaming/Python/Python38/Scripts/ directory if Python 3.8 was installed. pip should be in there (using the correct MyUser replacement). The doit program will be installed to the same directory as pip.
  • Install watchexec as per the instructions and ensure it's in the PATH To install with cargo when you don't have cargo, use rustup to install the Rust tooling ecosystem. Otherwise use one of the other suggestions.

All the programs doit, python, and watchexec should be found from a command prompt (shell) at this point.

The bml tools should be specified by one of two ways:

  • downloaded to the dev/bml directory within your home (user) directory, e.g. C:/Users/MyUser/dev/bml
  • Setting an environment variable BML_TOOLS_DIRECTORY with the directory as the value

With those in place it should be possible to run a workflow that trys to build html files from your bridge bml files everytime you save changes to a bml file in this directory. Open a command prompt (shell) in this directory:

cd bridge-bidding-systems
watchexec --exts bml,css doit
  • Watchexec is now monitoring this directory for any file system changes to files with the extension .bml (or .css).
  • Whenever a change is found the doit program is run
  • doit looks at dodo.py and runs all the tasks in there.
  • the task_publish_main_bidding in dodo.py will probably fail unless you have a 'W:' windows volume, could be deleted. It's meant for continuously publishing the output to a webserver directory. Untried, but watchexec --exts bml,css doit ignore task_publish_main_bidding could be what is needed.

The dodo.py task automation program uses the bml2html.py python program found in the bml tools.

Live Web Page (HTML) View

So far, whenever a .bml file is saved, the html output is rebuilt. This can be viewed in a browser but normally you have to manually refresh the browser page to see any changes in the html as you are editing the bml file(s). There's probably a number of reasonable approaches to this. The most convenient for myself was to open this bridge-bidding-system directory in Visual Studio Code, install the Live Server extension for VSCode and open a generated html file with the live server (command Live Server: Open with Live Server). At that point any web browser can point to http://127.0.0.1:5500/ and you will see any viewed html file live reload as changes are made.

Comments on BML Tool Usage

The BML tools have my own changes applied to the main BML tools repository. E.g. the html files have a .html extension instead of .htm.

bridge-bidding-systems's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.