Skip to content

Commit

Permalink
[#7] Add read the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-tessier committed May 10, 2020
1 parent e7d1b2a commit ce4b14a
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 0 deletions.
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, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
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)
52 changes: 52 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'holiday_jp-python'
copyright = '202x, Luxeys'
author = 'Luxeys'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
66 changes: 66 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.. holiday_jp-python documentation master file, created by
sphinx-quickstart on Mon Apr 27 22:13:42 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to holiday_jp-python's documentation!
=============================================

.. toctree::
:maxdepth: 2
:caption: Contents:



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


$project
========

$project is simple and easy to use, based on a curated list of official holiday.

Basic usage:

from holiday_jp import HolidayJp
# with string date format YYYY-MM-DD
if HolidayJp('1990-01-01').is_holiday:
print('True')

Features
--------

- Support strings date format or date object.
- Return holidays between 2 dates.
- Get holiday by month and by year.
- More to come :-)

Installation
------------

Install $project by running:

pip3 install holiday-jp

Contribute
----------

- Issue Tracker: github.com/LUXEYS/$project/issues
- Source Code: github.com/LUXEYS/$project

Support
-------

If you have issues, please let us know.
Open an issue: https://github.com/LUXEYS/holiday_jp-python/issues/new
日本語でも大丈夫です。

License
-------

The project is licensed under the MIT license.
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Binary file added holiday_jp/holiday_jp.srctrlbm
Binary file not shown.
Binary file added holiday_jp/holiday_jp.srctrldb
Binary file not shown.
19 changes: 19 additions & 0 deletions holiday_jp/holiday_jp.srctrlprj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<source_groups>
<source_group_8d29c25d-f8c9-41bb-b185-a7b6e754cd6f>
<name>Python Source Group</name>
<source_extensions>
<source_extension>.py</source_extension>
</source_extensions>
<source_paths>
<source_path>holiday_jp.py</source_path>
<source_path>holidays.py</source_path>
<source_path>test.py</source_path>
</source_paths>
<status>enabled</status>
<type>Python Source Group</type>
</source_group_8d29c25d-f8c9-41bb-b185-a7b6e754cd6f>
</source_groups>
<version>8</version>
</config>

0 comments on commit ce4b14a

Please sign in to comment.