These are some notes about QGIS. If you just want to look at the notes, go to the website: http://simon-m-mudd.github.io/QGIS_book
The files here are the source files for the website. If for some reason you want to make this book on your own computer, you will meed to install ruby, rubygems and bundler to get it working.
Install the ruby package bundler
using
$ gem install bundler
Note
|
Ig you just want to read about QGIS, you don’t need to do any of this stuff. Just go to the website. |
We will use bundler, which manages asciidoctor and a a bunch of other stuff, to turn these files into pdf and html. The template files do this work for you so all you need to do to egt started is install ruby, rubygems and bundler and then clone this repository 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. This is a particular problem on Windows systems, where sometimes windows will stupidly not let you delete the thumbs.db file it automatically generates. To get around this, right click on the images directory and unselect read only , then you should be able to delete the folder. In general, however, as long as you do not look in the images directory you will not have this problem.
|
Note
|
You can ignore this unless you are helping write the template and have push permission. Currently this applies to nobody so they are more notes for myself to remember how I set up this repository. |
I do not want any messy merging conflicts! To avoid this please keep the master and gh-pages separate on your computer!
-
When checking out the code, check them out into two directories:
$ git clone https://github.com/simon-m-mudd/QGIS_book.git master $ git clone https://github.com/simon-m-mudd/QGIS_book.git gh-pages
-
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
-
Now, go back to the master branch, you can make changes there.
-
When you commit changes to the master branch and you want to update the website, commit and push changes, then run bundle:
$ git commit -m "My latest commit" . $ git push -u origin master $ bundle exec rake book:build_html
-
Now copy any new image files to the /images folder in the gh-pages branch (you will need to git add them), and rename QGIS_book.html to index.html and copy to the gh-pages folder.
$ cd images $ git add <filenames of new images> $ cd .. $ git commit "updating website" .
-
Now push the changes to the gh-pages branch
$ bundle exec rake book:build_html
$ git push -u origin gh-pages