Giter Club home page Giter Club logo

nmdm_book's Introduction

Numeracy, Modelling and Data Management

This book is written in support of a course offered to PhD students within the University of Edinburgh’s School of GeoSciences and across the Edinburgh E3 Doctoral Training Partnership.

1. How To generate the book

You will need to have Ruby installed on your computer, as well as RubyGems. You can learn how to install these in the appendices of this book (which you should be able to read in a text editor or on Github).

You then should install the ruby package bundler using

$ gem install bundler

You also need to clone the files into the directory of your choice from Github. Once you have bundler installed, you can build the book with:

$ bundler install
$ bundle exec rake book:build

This will build html and pdf versions of the book.

You can also build an html only version:

$ bundler install
$ bundle exec rake book:build_html
Warning
The build process will make a folder called images in the root directory, which on some systems must be deleted before new builds.

1.1. Quick build asciidoctor

You can also quickly generate the document by installing asciidoctor, and then running it on the LSDTT_Book.asc file:

$ gem install asciidoctor
$ asciidoctor NMDM.asc
Warning
This quick generation will give you the text and cross-linking, but the images will not be linked. For images to be properly linked you need to run bundle exec (see above).

2. If you are making changes to this book

You can ignore this unless you are helping write the book and have push permission.

I (SMM) do not want any messy merging conflicts! To avoid this please keep the master and gh-pages seperate on your computer!

  1. When checking out the code, check them out into two directories:

    $ git clone https://github.com/simon-m-mudd/NMDM_book.git master
    $ git clone https://github.com/simon-m-mudd/NMDM_book.git gh-pages
  2. In the gh-pages directory, check out the gh-pages branch and get rid of the master branch:

    $ cd gh-pages
    $ git checkout origin/gh-pages -b gh-pages
    $ git branch -d master
  3. Now, go back to the master branch, you can make changes there.

  4. When you commit changes to the master branch and you want to update the website, commit and push changes, then run bundle:

    $ pwd
    my/path/to/repo/NMDM_book/master/
    $ git commit -m "My latest commit" .
    $ git push -u origin master
    $ bundle exec rake book:build_html
  5. Now copy any new image files to the /images folder in the gh-pages branch (you will need to git add them), and rename NMDM.html to index.html and copy to the gh-pages folder.

    $ pwd
    my/path/to/repo/NMDM_book/gh-pages/
    $ cd images
    $ git add <filenames of new images>
    $ cd ..
    $ git commit "updating website" .
  6. Now push the changes to the gh-pages branch

    $ bundle exec rake book:build_html

    $ pwd
    my/path/to/repo/NMDM_book/gh-pages/
    $ git push -u origin gh-pages

nmdm_book's People

Contributors

simon-m-mudd avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

geoben93 majek49

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.