Skip to content

Commit

Permalink
update download tipitaka
Browse files Browse the repository at this point in the history
  • Loading branch information
siongui committed Oct 22, 2023
1 parent 1f7a9e4 commit 7081cfd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ test_extract_one_dic: fmt
test_tipitaka: test_build_tpk_tree

test_download_tpk: fmt
@echo "\033[92mTesting download Tipiṭaka xml from https://www.tipitaka.org/romn/ ...\033[0m"
@cd tpkutil; go test -v downloadtpk.go downloadtpk_test.go
@echo "\033[92mTesting download Tipiṭaka xml from https://tipitaka.org/romn/ ...\033[0m"
@cd tpkutil; go test -timeout=300m -v downloadtpk.go downloadtpk_test.go

clone_tpk_xml:
@echo "\033[92mClone Tipiṭaka XML repo ...\033[0m"
Expand Down
2 changes: 1 addition & 1 deletion tpkutil/downloadtpk.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func DownloadTipitaka(dir string, overwrite bool) (err error) {
// observation:
// 1. All meaningful node has attribute 'text'
// 2. node with 'action' attribute is leaf
urlPrefix := "https://www.tipitaka.org/romn/"
urlPrefix := "https://tipitaka.org/romn/"
rootTocXmlSrc := "tipitaka_toc.xml"

err = GetAllXml(urlPrefix, rootTocXmlSrc, dir, overwrite)
Expand Down
2 changes: 1 addition & 1 deletion tpkutil/downloadtpk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

func TestDownloadTipitaka(t *testing.T) {
//err := DownloadTipitaka("/tmp/tpkxml/", false)
err := GetAllXml("https://www.tipitaka.org/romn/", "cscd/vin01m.mul.toc.xml", "/tmp/tpkxml/", false)
err := GetAllXml("https://tipitaka.org/romn/", "cscd/vin01m.mul.toc.xml", "/tmp/tpkxml/", false)
if err != nil {
t.Error(err)
return
Expand Down

0 comments on commit 7081cfd

Please sign in to comment.