This is the repository for https://foreignsubs.com. It is currently a work in progress.
In short, the purpose of ForeignSubs is to document when a movie or tv show has foreign subtitles.
Foreign subtitles are defined as subtitles that exist to display information either not spoken but is relevant (e.g. 3 months later
) or language spoken that is not in the main language of the media. So if the main language of the movie is in English, but there are some lines in Italian, the spoken Italian lines would be considered foreign subs.
ForeignSubs is built in three parts: A frontend built in TypeScript using Angular, a RESTful API built in Python3 using FastAPI, and MongoDB as the database.
Inside the docker
folder, run docker-compose up -d
to launch MongoDB. Run docker-compose down
to stop.
- Make sure to update the database username and password if you are using this in production.
Fsubs uses Poetry to handle dependency management. You can install Poetry by running curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
.
Then installfsubs
by running poetry install
inside of the backend
directory.
You can now run fsubs
by running poetry run fsubs
. Add --help
for additional options.
The --config/-c
option lets you use a custom config file. It should be in ini
format.
NOTE:
If you want to reload automatically while developing, you must create a file in
backend/fsubs/config
calleddefault_reload.ini
. In the section called[app]
setreload=True
.Best practice: copy
default.ini
todefault_reload.ini
and changereload
fromFalse
toTrue
.
fsubs can be configured using environment variables. They correspond to the command line options as follows:
Environment Variable | CLI Option | Description |
---|---|---|
FSUBS_APP_BASE_URL | --base_url |
Set base url. |
FSUBS_APP_BIND_ADDRESS | --bind-address |
Set app bind IP address. |
FSUBS_APP_BIND_PORT | --bind-port |
Set app bind port. |
FSUBS_APP_JWT_ALGORITHM | --jwt_algorithm |
Set jwt algorithm. See pyjwt docs for possible values. |
FSUBS_APP_JWT_EXPIRES | --jwt_expires_hours |
Set jwt expire time in hours. |
FSUBS_APP_JWT_SECRET | --jwt_secret |
Set the jwt secret used for encoding/decoding. |
FSUBS_APP_LOG_LEVEL | --log-level |
Set app log level; valid values are debug,info,warning,error,critical . |
FSUBS_DB_HOSTNAME | --db-hostname |
Set the database hostname. |
FSUBS_DB_PASSWORD | --db-password |
Set the database password. |
FSUBS_DB_PORT | --db-port |
Set the database port. |
FSUBS_DB_USERNAME | --db-username |
Set the database username. |
Configuration values are read in the following order:
- CLI params
- environment vars
- custom config file
default_reload.ini
configdefault.ini
config
This project was generated with Angular CLI version 8.1.1.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
More information for the frontend can be found in the frontend folder README.
This code is released under the MIT License. See the LICENSE file for details.
- Joe Eklund - https://github.com/joe-eklund
- Sam Eklund - https://github.com/samueldeklund
- Sam Maphey - https://github.com/sammaphey
- Nick Wong - https://github.com/wongesse
Thanks to all contributors of this repo! If you would like to contribute you can contact the authors or open a Github issue.