1
0
Fork 0
mirror of https://github.com/ldericher/fftcgtool synced 2025-01-15 15:02:59 +00:00

PKG structure

This commit is contained in:
Jörn-Michael Miehe 2021-08-09 07:01:25 +02:00
parent c34b7856a4
commit 2cfa2d4b52
5 changed files with 10 additions and 9 deletions

View file

@ -1,3 +1,4 @@
from book import Book from .book import Book
from opus import Opus from .opus import Opus
__all__ = ["Book", "Opus"]

View file

@ -2,8 +2,8 @@ import logging
from PIL import Image from PIL import Image
from cards import Cards from .cards import Cards
from imageloader import ImageLoader from .imageloader import ImageLoader
def chunks(whole: list[any], chunk_size) -> list: def chunks(whole: list[any], chunk_size) -> list:

View file

@ -1,6 +1,6 @@
import requests import requests
from card import Card from .card import Card
class Cards(list[Card]): class Cards(list[Card]):

View file

@ -2,7 +2,7 @@ import logging
import roman import roman
from cards import Cards from .cards import Cards
class Opus(Cards): class Opus(Cards):

View file

@ -3,7 +3,7 @@ import argparse
import logging import logging
import os import os
from fftcg import Book, Opus import fftcg
# constants # constants
GRID = 7, 10 # default in TTsim: 7 rows, 10 columns GRID = 7, 10 # default in TTsim: 7 rows, 10 columns
@ -43,8 +43,8 @@ def main() -> None:
os.chdir("out") os.chdir("out")
# main program # main program
opus = Opus(args.opus_id) opus = fftcg.Opus(args.opus_id)
book = Book(opus, GRID, RESOLUTION, "eg", args.num_threads) book = fftcg.Book(opus, GRID, RESOLUTION, "eg", args.num_threads)
book.save(f"{opus.name}_{{}}.jpg") book.save(f"{opus.name}_{{}}.jpg")
# bye # bye