I search for vim color schemes, and store them. That's about it.
The worker is a CLI used to import and manage the data for vimcolorschemes.
Note: The MongoDB database can also be ran from the app docker setup.
Update the values in .env
to your needs.
TIP: Read the comments on the dotenv file.
The .env
is automatically picked up by CLI when it runs.
Since GitHub's API has a quite short rate limit for unauthenticated calls (60 for core API calls). I highly recommend setting up authentication (5000 calls for core API calls) to avoid wait times when you reach the limit.
To do that, you first need to create your personal access token with permissions to read public repositories. Follow instructions on how to do that here.
To run a job, use the bin/start
script:
bin/start <job>
Import repositories into the database
bin/start import
Import only a specific repository using the --repo
option.
bin/start import --repo morhetz/gruvbox
Fetch the necessary data for the repositories
bin/start update
Force a full update of all the repositories by using the --force
option.
bin/start update --force
Update only a specific repository using the --repo
option.
bin/start update --repo morhetz/gruvbox
Generate color data for the vim color scheme previews
bin/start generate
Force a full generation of all the repositories by using the --force
option.
bin/start generate --force
Generate preview data for only a specific repository using the --repo
option.
bin/start generate --repo morhetz/gruvbox
bin/test
go test
flags can be used:
bin/test --cover
golint is configured to run using bin/lint
.
go fmt
can be easily used on all code using bin/format
.