Skip to content

Commit

Permalink
Merge pull request #1 from bbtufty/list-scraper
Browse files Browse the repository at this point in the history
Initial commit
  • Loading branch information
bbtufty authored Oct 11, 2024
2 parents 2e3e80e + 80bb0be commit bb1e8b4
Show file tree
Hide file tree
Showing 38 changed files with 2,348 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Bug report
description: Submit a bug report
title: '[BUG]: '
labels: ['bug']
assignees: 'bbtufty'

body:
- type: textarea
id: description
attributes:
label: Describe the Bug
description: A clear and concise description of the bug.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce the behavior
description: If not present under all circumstances, give a step-by-step on how to reproduce the bug.
value: |
1.
2.
...
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Attach any applicable screenshots that illustrate your problem.
- type: textarea
id: preferences
attributes:
label: Preference File
description: Paste your config file (likely config.yml), with any sensitive info redacted
render: yaml
- type: textarea
id: log
attributes:
label: Log
description: Attach the relevant log file(s)
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature
description: Suggest a new feature for this project
title: '[FEAT]: '
labels: ['feature']
assignees: 'bbtufty'

body:
- type: textarea
id: problem
attributes:
label: Problem
description: Is your feature request related to a problem? Please describe
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
id: solution
attributes:
label: Solution
description: Describe the solution you'd like
placeholder: A clear and concise description of what you want to happen.
- type: textarea
id: alternatives
attributes:
label: Alternatives
description: Describe alternatives you've considered
placeholder: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: context
attributes:
label: Context
description: Additional context
placeholder: Add any other context or screenshots about the feature request here.


42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build

on:
push:
branches:
- '*'
pull_request:
branches:
- master

jobs:
build_sdist_and_wheel:
name: Build source distribution
runs-on: ubuntu-latest
strategy:
matrix:
# Versions listed at https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
python-version: [
"3.11",
"3.12",
]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
# - name: Run pytest
# run: |
# pip install -e .
# pip install pytest
# cd tests
# pytest tests_romparser.py
# pytest tests_romchooser.py
50 changes: 50 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish

on: [push, pull_request]

jobs:
build_sdist_and_wheel:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Install build
run: python -m pip install build
- name: Build sdist
run: python -m build --sdist --wheel --outdir dist/ .
- uses: actions/upload-artifact@v4
with:
name: artifact-source
path: dist/*

build_and_upload_executable:
name: Build and upload executable
runs-on: windows-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -e .
- name: Build package
run: >
pyinstaller nxbrew_dl_gui.py
--copy-metadata nxbrew_dl
--collect-data nxbrew_dl
--onefile
-n nxbrew_dl.exe
- uses: softprops/action-gh-release@v2
with:
files: dist/*
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,8 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Don't include cache/config
config.yml
cache.json
30 changes: 30 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- htmlzip
- pdf

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.0.1 (Unreleased)
==================

- Initial release
17 changes: 17 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include README.md
include CHANGES.rst
include LICENSE
include pyproject.toml

recursive-include *.pyx *.c *.pxd
recursive-include docs *
recursive-include licenses *
recursive-include cextern *
recursive-include scripts *

prune build
prune docs/_build
prune docs/api
prune */__pycache__

global-exclude *.pyc *.o
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# nxbrew-scraper
Scrape nxbrew to automatically download Switch games
# NXBrew-dl

[![Docs](https://readthedocs.org/projects/nxbrew-dl/badge/?version=latest&style=flat-square)](https://nxbrew-dl.readthedocs.io/en/latest/)
[![Actions](https://img.shields.io/github/actions/workflow/status/bbtufty/nxbrew-dl/build.yaml?branch=main&style=flat-square)](https://github.com/bbtufty/nxbrew-dl/actions)
[![License](https://img.shields.io/badge/license-GNUv3-blue.svg?label=License&style=flat-square)](LICENSE)

NXBrew-dl is intended to be an easy-to-user interface to download ROMs, DLC and update files for NSP. It does so via
a GUI interface, allowing users to download items in bulk and keeping things up-to-date.

As of now, this is in extremely early development, and only currently acts as an interactive browser for the ROM
list on NXBrew. Downloads do not yet work!

To get started, see the [documentation](https://nxbrew-dl.readthedocs.io/en/latest/).

We encourage users to open [issues](https://github.com/bbtufty/nxbrew-dl/issues>) as and where they find them.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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
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)
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#########
Changelog
#########

.. include:: ../CHANGES.rst
51 changes: 51 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'nxbrew_dl'
copyright = '2024, bbtufty'
author = 'bbtufty'
release = '0.0.1'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_automodapi.automodapi",
]

templates_path = ["_templates"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
]

master_doc = "index"

todo_include_todos = True

html_theme_options = {
"collapse_navigation": False,
"navigation_depth": 4,
"globaltoc_collapse": False,
"globaltoc_includehidden": False,
"version_selector": True,
}

autoclass_content = "both"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = []
Binary file added docs/img/gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. nxbrew_dl documentation master file, created by
sphinx-quickstart on Fri Oct 11 20:13:17 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. include:: intro.rst

.. toctree::
:titlesonly:
:maxdepth: 2
:caption: Documentation

installation
usage
changelog
reference_api

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
14 changes: 14 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
############
Installation
############

NXBrew-dl currently can only be installed via GitHub: ::

git clone https://github.com/bbtufty/nxbrew-dl.git
pip install -e .

After this, run the script in the main directory: ::

cd nxbrew-dl
python nxbrew_dl_gui.py

21 changes: 21 additions & 0 deletions docs/intro.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#########
NXBrew-dl
#########

.. image:: https://img.shields.io/github/actions/workflow/status/bbtufty/nxbrew-dl/build.yaml?branch=main&style=flat-square
:target: https://github.com/bbtufty/nxbrew-dl/actions
.. image:: https://readthedocs.org/projects/nxbrew-dl/badge/?version=latest&style=flat-square
:target: https://nxbrew-dl.readthedocs.io/en/latest/
.. image:: https://img.shields.io/badge/license-GNUv3-blue.svg?label=License&style=flat-square

NXBrew-dl is intended to be an easy-to-user interface to download ROMs, DLC and update files for NSP. It does so via
a GUI interface, allowing users to download items in bulk and keeping things up-to-date.

As of now, this is in extremely early development, and only currently acts as an interactive browser for the ROM
list on NXBrew. Downloads do not yet work!

For details on installation, see :doc:`installation <installation>`.

For how to use NXBrew-dl, see :doc:`usage <usage>`.

We encourage users to open `issues <https://github.com/bbtufty/nxbrew-dl/issues>`_ as and where they find them.
Loading

0 comments on commit bb1e8b4

Please sign in to comment.