Coder Social home page Coder Social logo

wsoffcli's Introduction

wsoffcli

Collect data from https://ws-tcg.com/

Synopsis

Collect data from https://ws-tcg.com/.

Create a json file for each card with most information.

Example: 'wsoffcli fetch -n IMC' will fetch all cards with a code starting with 'IMC'

If you want more than one use '##' as seperator like 'wsoffcli fetch -n BD##IM'

'--serie' use a hidden number in the official site, this number is increment for each new set (e.g Kadokawa is number 259, Goblin 260 ...).

To use environ variable, use the prefix 'WSOFF'.

Options

  -h, --help           help for wsoffcli
  -n, --neo string     Neo standar by set
  -s, --serie string   serie number

SEE ALSO

Auto generated by spf13/cobra on 16-Nov-2023

wsoffcli's People

Contributors

akenaide avatar dependabot[bot] avatar kwadkore avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

kwadkore

wsoffcli's Issues

Add page_num option

  • Add page_num argument in parser
  • read page_num from specific config or in generic config
  • Parse from the given page if present, otherwise start from 0
  • Save the last page at the end, so we can have an incremantal update

Fetch products page

We want to collects products informations.

Format will be

[ ...
{
  "setName": "あやかしトライアングル",
  "releaseDate": "2023/11/23",
  "setCode": "AYT",
  "imageURL": "https://ws-tcg.com/wordpress/wp-content/uploads/20231013111510/BP%E3%80%8CAYT%E3%80%8DBOX.png"
}
...]

Booster cards in one unique file

Create an option to concat all cards in one unique file


--export (default card)

  • card: export each card in a single file
  • booster: export each booster in a single file
  • all: export in a single file

Add new field

Add imageCardURL from ws-tcg.com. It will contains the image URL.

Kanseru can skip pages

for {
	select {
	case retryLink := <-retry:
		jobs <- retryLink
		log.Printf("Retry: %v", retryLink)
	default:
		jobs <- fmt.Sprintf("%v?page=%d", Baseurl, page)
		page = page + 1
	}

	if kanseru {
		log.Println("Kanseru at: ", page)
		break
	}
}

We should put a condition on the break.

Read config from environ

We would like to run the cron more frequently. To achieve this, we need to configure the cron, and the cleaner way to do so is by using an environment variable.

To accomplish this, we should:

  • Configure Viper to read the correct variable name from the environment.
  • Add ARGS to the Docker file so that we can configure it even when using Docker.

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.