mirror of
https://github.com/ldericher/fftcgtool
synced 2025-01-15 15:02:59 +00:00
PKG structure
This commit is contained in:
parent
c34b7856a4
commit
2cfa2d4b52
5 changed files with 10 additions and 9 deletions
|
@ -1,3 +1,4 @@
|
||||||
from book import Book
|
from .book import Book
|
||||||
from opus import Opus
|
from .opus import Opus
|
||||||
|
|
||||||
|
__all__ = ["Book", "Opus"]
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from card import Card
|
from .card import Card
|
||||||
|
|
||||||
|
|
||||||
class Cards(list[Card]):
|
class Cards(list[Card]):
|
||||||
|
|
|
@ -2,7 +2,7 @@ import logging
|
||||||
|
|
||||||
import roman
|
import roman
|
||||||
|
|
||||||
from cards import Cards
|
from .cards import Cards
|
||||||
|
|
||||||
|
|
||||||
class Opus(Cards):
|
class Opus(Cards):
|
||||||
|
|
6
main.py
6
main.py
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue