Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Jun 10, 2023
1 parent 5a841a5 commit ff37a26
Show file tree
Hide file tree
Showing 43 changed files with 526 additions and 380 deletions.
25 changes: 25 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"template": "https://github.com/sphinx-notes/template",
"commit": "202f9756fdd661ab195d20bb6926a9481ee1d78a",
"checkout": null,
"context": {
"cookiecutter": {
"namespace": "sphinxnotes",
"name": "snippet",
"full_name": "sphinxnotes-snippet",
"author": "Sphinx documentation snippets manager",
"description": "Sphinx documentation snippets manager",
"version": "1.0",
"github_owner": "sphinx-notes",
"github_repo": "snippet",
"pypi_name": "sphinxnotes-snippet",
"pypi_owner": "SilverRainZ",
"dependencies": [
"Sphinx >= 4"
],
"additional_docs": [],
"_template": "https://github.com/sphinx-notes/template"
}
},
"directory": null
}
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ dmypy.json
# Pyre type checker
.pyre/

# Sphinx
_build/
# Poetry
poetry.lock

# Neovim
.nvimlog
# Sphinx
docs/_build/
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2020, Sphinx Notes
Copyright (c) 2023, Sphinx documentation snippets manager
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11 changes: 11 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

include LICENSE
include README.rst

recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
36 changes: 21 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
LANG=en_US.UTF-8
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

LANG = en_US.UTF-8

MAKE = make
PY = python3
RM = rm -rf

.PHONY: docs
docs:
$(RM) docs/_build
$(MAKE) -C docs/

.PHONY: dist
dist: setup.py
$(RM) dist/ build/ *.egg-info/
$(PY) setup.py sdist bdist_wheel
$(PY) -m twine check dist/*
.PHONY: test
test:
$(PY) -m unittest discover -s tests -v

.PHONY: upload
upload: dist/
$(PY) -m twine upload --repository pypi $<*
.PHONY: dist
dist: pyproject.toml
$(RM) dist/ # clean up old dist
$(PY) -m build

.PHONY: install
install: dist
$(PY) -m pip install --user --no-deps --force-reinstall dist/*.whl

.PHONY: test
test:
$(PY) -m unittest -v
.PHONY: upload
upload: dist
$(PY) -m twine upload --repository pypi $</*

.PHONY: test-upload
test-upload: dist
$(PY) -m twine upload --repository testpypi $</*

cli:
$(PY) ./utils/cli.py --config utils/conf.py $(args)
.PHONY: update-template
update-template:
$(PY) -m cruft update
27 changes: 26 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
.. This file is generated from sphinx-notes/template.
You need to consider modifying the TEMPLATE or modifying THIS FILE.
===================
sphinxnotes-snippet
===================

Please refer to https://sphinx-notes.github.io/snippet/ for documentation.
.. image:: https://img.shields.io/github/actions/workflow/status/sphinx-notes/snippet/pages.yml
:target: https://sphinx.silverrainz.me/snippet
:alt: Documentation Status

.. image:: https://img.shields.io/github/license/sphinx-notes/snippet
:target: https://github.com/sphinx-notes/snippet/LICENSE
:alt: Open Source License

.. image:: https://img.shields.io/pypi/v/sphinxnotes-snippet.svg
:target: https://pypi.python.org/pypi/sphinxnotes-snippet
:alt: PyPI Package

.. image:: https://img.shields.io/pypi/dw/sphinxnotes-snippet
:target: https://pypi.python.org/pypi/sphinxnotes-snippet
:alt: PyPI Package Downloads

Sphinx documentation snippets manager.

* Documentation: https://sphinx.silverrainz.me/snippet
* Source: https://github.com/sphinx-notes/snippet
* Changelog: https://sphinx.silverrainz.me/snippet/changelog.html
* Tracker: https://github.com/sphinx-notes/snippet/issues
* Download: https://pypi.org/project/sphinxnotes-snippet/#files
11 changes: 6 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

# 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
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python3 -msphinx
SOURCEDIR = .
BUILDDIR = _build

Expand Down
Empty file added docs/_static/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions docs/_templates/version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. list-table::
:align: left

* - :ref:`📅 {{ date }} <any-version.date>`
- :tag:`{{ title }}`


{% for line in content %}
{{ line }}
{% endfor %}

63 changes: 63 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.. This file is generated from sphinx-notes/template.
You need to consider modifying the TEMPLATE or modifying THIS FILE.
==========
Change Log
==========

.. Example:
1.0.0
=====
.. version:: _
:date: yyyy-mm-dd
Change log here.
Version 1.x
===========

.. version:: 1.0
:date: 2021-09-09

The first stable version is out, enjoy~

Pre-release 1.x
===============

.. version:: 1.0b7
:date: 2021-08-14

- snippet: Add support for section
- integration: Drop snippet view support
- Complete document


.. version:: 1.0b2
:date: 2021-03-20

- Improve keywords extraction
- Speed up snippet dumping
- Code clean up

.. version:: 1.0b1
:date: 2021-02-28

- Refactor!!!
- Rename from sphinxnotes-khufu

.. version:: 1.0a1
:date: 2021-02-01

- Dont evaluate typing annoations on runtime
- Speed up snippet cache
- Speed up title path resolving
- Better tokenizer
- A lot of bug fixes
- Add config khufu_snippet_patterns

.. version:: 1.0a0
:date: 2021-01-29

The alpha version is out, enjoy~
38 changes: 0 additions & 38 deletions docs/changlog-pre1.rst

This file was deleted.

0 comments on commit ff37a26

Please sign in to comment.