Skip to content

Commit

Permalink
Migrate documentation to ReadTheDocs
Browse files Browse the repository at this point in the history
And make some (minor) improvements in the process.
  • Loading branch information
danhunsaker committed Jul 24, 2018
1 parent 6c24a31 commit 536cef5
Show file tree
Hide file tree
Showing 39 changed files with 3,715 additions and 412 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ build/
core*
!core*.sh
*~
.build/
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ after_success:
cd ${TRAVIS_BUILD_DIR}
./build-all
go get github.com/aktau/github-release
github-release info --user danhunsaker --repo calends --tag ${TRAVIS_TAG} ||
github-release info --user danhunsaker --repo calends --tag ${TRAVIS_TAG} || \
github-release release --user danhunsaker --repo calends --tag ${TRAVIS_TAG} --draft
for archive in $(find dist/ -iname '*.tgz')
do
Expand Down
420 changes: 46 additions & 374 deletions README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions boxfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ run.config:
engine.config:
runtime: php-7.1
extensions:
- json
- xml
- zephir_parser
extra_packages:
- go
- autoconf
- re2c
- py27-pip
cache_dirs:
- .gopath
extra_path_dirs:
Expand All @@ -23,6 +25,10 @@ run.config:
ln -sfT /app /app/.gopath/src/github.com/danhunsaker/calends
cd /app/.gopath/src/github.com/danhunsaker/calends
go get -t -v ./...
- |
# Set up Sphinx documentation support
pip install --upgrade pip
pip install -I -r requirements.txt
- |
# Install Zephir
cd /data
Expand Down
1 change: 1 addition & 0 deletions calendars/stardate.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Supported Format Strings:
this one was attributed to Major Tom, and hosted as a Wolfram
Alpha widget.
- sto-anthodev - Another STO variant, hosted on GitHub.
*/
package calendars

Expand Down
10 changes: 5 additions & 5 deletions calends.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (c *Calends) UnmarshalText(text []byte) error {
"end": endTime,
}, "tai64", "tai64naxur")

c = &tmp
*c = tmp

return err
}
Expand Down Expand Up @@ -338,17 +338,17 @@ func (c *Calends) UnmarshalJSON(text []byte) error {
if err == nil {
err = startTime.UnmarshalText([]byte(parsed["start"]))
if err != nil {
return errors.New("(*Calends).UnmarshalJSON [convert start time " + parsed["start"] + "]: " + err.Error())
return errors.New("JSON decode failure while parsing start time [" + parsed["start"] + "]: " + err.Error())
}

err = endTime.UnmarshalText([]byte(parsed["end"]))
if err != nil {
return errors.New("(*Calends).UnmarshalJSON [convert end time " + parsed["end"] + "]: " + err.Error())
return errors.New("JSON decode failure while parsing end time [" + parsed["end"] + "]: " + err.Error())
}
} else {
err = startTime.UnmarshalText([]byte(strings.Trim(string(text), `"`)))
if err != nil {
return errors.New("(*Calends).UnmarshalJSON [convert time " + strings.Trim(string(text), `"`) + "]: " + err.Error())
return errors.New("JSON decode failure while parsing time [" + strings.Trim(string(text), `"`) + "]: " + err.Error())
}

endTime = startTime
Expand All @@ -362,7 +362,7 @@ func (c *Calends) UnmarshalJSON(text []byte) error {
*c = temp

if err != nil {
err = errors.New("(*Calends).UnmarshalJSON [set values]: " + err.Error())
err = errors.New("JSON decode failure while setting values: " + err.Error())
}

return err
Expand Down
Empty file added docs/.static/.gitkeep
Empty file.
Empty file added docs/.templates/.gitkeep
Empty file.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = Calends
SOURCEDIR = .
BUILDDIR = .build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Loading

0 comments on commit 536cef5

Please sign in to comment.