Skip to content

Commit

Permalink
upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
Bancie committed Aug 28, 2024
1 parent 8b4ed36 commit 2586ef5
Show file tree
Hide file tree
Showing 504 changed files with 77,429 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jobs:
- run: pip install pillow cairosvg
- run: pip install mkdocs-encryptcontent-plugin
- run: pip install mkdocs-glightbox
- run: pip install "mkdocs-material[imaging]"
- run: mkdocs gh-deploy --force
Empty file added layouts/my-custom-layout.yml
Empty file.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ nav:
- About: about.md

plugins:
- social:
- glightbox
- search: {}
- encryptcontent:
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ twine
mkdocs
mkdocs-material
mkdocs-encryptcontent-plugin
mkdocs-glightbox
mkdocs-glightbox
"mkdocs-material[imaging]"
8 changes: 8 additions & 0 deletions venv/bin/cairosvg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/Users/chibangnguyen/Documents/TiLearn/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from cairosvg.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Metadata-Version: 2.1
Name: CairoSVG
Version: 2.7.1
Summary: A Simple SVG Converter based on Cairo
Home-page: https://courtbouillon.org/cairosvg
Author: Guillaume Ayoub
Author-email: [email protected]
License: LGPLv3+
Project-URL: Documentation, https://cairosvg.org/documentation/
Project-URL: Code, https://github.com/Kozea/CairoSVG/
Project-URL: Issue tracker, https://github.com/Kozea/CairoSVG/issues
Project-URL: Donation, https://opencollective.com/courtbouillon
Keywords: svg,converter,cairo,pdf,png,postscript
Platform: Linux
Platform: macOS
Platform: Windows
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Requires-Python: >=3.5
Description-Content-Type: text/x-rst
Requires-Dist: cairocffi
Requires-Dist: cssselect2
Requires-Dist: defusedxml
Requires-Dist: pillow
Requires-Dist: tinycss2
Provides-Extra: doc
Requires-Dist: sphinx ; extra == 'doc'
Requires-Dist: sphinx-rtd-theme ; extra == 'doc'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: flake8 ; extra == 'test'
Requires-Dist: isort ; extra == 'test'

CairoSVG is an SVG converter based on Cairo. It can export SVG files to PDF,
EPS, PS, and PNG files.

* Free software: LGPL license
* For Python 3.7+, tested on CPython and PyPy
* Documentation: https://cairosvg.org/documentation/
* Changelog: https://github.com/Kozea/CairoSVG/releases
* Code, issues, tests: https://github.com/Kozea/CairoSVG
* Code of conduct: https://www.courtbouillon.org/code-of-conduct
* Professional support: https://www.courtbouillon.org
* Donation: https://opencollective.com/courtbouillon

CairoSVG has been created and developed by Kozea (https://kozea.fr).
Professional support, maintenance and community management is provided by
CourtBouillon (https://www.courtbouillon.org).

Copyrights are retained by their contributors, no copyright assignment is
required to contribute to CairoSVG. Unless explicitly stated otherwise, any
contribution intentionally submitted for inclusion is licensed under the LGPL
license, without any additional terms or conditions. For full
authorship information, see the version control history.
42 changes: 42 additions & 0 deletions venv/lib/python3.12/site-packages/CairoSVG-2.7.1.dist-info/RECORD
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
../../../bin/cairosvg,sha256=9LBAgdQvalqDJBRHIKQTfZCW1WLYRNzp4eIQmJ21Lsw,258
CairoSVG-2.7.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
CairoSVG-2.7.1.dist-info/METADATA,sha256=HCNF4wk6YezpKfYxzFXxOPS2Dkh_mdpbf0XjhaML-Sw,2723
CairoSVG-2.7.1.dist-info/RECORD,,
CairoSVG-2.7.1.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
CairoSVG-2.7.1.dist-info/entry_points.txt,sha256=tt81Fva0ZqxNhh79e_FVS5FH4BRRqkqQj_n5knB3-T8,52
CairoSVG-2.7.1.dist-info/top_level.txt,sha256=lmPBQv8BRkMSklPFDJ9wpg71GZW6h3gb6cKOesCxxcc,9
cairosvg/VERSION,sha256=vX-SUhgaT2nHvJnPnvW-3tf84E3PWJn0MU4cpmZBVuc,5
cairosvg/__init__.py,sha256=zjaoqB3Lt8zZ-PjKWwcrqWin8CAYWByYCNbcZ4GYsIs,4799
cairosvg/__main__.py,sha256=xSP9BpAdeS_iV5u0tfBM1W5TSIYUv2FUiEtBITPzL1Y,3045
cairosvg/__pycache__/__init__.cpython-312.pyc,,
cairosvg/__pycache__/__main__.cpython-312.pyc,,
cairosvg/__pycache__/bounding_box.cpython-312.pyc,,
cairosvg/__pycache__/colors.cpython-312.pyc,,
cairosvg/__pycache__/css.cpython-312.pyc,,
cairosvg/__pycache__/defs.cpython-312.pyc,,
cairosvg/__pycache__/features.cpython-312.pyc,,
cairosvg/__pycache__/helpers.cpython-312.pyc,,
cairosvg/__pycache__/image.cpython-312.pyc,,
cairosvg/__pycache__/parser.cpython-312.pyc,,
cairosvg/__pycache__/path.cpython-312.pyc,,
cairosvg/__pycache__/shapes.cpython-312.pyc,,
cairosvg/__pycache__/surface.cpython-312.pyc,,
cairosvg/__pycache__/svg.cpython-312.pyc,,
cairosvg/__pycache__/test_api.cpython-312.pyc,,
cairosvg/__pycache__/text.cpython-312.pyc,,
cairosvg/__pycache__/url.cpython-312.pyc,,
cairosvg/bounding_box.py,sha256=vMZiC8EEwF6UueIT87U1Z79TlJ2vS9FiCzotJnQaPHM,13980
cairosvg/colors.py,sha256=gof_RQii4mvh5goVWeTNJZzozuFKK09cevSRFdNWCHU,10672
cairosvg/css.py,sha256=mjOrBDNK3XBG4kQ2Y_8yNzjtWUAmGfVExRJIVUMLR0s,4029
cairosvg/defs.py,sha256=DtR-iCNJucPr0LhMEeSxwG1ezBlHYpymX9Sxrn5Wxis,13555
cairosvg/features.py,sha256=9dje6UxVPI7GB4aBH03L23X33e9XWq0aoL7oYox8LnM,1572
cairosvg/helpers.py,sha256=FmCeOOv07EbcA3MYU9IZZUa0-WjuWAWj-K4Q5tKamrA,12713
cairosvg/image.py,sha256=rHVoCBtRJmurFyvn9HGehq9YRd6rpfVgkd1BN7oZ43U,4145
cairosvg/parser.py,sha256=FE2-JCVmgkzmuuEjFIdLtKz_1eOl2G_BE6ENQV_hlkA,16134
cairosvg/path.py,sha256=bqJC4-0BQ9ntDan-z880wLw4O0IoLnUIAPEGEHIhu5Q,17029
cairosvg/shapes.py,sha256=EVEDafJ1YSjJCjDFmoKV2mA3lYT-DoCAoaQOkJyb4cA,3432
cairosvg/surface.py,sha256=2qFToqIb3ymvkKw_t0Z94JTU8wSH_AS6iYoGNNbOh-8,20864
cairosvg/svg.py,sha256=cxkaxZ_Gi_bBmXMILlc7McqfoQ5QqbBPfDijFHuFy0M,272
cairosvg/test_api.py,sha256=EsWnfC0EG2cmCUfn6g8XPslg5XZYsbp0g42RY33CApI,6930
cairosvg/text.py,sha256=arpyZyvC_2OTqPtHV362OB2fJm37ENk7JV7r9j9LTV8,9751
cairosvg/url.py,sha256=bKiZT4wH7K4QUto0Ga8vqSwMI9z06iChuw-r97f-5b4,4992
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.41.0)
Root-Is-Purelib: true
Tag: py3-none-any

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[console_scripts]
cairosvg = cairosvg.__main__:main
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cairosvg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
133 changes: 133 additions & 0 deletions venv/lib/python3.12/site-packages/PIL/BdfFontFile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
#
# The Python Imaging Library
# $Id$
#
# bitmap distribution font (bdf) file parser
#
# history:
# 1996-05-16 fl created (as bdf2pil)
# 1997-08-25 fl converted to FontFile driver
# 2001-05-25 fl removed bogus __init__ call
# 2002-11-20 fl robustification (from Kevin Cazabon, Dmitry Vasiliev)
# 2003-04-22 fl more robustification (from Graham Dumpleton)
#
# Copyright (c) 1997-2003 by Secret Labs AB.
# Copyright (c) 1997-2003 by Fredrik Lundh.
#
# See the README file for information on usage and redistribution.
#

"""
Parse X Bitmap Distribution Format (BDF)
"""
from __future__ import annotations

from typing import BinaryIO

from . import FontFile, Image

bdf_slant = {
"R": "Roman",
"I": "Italic",
"O": "Oblique",
"RI": "Reverse Italic",
"RO": "Reverse Oblique",
"OT": "Other",
}

bdf_spacing = {"P": "Proportional", "M": "Monospaced", "C": "Cell"}


def bdf_char(
f: BinaryIO,
) -> (
tuple[
str,
int,
tuple[tuple[int, int], tuple[int, int, int, int], tuple[int, int, int, int]],
Image.Image,
]
| None
):
# skip to STARTCHAR
while True:
s = f.readline()
if not s:
return None
if s[:9] == b"STARTCHAR":
break
id = s[9:].strip().decode("ascii")

# load symbol properties
props = {}
while True:
s = f.readline()
if not s or s[:6] == b"BITMAP":
break
i = s.find(b" ")
props[s[:i].decode("ascii")] = s[i + 1 : -1].decode("ascii")

# load bitmap
bitmap = bytearray()
while True:
s = f.readline()
if not s or s[:7] == b"ENDCHAR":
break
bitmap += s[:-1]

# The word BBX
# followed by the width in x (BBw), height in y (BBh),
# and x and y displacement (BBxoff0, BByoff0)
# of the lower left corner from the origin of the character.
width, height, x_disp, y_disp = (int(p) for p in props["BBX"].split())

# The word DWIDTH
# followed by the width in x and y of the character in device pixels.
dwx, dwy = (int(p) for p in props["DWIDTH"].split())

bbox = (
(dwx, dwy),
(x_disp, -y_disp - height, width + x_disp, -y_disp),
(0, 0, width, height),
)

try:
im = Image.frombytes("1", (width, height), bitmap, "hex", "1")
except ValueError:
# deal with zero-width characters
im = Image.new("1", (width, height))

return id, int(props["ENCODING"]), bbox, im


class BdfFontFile(FontFile.FontFile):
"""Font file plugin for the X11 BDF format."""

def __init__(self, fp: BinaryIO) -> None:
super().__init__()

s = fp.readline()
if s[:13] != b"STARTFONT 2.1":
msg = "not a valid BDF file"
raise SyntaxError(msg)

props = {}
comments = []

while True:
s = fp.readline()
if not s or s[:13] == b"ENDPROPERTIES":
break
i = s.find(b" ")
props[s[:i].decode("ascii")] = s[i + 1 : -1].decode("ascii")
if s[:i] in [b"COMMENT", b"COPYRIGHT"]:
if s.find(b"LogicalFontDescription") < 0:
comments.append(s[i + 1 : -1].decode("ascii"))

while True:
c = bdf_char(fp)
if not c:
break
id, ch, (xy, dst, src), im = c
if 0 <= ch < len(self.glyph):
self.glyph[ch] = xy, dst, src, im
Loading

0 comments on commit 2586ef5

Please sign in to comment.