Skip to content

modcommunity/tmc-srv-flag-importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple program that retrieves every country's flag image from an input file and downloads it to the images output directory. The input file (input.txt) should list the short code of each country on a new line.

Additionally, it also comes with a -f --fmt argument that allows you to output all country codes using a format you specified to the output.txt file.

Running The Program

Simply run the program using cargo run. You may pass the following arguments.

Name Default Description
-d --data "./data" The path to the data directory. This is where the input and output files are stored along downloaded images.
-f --fmt "Code: {{short_code}}" The formatted line to append to the output file.
-t --timeout 5 The HTTPS request timeout in seconds.

Run with arguments.

cargo run -- -f "Short Code: {{short_code}}"

Credits

About

A Rust program that downloads country flag images from FlagCDN and converts it to whatever format you'd like. Being used to mass import country flag images for TMC's server browser!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages