Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vn-ki committed Oct 9, 2018
1 parent e7ae503 commit 3cf009a
Show file tree
Hide file tree
Showing 13 changed files with 783 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ name = "pypi"
anime-downloader = {editable = true, path = "."}

[dev-packages]
sphinx = "*"
sphinx-rtd-theme = "*"
159 changes: 154 additions & 5 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions anime_downloader/sites/anime.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
anime.py contains the base classes required for other anime classes.
"""
import requests
from bs4 import BeautifulSoup

Expand All @@ -13,7 +16,31 @@
from anime_downloader.extractors import get_extractor
from anime_downloader.downloader import get_downloader


class BaseAnime:
"""
Base class for all anime classes.
Parameters
----------
url: string
URL of the anime.
quality: One of ['360p', '480p', '720p', '1080p']
Quality of episodes
fallback_qualities: list
The order of fallback.
Attributes
----------
sitename: string
name of the site
title: string
Title of the anime
meta: dict
metadata about the anime. [Can be empty]
QUALITIES: list
Possible qualities for the site
"""
sitename = ''
title = ''
meta = dict()
Expand All @@ -23,6 +50,12 @@ class BaseAnime:

@classmethod
def search(cls, query):
"""
Search searches for the anime using the query given.
query :
query is
"""
return

def __init__(self, url=None, quality='720p',
Expand Down
19 changes: 19 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
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)
3 changes: 3 additions & 0 deletions docs/advanced/custom_site.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Writing your own custom site class
**********************************

7 changes: 7 additions & 0 deletions docs/api/anime.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Base classes
************

.. automodule:: anime_downloader.sites.anime

.. autoclass:: anime_downloader.sites.anime.BaseAnime
:members: search

0 comments on commit 3cf009a

Please sign in to comment.