-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Initial version
- Loading branch information
Showing
55 changed files
with
3,010 additions
and
872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
job: | ||
name: Build Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# Versions listed at https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | ||
python-version: [ | ||
"3.9", | ||
"3.10", | ||
"3.11", | ||
"3.12", | ||
] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build and upload to PyPI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_sdist_and_wheel: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
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@v3 | ||
with: | ||
path: dist/* | ||
|
||
upload_pypi: | ||
name: Upload to PyPI | ||
needs: [build_sdist_and_wheel] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
0.0.1 (Unreleased) | ||
================== | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#### | ||
1G1R | ||
#### | ||
|
||
ROMSearch operates on a "one game, one ROM" (1G1R) philosophy. This means that for each game, it will find the | ||
ROM file that it believes to be the best. The approach ROMSearch takes depends mostly on regions, languages, and | ||
versioning, with regions being the ultimate discriminator. | ||
|
||
Languages | ||
--------- | ||
|
||
Many ROMs are tagged with languages (En, Es, etc), that will be parsed out during the run. If a ROM does not contain | ||
the language the user has specified (most likely En), then this will be removed from the choice. | ||
|
||
A lot of ROMs do not have any language tags (particularly US ones). For these, we currently do not cut them out, | ||
but this may change in the future to associate a region with an implicit language. | ||
|
||
Versions | ||
-------- | ||
|
||
There may be different versions of ROMs (e.g. Rev 1, v2.0, etc). For these, we will take the latest one per unique | ||
region combination as the latest and greatest version. | ||
|
||
Regions | ||
------- | ||
|
||
After the various cuts, there will still be a number ROMs that pass all check. We therefore do a final filter by | ||
region (e.g. USA, Europe) to get to a final ROM. ROMSearch will choose the ROM with the highest region preference | ||
for each game, so order is important here! | ||
|
||
Others | ||
------ | ||
|
||
There are some other cuts that go into deciding the best ROM. These include: | ||
|
||
* Improved version tags (e.g. "EDC" for PS1 games) | ||
* Removing of demos/preproduction ROMs | ||
|
||
The final result is that you should get the single best ROM for your preferences. Hooray! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
######### | ||
Changelog | ||
######### | ||
|
||
.. include:: ../CHANGES.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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 | ||
|
||
import os | ||
import sys | ||
sys.path.insert(0, os.path.abspath('..')) | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'romsearch' | ||
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, | ||
'display_version': 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 = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
############ | ||
Config Files | ||
############ | ||
|
||
ROMSearch is controlled primarily through a number of .yml files, which makes extending its functionality simple | ||
without having to delve deep into the code. Here is a comprehensive list of those config files, along with arguments | ||
for each for those who may want to extend ROMSearch's capabilities. | ||
|
||
.. toctree:: | ||
:glob: | ||
:titlesonly: | ||
:maxdepth: 2 | ||
|
||
configs/config | ||
configs/platforms | ||
configs/dats | ||
configs/clonelists | ||
configs/regex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
########## | ||
clonelists | ||
########## | ||
|
||
ROMSearch can include curated clonelists to merge into its own dupes. Currently, this is only for ``retool``, but | ||
there is flexibility to add others in the future. | ||
|
||
Syntax: :: | ||
|
||
url: "url" # Base url to pull files from | ||
|
||
[platform]: [filename] # Filename for the platform-specific clonelist | ||
|
||
retool | ||
====== | ||
|
||
.. literalinclude:: ../../romsearch/configs/clonelists/retool.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
###### | ||
config | ||
###### | ||
|
||
Here we document all the options for the ``config.yml`` file that the user can supply. | ||
|
||
TODO | ||
|
||
Sample | ||
====== | ||
|
||
.. literalinclude:: ../../romsearch/configs/sample_config.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#### | ||
dats | ||
#### | ||
|
||
TODO | ||
|
||
No-Intro | ||
======== | ||
|
||
.. literalinclude:: ../../romsearch/configs/dats/no-intro.yml | ||
|
||
Redump | ||
====== | ||
|
||
.. literalinclude:: ../../romsearch/configs/dats/redump.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
######### | ||
platforms | ||
######### | ||
|
||
TODO | ||
|
||
Nintendo - GameCube | ||
=================== | ||
|
||
.. literalinclude:: ../../romsearch/configs/platforms/Nintendo - GameCube.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
##### | ||
regex | ||
##### | ||
|
||
The ``regex.yml`` file controls how filenames are parsed using regex rules. | ||
|
||
Syntax: :: | ||
|
||
[name]: # Name of the group | ||
pattern: [pattern] # Regex matching pattern | ||
type: ["str", "list", "bool"] # OPTIONAL. How to parse this match. If "list", a list of possible values needs | ||
to be defined in the config defaults. If "str", will pull out the string of | ||
the regex match. If bool, if the pattern is found within the filename will be | ||
set True, else False. Defaults to "bool" | ||
flags: ["I", "NOFLAG"] # OPTIONAL. Flags to pass to regex. "I" indicates ignorecase, "NOFLAG" means no | ||
flags. Defaults to "I" | ||
group: [group] # OPTIONAL. Regex patterns can be grouped together into a single overarching group. | ||
If not set, will not group | ||
search_tags: [True, False] # OPTIONAL. If False, will search the whole string instead of tags within the file. | ||
Defaults to True | ||
|
||
Full file | ||
========= | ||
|
||
.. literalinclude:: ../../romsearch/configs/regex.yml |
Oops, something went wrong.