Giter Site home page Giter Site logo

mpwcode / netrunnerdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from netrunnerdb/netrunnerdb

0.0 0.0 0.0 9.63 MB

A Deckbuilder for Android:Netrunner LCG

Home Page: https://netrunnerdb.com

License: MIT License

Shell 0.92% JavaScript 22.45% PHP 50.44% CSS 3.77% Makefile 0.01% Dockerfile 0.05% Twig 22.36%

netrunnerdb's Introduction

This repository holds the source code of NetrunnerDB.

This is not where the cards data is

The data used by NetrunnerDB is at https://github.com/NetrunnerDB/netrunner-cards-json. If you want to fix a mistake in some card data, or add the data of a new card, you can submit a PR there. Also, that's where the localized data is.

Installing a local copy of NetrunnerDB

Prerequisite

  • you need a recent apache/php/mysql stack
  • your php module must be configured with mbstring.internal_encoding = UTF-8

How to install

  • Go into the directory where your server will reside
  • Clone the repository (or your own fork)
  • This creates a directory named netrunnerdb
  • Also, clone the data repository (or your own fork) at https://github.com/NetrunnerDB/netrunner-cards-json
  • Go into it the directory netrunnerdb
  • Install Composer (see https://getcomposer.org/download/)
  • Install the vendor libs: composer install. You'll be asked to input your database connection parameter.
  • Create the database: php bin/console doctrine:database:create
  • If the above command fails, edit app/config/parameters.yml and try again
  • Create the tables: php bin/console doctrine:schema:update --force
  • Import all the data from the data repository: php bin/console app:import:std -f path_to_json_repository
  • Configure your web server with the correct DocumentRoot. Alternatively, use PHP's built-in Web Server. Set your DocumentRoot to netrunnerdb/web
  • Point your browser to /app_dev.php

How to add card images

  • Put the card images in web/card_image/ (web/card_image/01001.png, etc.)

How to update

When you update your repository (git pull), run the following commands:

  • composer self-update
  • composer install (do not run composer update)
  • php bin/console doctrine:schema:update --force
  • php bin/console app:import:std path_to_json_repository

Deck of the Week

To update the deck of the week on the front page:

  • php bin/console app:highlight decklist_id

where decklist_id is the numeric id of the deck you want to highlight.

Update log

If you want to show site updates on the home page, copy web/update_log.example.txt to web/update_log.txt and copy the format with your own data. The update log shows dates, each with a list of updates. The update log should be kept fairly concise, with only information that is relevant to users of the website, not developers.

Setup an admin account

  • register
  • make sure your account is enabled (or run php bin/console fos:user:activate <username>)
  • run php bin/console fos:user:promote --super <username>

Add or edit cards

  • update the json data
  • run php bin/console app:import:json path_to_json_repository

netrunnerdb's People

Contributors

plural avatar alsciende avatar distributive avatar noahtheduke avatar alexrodwell avatar x3n1gm4x avatar gereons avatar avandever avatar yads avatar absotively avatar cloudrac3r avatar andreshomeroloz avatar dependabot[bot] avatar roitk avatar francescopellegrini avatar binarymelon avatar balkamm avatar eljenso avatar bblum avatar smashman avatar vrumanuk avatar coryowens avatar dirjel avatar jirkamarsik avatar muyjohno avatar mertenhanisch avatar pminten avatar locks avatar rlankin avatar spencerdub avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.