- Install
git clone https://github.com/ra100/end-credits-gen.git
npm install
- Run
Open cli
folder: cd cli
npm --workspace=cli start ./input.yaml ./export.svg
To export png file directly, you need to have inkscape installed, and run:
npm --workspace=cli start ./input.yaml ./export.png
To export rendered frames with crawl speed configured by ppf
setting in yaml
npm --workspace=cli start ./input.yaml ./export/folder/
Limit number of CPU threads to be used:
npm --workspace=cli start ./input.yaml ./export/folder/ 1
This will produce folder with files ./export/folder/credits_<frame number>.png
- Install
git clone https://github.com/ra100/end-credits-gen.git
npm install
- Get AWS credentials and save in
~/.aws/credentials
(or any other way to allow CDK to deploy)
[default]
aws_access_key_id = YOUR_ID
aws_secret_access_key = YOUR_SECRET_KEY
- Run CDK
npm --workspace=cdk run cdk bootstrap
npm --workspace=cdk run cdk deploy
This will output link to API Gateway, save it. So you can call it later.
- POST credits in JSON format to:
<your_url>/credits
you'll get response in format:
{
"message": "Render queued",
"id": "C4E50HTlpLKOl0fnfjoA7"
}
- Get status of the render, call GET to
<your_url>/credits/{id}
You'll get status or redirect to download zip with rendered credits.
To be able to use custom fonts, you need to add them to png/fonts
directory.
From this: example.yaml
cdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
flowchart LR
A[fa:fa-user Client] -->|request| B{API Gateway}
B -->|POST /credits| C(fa:fa-gears JsonToSvg)
B -->|GET /credits/:id| D(fa:fa-gears Status)
C -->|invoke| E(fa:fa-gears Queue)
E -->|populate| SQS{fa:fa-message SQS}
E -->|save state| S3{fa:fa-message S3}
S3 -->|return zip| A
SQS -->|invoke| F(fa:fa-gears Render)
F -->|save frame| S3
D --> Status{Status?}
Status -->|in progress| A
Status -->|rendering done| G(fa:fa-gears Compress)
Status -->|compressing| A
Status -->|link to S3| S3
G -->|save zip| S3