Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #64 from tubone24/doc_example
Browse files Browse the repository at this point in the history
Doc example
  • Loading branch information
tubone24 committed Apr 21, 2019
2 parents 5e64b7c + 856f5f8 commit 572a737
Show file tree
Hide file tree
Showing 247 changed files with 4,907 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ exclude_paths:
- db/**/*
- tests/**/*
- docs/**/*
- doc_src/**/*
- doc_src/**/*
- examples/web_gui/ebook_homebrew_webUI/vendors/**/*
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ script:
- python setup.py install
- coverage run --source=ebook_homebrew -m pytest --it
- coverage report -m
- black ebook_homebrew setup.py --check

after_success:
- codecov
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ Changelog
=======================================================================================

* Rename to digit filename a little bit speedy for using asyncio
* More Testcase(Windows)
* More Testcase(Windows)

`v2.0.0 <https://github.com/tubone24/ebook_homebrew/releases/tag/v2.0.0>`_ (2019-04-20)
=======================================================================================

* Rest API Interface.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ test-report:
coverage report -m
coverage html

pypi-upload-test:
twine upload --repository testpypi dist/*

pypi-upload:
twine upload --repository pypi dist/*

.PHONY: all
5 changes: 5 additions & 0 deletions doc_src/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ Making Zip by digit files
-------------------------

Make zip file for files which you choose extension.

Provides Rest API
-----------------

Provides Rest API interfaces.
30 changes: 30 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM centos:centos7
MAINTAINER tubone24 <tubo.yyyuuu@gmail.com>

## install util
RUN yum -y update \
&& yum -y install \
epel-release \
gcc \
git \
vim \
which \
&& yum clean all

# https://www.python.jp/install/centos/index.html
RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
RUN yum install -y \
python36u \
python36u-devel \
python36u-pip \
&& yum clean all \
&& ln -sf /usr/bin/python3.6 /usr/bin/python3 \
&& ln -sf /usr/bin/pip3.6 /usr/bin/pip3 \
&& pip3 install --upgrade pip

RUN mkdir /app
RUN cd /app && git clone https://github.com/tubone24/ebook_homebrew.git
WORKDIR /app/ebook_homebrew
RUN pip3 install -r requirements.txt
RUN python3 setup.py install
CMD ebookhomebrew api -p 8080
343 changes: 343 additions & 0 deletions docs/_modules/ebook_homebrew/rest.html

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/_sources/ebook_homebrew.cmd.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ebook\_homebrew.commands package
===========================

Submodules
----------

ebook\_homebrew.commands.cli module
------------------------------

.. automodule:: ebook_homebrew.commands.cli
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: ebook_homebrew.commands
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/_sources/ebook_homebrew.commands.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ebook\_homebrew.commands package
================================

Submodules
----------

ebook\_homebrew.commands.cli module
-----------------------------------

.. automodule:: ebook_homebrew.commands.cli
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: ebook_homebrew.commands
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/_sources/releasenotes/2.0.0.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
2.0.0
=====

API Server
----------

* REST API Server interface
154 changes: 154 additions & 0 deletions docs/_static/cloud.base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/* ~~~~~~~~~~~~~~
* cloud.base.js
*~~~~~~~~~~~~~~
*
* Base JS utils needed by cloud js instrumentation.
* Split out so they can be used by theme-independant extensions (e.g. auto_redirect)
*
* This initializes a "window.CSP.utils" object
*
* :copyright: Copyright 2017 by Assurance Technologies
* :license: BSD
*/

// begin encapsulation
(function (window, $, _) {

/*==========================================================================
* internal helpers
*==========================================================================*/
var location = document.location,
// hosturl is url to root of host, without trailing '/'
// NOTE: regex allows netloc segment to be empty, to support 'file:///' urls
hosturl = location.href.match(/^[a-z0-9]+:(?:\/\/)?(?:[^@/]*@)?[^/]*/)[0],
docpath = location.pathname,
sphinx = window.DOCUMENTATION_OPTIONS;

/*==========================================================================
* utils
*==========================================================================*/
var utils = {

/*==========================================================================
* url helpers
*==========================================================================*/

// helper to generate an absolute url path from a relative one.
// absolute paths passed through unchanged.
// paths treated as relative to <base>,
// if base is omitted, uses directory of current document.
abspath: function (path, base) {
var parts = path.split("/"),
stack = [];
if (parts[0]) {
// if path is relative, put base on stack
stack = (base || location.pathname).split("/");
// remove blank from leading '/'
if (!stack[0]) {
stack.shift();
}
// discard filename & blank from trailing '/'
if (stack.length && !(base && stack[stack.length - 1])) {
stack.pop();
}
}
for (var i = 0; i < parts.length; ++i) {
if (parts[i] && parts[i] != '.') {
if (parts[i] == '..') {
stack.pop();
} else {
stack.push(parts[i]);
}
}
}
return "/" + stack.join("/");
},

// return subpath of url, if it starts with base ("" or non-empty string)
// returns undefined if url doesn't start with base.
// base url search params & fragments are ignored.
getSubUrl: function(url, base){
base = base.replace(/(?:\/|[#?].*)$/, '');
if(url.startsWith(base)) {
var suffix = url.slice(base.length);
if(suffix == '' || suffix.match(/^[/#?]/)){ return suffix; }
}
return;
},

// helper to normalize urls for comparison
// * strips current document's scheme, host, & path from local document links (just fragment will be left)
// * strips current document's scheme & host from internal urls (just path + fragment will be left)
// * makes all internal url paths absolute
// * external urls returned unchanged.
shortenUrl: function(url) {
if (!url){
return "";
} else if (url.indexOf(hosturl) == 0) {
// absolute path to same host
url = url.substr(hosturl.length) || '/';
} else if (url[0] == '.') {
// relative path
url = utils.abspath(url);
} else if (!url.match(/^[/#?]|[a-z0-9]+:/)) {
// not abs path, or fragment, or query, or uri:// --
// another page in current dir
url = utils.abspath('./' + url);
}

if (url.indexOf(docpath) == 0) {
// strip current doc's url; only thing left will be e.g. #anchor
url = url.substr(docpath.length);
}
if (url == "#" || url == "#top") {
// normalize to empty string
url = "";
}
return url;
},

// url w/ query params & hash stripped
baseUrl: function(url){
return utils.shortenUrl(url).replace(/[#?].*$/, '');
}
};

/*==========================================================================
* misc es5 polyfills
*==========================================================================*/
var StrProto = String.prototype;
if (!StrProto.startsWith) {
StrProto.startsWith = function(search, pos){
return this.substr(pos || 0, search.length) === search;
};
}

/*==========================================================================
* jquery patches
*==========================================================================*/

// custom helper to toggle visibility
$.fn.toggleVis = function (state){
if(state) { this.show(); } else { this.hide(); }
return this;
};

/*==========================================================================
* initialize namespace
*==========================================================================*/

window.CST = window.CloudSphinxTheme = {
// url to root of host, without trailing "/"
hosturl: hosturl,
// path to root of document dir, without trailing "/" or index.html
rootpath: sphinx && utils.abspath(sphinx.URL_ROOT || ""),
utils: utils
};

/*==========================================================================
* eof
*==========================================================================*/

// end encapsulation
// NOTE: sphinx provides underscore.js as $u
}(window, jQuery, $u));

0 comments on commit 572a737

Please sign in to comment.