Skip to content

Commit

Permalink
update README and re-organize Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
siongui committed Dec 29, 2016
1 parent 424c3e6 commit fd5249f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
29 changes: 17 additions & 12 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ endif
SCSSDIR=theme/styling
WEBSITE_DIR=website
WEBSITE_JSON_DIR=$(WEBSITE_DIR)/json
PRODUCTION_DIR=src/github.com/siongui/pali-dictionary
PRODUCTION_GITHUB_REPO=github.com/siongui/pali-dictionary
PRODUCTION_DIR=src/$(PRODUCTION_GITHUB_REPO)
LOCALE_DIR=../common/locale

DATA_REPO_DIR=$(CURDIR)/data
Expand All @@ -31,10 +32,7 @@ devserver: html js scss
@echo "\033[92mDevelopment Server Running ...\033[0m"
@go run server.go

production:
@echo "\033[92mClone Remote Repo ...\033[0m"
rm -rf $(PRODUCTION_DIR)
git clone https://github.com/siongui/pali-dictionary.git $(PRODUCTION_DIR)
production: clone_production_github_repo
@echo "\033[92mGenerating HTML ...\033[0m"
mkdir $(PRODUCTION_DIR)/output
go run setup/setuppath.go setup/html.go > $(PRODUCTION_DIR)/output/index.html
Expand Down Expand Up @@ -98,16 +96,9 @@ clone_pali_data:
@#git clone https://github.com/siongui/data.git $(DATA_REPO_DIR)
@git clone https://github.com/siongui/data.git $(DATA_REPO_DIR) --depth=1

download_go:
@echo "\033[92mDownloading and Installing Go ...\033[0m"
@cd ../../ ;wget https://storage.googleapis.com/golang/go$(GO_VERSION).linux-amd64.tar.gz
@cd ../../ ; tar xvzf go$(GO_VERSION).linux-amd64.tar.gz

install: lib_pali lib_opencc lib_go_libsass lib_succinct_trie lib_ime_pali lib_gopherjs_i18n lib_gettext_go lib_gopherjs lib_gopherjs_utils lib_gopherjs_input_suggest

update_ubuntu:
@echo "\033[92mUpdating Ubuntu ...\033[0m"
@sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

lib_gopherjs:
@echo "\033[92mInstalling GopherJS ...\033[0m"
Expand Down Expand Up @@ -189,3 +180,17 @@ clean:

uninstall_libopencc-dev:
sudo dpkg -r libopencc-dev

update_ubuntu:
@echo "\033[92mUpdating Ubuntu ...\033[0m"
@sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

download_go:
@echo "\033[92mDownloading and Installing Go ...\033[0m"
@cd ../../ ; wget https://storage.googleapis.com/golang/go$(GO_VERSION).linux-amd64.tar.gz
@cd ../../ ; tar xvzf go$(GO_VERSION).linux-amd64.tar.gz

clone_production_github_repo:
@echo "\033[92mClone $(PRODUCTION_GITHUB_REPO) ...\033[0m"
rm -rf $(PRODUCTION_DIR)
git clone https://$(PRODUCTION_GITHUB_REPO).git $(PRODUCTION_DIR) --depth=1
9 changes: 8 additions & 1 deletion go/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
Re-implementation of `Pāli Dictionary`_ and `Pāli Tipiṭaka`_ in Go_ programming
language.

Development Environment: `Ubuntu 16.04`_/`Ubuntu 16.10`_ and `Go 1.7`_.
Development Environment:

- `Ubuntu 16.04`_ / `Ubuntu 16.10`_
- `Go 1.7`_


Set Up Development Environment
++++++++++++++++++++++++++++++


1. `git clone`_ the `pali repository`_ and `data repository`_:

.. code-block:: bash
Expand All @@ -28,6 +32,7 @@ Set Up Development Environment
# git clone data repository
$ make clone_pali_data
2. Update Ubuntu and install following packages:

- Go_
Expand Down Expand Up @@ -101,6 +106,8 @@ References
.. [2] `siongui/data: Data files for Pāḷi Tipiṭaka, Pāḷi Dictionaries, and external libraries <https://github.com/siongui/data>`_
.. [3] `old implementation of Pāli Dictionary <http://dictionary.sutta.org/>`_
.. _Pāli Dictionary: https://siongui.github.io/pali-dictionary/
.. _Pāli Tipiṭaka: http://tipitaka.sutta.org/
Expand Down

0 comments on commit fd5249f

Please sign in to comment.