Skip to content

This repo will have the AST for the mtg search engine. This repo is for checking if a card matches a query. It will (when I get round to it) have implementations in an array of languages.

License

Notifications You must be signed in to change notification settings

SquireTournamentServices/mtg-search-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mtg-search-engine

This is an open source library and, standalone application that supports the searching of MTG cards and sets. It has a syntax that is similar to Scryfall but it can be embedded anywhere.

Frontend Main Memory tests Coverage codecov

Requirements

  • cmake+
  • openssl+
  • cURL+
  • jansson+
  • c compiler (i.e: gcc, msvc, clang)
  • c++ compiler (i.e: g++, msvc, clang)
  • pthread (see win32 pthread)
  • python3
  • pip install -r requirements.txt
  • these can be included via submodules, see the SquireDesktop repo for an example

Optional Requirements

  • astyle
  • cmake-formatter
  • ctest
  • valgrind
  • libmedtls (web-api)

Building and Testing

This project is written in C and, targets all platforms. There is an optional frontend and web API for this project, these can simply not be built.

Backend / Library / CLI

# You might want to use a Nix shell to install things for you
nix-shell shell.nix

# Or on mac
# nix-shell shell_mac.nix

# You should be in a python virtual environment
python -m venv .
# If you are on windows or use fish, you must change this line
source bin/activate

pip install -r requirements.txt

# .
mkdir -p build
cd build

# ./build/
# You can use -DMSE_DOXYGEN=ON to generate documentation
cmake -DMSE_WEB_API=ON -DUSE_JEMALLOC=ON ..
# cmake -DMSE_WEB_API=ON -DUSE_JEMALLOC=ON ..
cmake --build . -j

ctest -V -j # Runs all the tests

Testing on poor internet

Local test flag for slow internet: MSE_TEST, use this to make the program always read a cached copy of AllPrintings.json, really useful when running on crap internet.

export MSE_TEST=true
./mtg-search-engine-tests

Frontend

The frontend uses NextJS with the app dir.

cd frontend
npm i
npm build

About

This repo will have the AST for the mtg search engine. This repo is for checking if a card matches a query. It will (when I get round to it) have implementations in an array of languages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published