Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"template": "https://github.com/sphinx-notes/template",
"commit": "251643b4d04376494409369c91f29ca047687a5d",
"commit": "a829f105e638f3cba98b799eabef94c0148cd9c0",
"checkout": null,
"context": {
"cookiecutter": {
"namespace": "sphinxnotes",
"name": "snippet",
"full_name": "sphinxnotes-snippet",
"name": "picker",
"full_name": "sphinxnotes-picker",
"author": "Shengyu Zhang",
"description": "Sphinx documentation snippets manager",
"version": "1.2",
"github_owner": "sphinx-notes",
"github_repo": "snippet",
"pypi_name": "sphinxnotes-snippet",
"pypi_name": "sphinxnotes-picker",
"pypi_owner": "SilverRainZ",
"is_python_project": true,
"python_version": "3.12",
"is_sphinx_extension": true,
"sphinx_version": "7.0",
"development_status": "3 - Alpha",
"_template": "https://github.com/sphinx-notes/template",
"_commit": "251643b4d04376494409369c91f29ca047687a5d"
"_commit": "a829f105e638f3cba98b799eabef94c0148cd9c0"
}
},
"directory": null
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/sphinxnotes-snippet
url: https://pypi.org/p/sphinxnotes-picker
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- uses: ncipollo/release-action@v1
with:
body: |
Changelog: https://sphinx.silverrainz.me/snippet/changelog.html
Changelog: https://sphinx.silverrainz.me/picker/changelog.html
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ clean:

.PHONY: fmt
fmt:
ruff format src/ && ruff check --fix src/
ruff format src/ tests/ && ruff check --fix src/ tests/

.PHONY: test
test:
Expand All @@ -36,7 +36,8 @@ test:
# Build distribution package, for "install" or "upload".
.PHONY: dist
dist: pyproject.toml clean
$(PY) -m build
# Use ``--no-isolation`` to prevent network accessing.
$(PY) -m build --no-isolation

# Install distribution package to user directory.
#
Expand Down
22 changes: 11 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
.. This file is generated from sphinx-notes/cookiecutter.
You need to consider modifying the TEMPLATE or modifying THIS FILE.

===================
sphinxnotes-snippet
===================
==================
sphinxnotes-picker
==================

.. |docs| image:: https://img.shields.io/github/deployments/sphinx-notes/snippet/github-pages
:target: https://sphinx.silverrainz.me/snippet
.. |docs| image:: https://img.shields.io/github/deployments/sphinx-notes/picker/github-pages
:target: https://sphinx.silverrainz.me/picker
:alt: Documentation Status
.. |license| image:: https://img.shields.io/github/license/sphinx-notes/snippet
.. |license| image:: https://img.shields.io/github/license/sphinx-notes/picker
:target: https://github.com/sphinx-notes/snippet/blob/master/LICENSE
:alt: Open Source License
.. |pypi| image:: https://img.shields.io/pypi/v/sphinxnotes-snippet.svg
:target: https://pypi.python.org/pypi/sphinxnotes-snippet
.. |pypi| image:: https://img.shields.io/pypi/v/sphinxnotes-picker.svg
:target: https://pypi.python.org/pypi/sphinxnotes-picker
:alt: PyPI Package
.. |download| image:: https://img.shields.io/pypi/dm/sphinxnotes-snippet
:target: https://pypistats.org/packages/sphinxnotes-snippet
.. |download| image:: https://img.shields.io/pypi/dm/sphinxnotes-picker
:target: https://pypistats.org/packages/sphinxnotes-picker
:alt: PyPI Package Downloads

|docs| |license| |pypi| |download|
Expand All @@ -29,4 +29,4 @@ Sphinx documentation snippets manager.

Please refer to Documentation_ for more details.

.. _Documentation: https://sphinx.silverrainz.me/snippet
.. _Documentation: https://sphinx.silverrainz.me/picker
10 changes: 10 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* This file is generated from sphinx-notes/cookiecutter.
* DO NOT EDIT.
*/

/* Missing style for nodes.system_message from Alabaster. */
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
19 changes: 10 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

project = 'sphinxnotes-snippet'
project = 'sphinxnotes-picker'
author = 'Shengyu Zhang'
copyright = "2023, " + author

Expand Down Expand Up @@ -55,12 +55,6 @@
#
html_theme = 'furo'

html_theme_options = {}

# 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']
html_theme_options = {
"source_repository": "https://github.com/sphinx-notes/snippet/",
"source_branch": "master",
Expand All @@ -69,10 +63,17 @@

# The URL which points to the root of the HTML documentation.
# It is used to indicate the location of document like canonical_url
html_baseurl = 'https://sphinx.silverrainz.me/snippet'
html_baseurl = 'https://sphinx.silverrainz.me/picker'

html_logo = html_favicon = '_static/sphinx-notes.png'

# 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']

html_css_files = ['custom.css']

# -- Extensions -------------------------------------------------------------

extensions.append('sphinx.ext.extlinks')
Expand Down Expand Up @@ -117,7 +118,7 @@
import os
import sys
sys.path.insert(0, os.path.abspath('../src/sphinxnotes'))
extensions.append('snippet')
extensions.append('picker')

# CUSTOM CONFIGURATION

Expand Down
27 changes: 14 additions & 13 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
.. This file is generated from sphinx-notes/cookiecutter.
You need to consider modifying the TEMPLATE or modifying THIS FILE.

===================
sphinxnotes-snippet
===================
==================
sphinxnotes-picker
==================

.. |docs| image:: https://img.shields.io/github/deployments/sphinx-notes/snippet/github-pages?label=docs
:target: https://sphinx.silverrainz.me/snippet
.. |docs| image:: https://img.shields.io/github/deployments/sphinx-notes/picker/github-pages?label=docs
:target: https://sphinx.silverrainz.me/picker
:alt: Documentation Status
.. |license| image:: https://img.shields.io/github/license/sphinx-notes/snippet
.. |license| image:: https://img.shields.io/github/license/sphinx-notes/picker
:target: https://github.com/sphinx-notes/snippet/blob/master/LICENSE
:alt: Open Source License
.. |pypi| image:: https://img.shields.io/pypi/v/sphinxnotes-snippet.svg
:target: https://pypistats.org/packages/sphinxnotes-snippet
.. |pypi| image:: https://img.shields.io/pypi/v/sphinxnotes-picker.svg
:target: https://pypistats.org/packages/sphinxnotes-picker
:alt: PyPI Package
.. |download| image:: https://img.shields.io/pypi/dm/sphinxnotes-snippet
:target: https://pypi.python.org/pypi/sphinxnotes-snippet
.. |download| image:: https://img.shields.io/pypi/dm/sphinxnotes-picker
:target: https://pypi.python.org/pypi/sphinxnotes-picker
:alt: PyPI Package Downloads
.. |github| image:: https://img.shields.io/badge/GitHub-181717?style=flat&logo=github&logoColor=white/
:target: https://github.com/sphinx-notes/snippet
:target: https://github.com/sphinx-notes/picker
:alt: GitHub Repository

|docs| |license| |pypi| |download| |github|
Expand Down Expand Up @@ -49,7 +49,7 @@ First, downloading extension from PyPI:

.. code-block:: console

$ pip install sphinxnotes-snippet
$ pip install sphinxnotes-picker


Then, add the extension name to ``extensions`` configuration item in your
Expand All @@ -59,7 +59,7 @@ Then, add the extension name to ``extensions`` configuration item in your

extensions = [
# …
'sphinxnotes.snippet',
'sphinxnotes.picker',
# …
]

Expand Down Expand Up @@ -95,6 +95,7 @@ as part of **The Sphinx Notes Project**.
:caption: The Sphinx Notes Project

Home <https://sphinx.silverrainz.me/>
GitHub <https://github.com/sphinx-notes>
Blog <https://silverrainz.me/blog/category/sphinx.html>
PyPI <https://pypi.org/search/?q=sphinxnotes>

Expand Down
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#declaring-project-metadata

[project]
name = "sphinxnotes-snippet"
name = "sphinxnotes-picker"
description = "Sphinx documentation snippets manager"
readme = "README.rst"
license = "BSD-3-Clause"
Expand Down Expand Up @@ -38,7 +38,6 @@ classifiers = [
# CUSTOM CLASSIFIERS END
]

# See ``make pyver`` for more details.
requires-python = ">=3.12"
dependencies = [
"Sphinx >= 7.0",
Expand Down Expand Up @@ -85,14 +84,15 @@ docs = [
]

[project.urls]
homepage = "https://sphinx.silverrainz.me/snippet"
documentation = "https://sphinx.silverrainz.me/snippet"
homepage = "https://sphinx.silverrainz.me/picker"
documentation = "https://sphinx.silverrainz.me/picker"
repository = "https://github.com/sphinx-notes/snippet"
changelog = "https://sphinx.silverrainz.me/snippet/changelog.html"
changelog = "https://sphinx.silverrainz.me/picker/changelog.html"
tracker = "https://github.com/sphinx-notes/snippet/issues"

[project.scripts]
snippet = "sphinxnotes.snippet.cli:main"
sphinx-picker = "sphinxnotes.picker.cli:main"
sphinxnotes-picker = "sphinxnotes.picker.cli:main"

[build-system]
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5", "wheel"]
Expand All @@ -113,4 +113,4 @@ where = ["src"]
[tool.setuptools.package-data]
# A maps from PACKAGE NAMES to lists of glob patterns,
# see also https://setuptools.pypa.io/en/latest/userguide/datafiles.html
"sphinxnotes.snippet.integration" = ["*.*"]
"sphinxnotes.picker.integration" = ["*.*"]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
sphinxnotes.snippet
sphinxnotes.picker
~~~~~~~~~~~~~~~~~~~

Sphinx extension entrypoint.
Expand All @@ -11,10 +11,10 @@

def setup(app):
# **WARNING**: We don't import these packages globally, because the current
# package (sphinxnotes.snippet) is always resloved when importing
# sphinxnotes.snippet.*. If we import packages here, eventually we will
# package (sphinxnotes.picker) is always resloved when importing
# sphinxnotes.picker.*. If we import packages here, eventually we will
# load a lot of packages from the Sphinx. It will seriously **SLOW DOWN**
# the startup time of our CLI tool (sphinxnotes.snippet.cli).
# the startup time of our CLI tool (sphinxnotes.picker.cli).
#
# .. seealso:: https://github.com/sphinx-notes/snippet/pull/31
from .ext import (
Expand All @@ -27,8 +27,8 @@ def setup(app):

app.add_builder(SnippetBuilder)

app.add_config_value('snippet_config', {}, '')
app.add_config_value('snippet_patterns', {'*': ['.*']}, '')
app.add_config_value('picker_config', {}, '')
app.add_config_value('picker_patterns', {'*': ['.*']}, '')

app.connect('config-inited', on_config_inited)
app.connect('env-get-outdated', on_env_get_outdated)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
sphinxnotes.snippet.cache
sphinxnotes.picker.cache
~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: Copyright 2021 Shengyu Zhang
Expand Down
Loading
Loading