Skip to content

Commit b5fcc58

Browse files
Buried-In-Codegithub-actions[bot]mandyyli
authored
Switch to Mediux API (#42)
- Switched from scraping to official Mediux GraphQL API, closes #35 - Refactored Plex & Jellyfin integrations to use JSON urls - Unified CLI commands - Jellyfin authorization improvements, closes #60 - Large image safeguards, closes #44 - Interactive set selection support, closes #40 - Improved error handling - Python 3.14 support --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Mandy <35066972+mandyyli@users.noreply.github.com>
1 parent 5d2454b commit b5fcc58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+9471
-3144
lines changed

.editorconfig

Lines changed: 0 additions & 52 deletions
This file was deleted.

.gitattributes

Lines changed: 85 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,116 @@
1+
# Common settings that generally should always be used with your language specific settings
2+
3+
# Auto detect text files and perform LF normalization
14
* text=auto
25

3-
.gitattributes export-ignore
4-
.gitignore export-ignore
6+
#
7+
# The above will handle all files NOT found below
8+
#
59

6-
*.md text diff=markdown
10+
# Documents
11+
*.bibtex text diff=bibtex
12+
*.doc diff=astextplain
13+
*.DOC diff=astextplain
14+
*.docx diff=astextplain
15+
*.DOCX diff=astextplain
16+
*.dot diff=astextplain
17+
*.DOT diff=astextplain
18+
*.pdf diff=astextplain
19+
*.PDF diff=astextplain
720
*.rtf diff=astextplain
8-
*.sql text
21+
*.RTF diff=astextplain
22+
*.md text diff=markdown
23+
*.mdx text diff=markdown
24+
*.tex text diff=tex
25+
*.adoc text
26+
*.textile text
27+
*.mustache text
28+
*.csv text eol=crlf
29+
*.tab text
30+
*.tsv text
931
*.txt text
32+
*.sql text
33+
*.epub diff=astextplain
1034

11-
*.jpg binary
35+
# Graphics
1236
*.png binary
37+
*.jpg binary
38+
*.jpeg binary
39+
*.gif binary
40+
*.tif binary
41+
*.tiff binary
42+
*.ico binary
43+
# SVG treated as text by default.
44+
*.svg text
45+
# If you want to treat it as binary,
46+
# use the following line instead.
47+
# *.svg binary
48+
*.eps binary
1349

50+
# Scripts
1451
*.bash text eol=lf
15-
*.bat text eol=crlf
16-
*.cmd text eol=crlf
1752
*.fish text eol=lf
18-
*.ps1 text eol=crlf
1953
*.sh text eol=lf
2054
*.zsh text eol=lf
55+
# These are explicitly windows files and should use crlf
56+
*.bat text eol=crlf
57+
*.cmd text eol=crlf
58+
*.ps1 text eol=crlf
2159

22-
*.csv text
60+
# Serialisation
2361
*.json text
2462
*.toml text
2563
*.xml text
2664
*.yaml text
2765
*.yml text
2866

67+
# Archives
2968
*.7z binary
3069
*.gz binary
3170
*.tar binary
3271
*.tgz binary
3372
*.zip binary
3473

35-
# C#
36-
*.cs text diff=csharp
37-
*.cshtml text diff=html
38-
*.csproj text eol=crlf
39-
*.csx text diff=csharp
40-
*.sln text eol=crlf
41-
42-
# Java
43-
*.gradle text diff=java
44-
*.gradle.kts text diff=kotlin
45-
*.groovy text diff=java
46-
*.java text diff=java
47-
*.kt text diff=kotlin
48-
*.scala text diff=java
49-
50-
# Python
74+
# Text files where line endings should be preserved
75+
*.patch -text
76+
77+
#
78+
# Exclude files from exporting
79+
#
80+
81+
.gitattributes export-ignore
82+
.gitignore export-ignore
83+
.gitkeep export-ignore
84+
# Apply override to all files in the directory
85+
*.md linguist-detectable
86+
# Basic .gitattributes for a python repo.
87+
88+
# Source files
89+
# ============
5190
*.pxd text diff=python
5291
*.py text diff=python
5392
*.py3 text diff=python
54-
*.pyi text diff=python
5593
*.pyw text diff=python
5694
*.pyx text diff=python
5795
*.pyz text diff=python
96+
*.pyi text diff=python
97+
98+
# Binary files
99+
# ============
100+
*.db binary
101+
*.p binary
102+
*.pkl binary
103+
*.pickle binary
104+
*.pyc binary export-ignore
105+
*.pyo binary export-ignore
106+
*.pyd binary
107+
108+
# Jupyter notebook
109+
*.ipynb text eol=lf
110+
111+
# Note: .db, .p, and .pkl files are associated
112+
# with the python modules ``pickle``, ``dbm.*``,
113+
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
114+
# (among others).
115+
# Fix syntax highlighting on GitHub to allow comments
116+
.vscode/*.json linguist-language=JSON-with-Comments

.github/dependabot.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/linting.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- docs/**
9+
pull_request:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- docs/**
14+
15+
env:
16+
PY_VERSION: '3.10'
17+
18+
jobs:
19+
prek:
20+
permissions:
21+
contents: read
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v6
26+
- uses: astral-sh/setup-uv@v7
27+
with:
28+
python-version: ${{ env.PY_VERSION }}
29+
- name: Install project
30+
run: uv sync --locked --dev --all-extras --managed-python
31+
- name: Run prek
32+
run: uv run prek run -a --skip ty

.github/workflows/publishing.yaml

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,72 @@
11
name: Publishing
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- docs/**
9+
pull_request:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- docs/**
14+
15+
env:
16+
PY_VERSION: 3.14
417

518
jobs:
619
build:
7-
name: Build
20+
permissions:
21+
contents: read
822
runs-on: ubuntu-latest
923

1024
steps:
1125
- uses: actions/checkout@v6
12-
- uses: actions/setup-python@v6
26+
- uses: astral-sh/setup-uv@v7
1327
with:
14-
python-version: '3.13'
15-
- name: Install pypa/build
16-
run: pip install build
17-
- name: Build a binary wheel and a source tarball
18-
run: python -m build
28+
python-version: ${{ env.PY_VERSION }}
29+
- name: Install project
30+
run: uv sync --locked --no-dev
31+
- name: Run build
32+
run: uv build
1933
- uses: actions/upload-artifact@v7
2034
with:
2135
name: python-package-distributions
2236
path: dist/
2337

24-
publish-to-pypi:
25-
name: Publish to PyPI
26-
if: startsWith(github.ref, 'refs/tags/')
38+
validate:
2739
needs:
2840
- build
41+
permissions: {}
2942
runs-on: ubuntu-latest
43+
44+
steps:
45+
- uses: actions/download-artifact@v8
46+
with:
47+
name: python-package-distributions
48+
path: dist/
49+
- uses: astral-sh/setup-uv@v7
50+
with:
51+
python-version: ${{ env.PY_VERSION }}
52+
- name: Validate dist
53+
run: uv run --with twine twine check dist/*
54+
55+
publish:
3056
environment:
3157
name: pypi
3258
url: https://pypi.org/p/Mediux-Posters
59+
if: startsWith(github.ref, 'refs/tags/')
60+
needs:
61+
- build
62+
- validate
3363
permissions:
3464
id-token: write
65+
runs-on: ubuntu-latest
3566

3667
steps:
3768
- uses: actions/download-artifact@v8
3869
with:
3970
name: python-package-distributions
4071
path: dist/
41-
- uses: pypa/gh-action-pypi-publish@release/v1
72+
- uses: pypa/gh-action-pypi-publish@v1

.github/workflows/rich-codex.yaml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,39 @@ name: Rich Codex
22

33
on:
44
push:
5+
branches:
6+
- main
57
paths:
8+
- .github/workflows/rich-codex.yaml
69
- README.md
7-
- mediux_posters/__main__.py
10+
- mediux_posters/cli/**
11+
pull_request:
12+
branches:
13+
- main
14+
paths:
15+
- .github/workflows/rich-codex.yaml
16+
- README.md
17+
- mediux_posters/cli/**
818
workflow_dispatch:
919

10-
permissions:
11-
contents: write
20+
env:
21+
PY_VERSION: "3.10"
1222

1323
jobs:
1424
rich_codex:
25+
permissions:
26+
contents: write
1527
runs-on: ubuntu-latest
28+
1629
steps:
1730
- uses: actions/checkout@v6
1831
- uses: astral-sh/setup-uv@v7
19-
- name: Setup Python
20-
run: uv python install '3.13'
32+
with:
33+
python-version: ${{ env.PY_VERSION }}
2134
- name: Install project
22-
run: uv sync --dev
23-
35+
run: uv sync --locked --dev --all-extras --managed-python
2436
- name: Generate terminal images with rich-codex
25-
uses: ewels/rich-codex@v1
37+
uses: ewels/rich-codex@v1.2.11
2638
with:
2739
commit_changes: true
28-
clean_img_paths: true
40+
clean_img_paths: docs/img/*.svg

0 commit comments

Comments
 (0)