Fuelio is a nice app to keep track of fuel consumption and vehicle costs. You can easily retrieve the CSV files.
I wanted to store my data on a MySQL database in order to keep a local history and also to do some custom stats even if the app is pretty complete.
Check src/Entity files.
- PHP 8.3
- MySQL
You need to retrieve your data: https://fuel.io/faq_backup_help.html
Create a folder to store all csv files.
You need a MySQL database
- Clone
git clone https://github.com/baptistebisson/fuelio-to-mysql.git- Setup env
cd fuelio-to-mysqm && cp .env.example .env- Setup the database
Create a fuelio database and import the fuelio.sql file.
- Setup composer
composer install- Run it
php console.php app:sync --folder=/path/to/fuelioYou can run this command multiple time, data will be updated if changed for same date.
Found 3 files
Processing vehicle-2-sync.csv
Found a total of 15 data
Found a total of 15 categories
Found a total of 21 costs
Processing vehicle-3-sync.csv
Found a total of 15 data
Found a total of 15 categories
Found a total of 7 costs
Processing vehicle-4-sync.csv
Found a total of 0 data
Found a total of 0 categories
Found a total of 0 costs
Done!
