Catch csv file ftp/url, change content, save as new file

Job ID: 37676308

Budget: $30 – $250 USD

Please look at the added files to the description!

We need the following.

- Script(s) that can run on a 'website' which transforms csv or excel data from url or ftp source to a new csv according to our data.
- Script will need to run every 4 hours with cronjob
- Script creates a .csv after each job. The .csv will replace the former .csv So the name of the csv is always the same.

The concept is the same. We have this for 4 locations (url, 1 ftp) as explained below.
We will provide full url and ftp when awarded/

Please check the files added to better understand.


What we use it for.
- We will use the result csv to be catched by another website to update stock data in an ecommerce site.

Requirements on csv.
We need 1 column with 'sku' and 1 with 'quantity'
Quantity needs to be minimum 0 and can only contain an actual number.


SCRIPT 1
1- fetch csv from url: https:............................./articleStockList.csv
2 - Column H -> replace all negatite qty (-1,-2,-3,-100,-99, etc, etc) with '0'. So example '-3' will be '0'
3 - Column H -> replace the symbol '+' with nothing -> ''. So '99+' will be '99'
4 - Keep the rest of the csv as is and create the changed csv in a folder on the website with name'cosstocks.csv'
5 - Repeat every 4 hours

See attachment for example of the 'articleStockList.csv' . Production will have around 27000 lines



SCRIPT 2
1- fetch csv from url: https:............................./2fstocks%3fformat%3dcsv
2 - Column D -> replace all empty cells with '200'. So example ' ' will be '200'. Only do this for cells that also have content in column a (which is the sku)
3 - Keep the rest of the csv as is and create the changed csv in a folder on the website with name'kcustocks.csv'
5 - Repeat every 4 hours

See attachment for example of the 'Stocks.csv' . Production will have around 20000 lines

SCRIPT 3
1- fetch xlsx from url: https:............................./exportproductStock
2 - Column E -> replace all qty '1' with '200'. So example '1' will be '200'
3 - Keep the rest of the xlsx as is and save as a csv (; seperator)in a folder on the website with name'blbstocks.csv'
5 - Repeat every 4 hours

See attachment for example of the 'productstock.xlsx' . Production will have around 2000 lines


SCRIPT 4
1- fetch csv from FTP server (login required): ftp...............................nl/Artikelbestand/Voorraadvwp.csv
2 - remove line 2 from csv. That is always empty and no use
2 - Column B -> replace words with a quantity.
'voldoende' -> '200'
'beperkt' -> '2'
'geen' -> 0
3 - Keep the rest of the csv as is and create the changed csv in a folder on the website with name'importverwimp.csv'
5 - Repeat every 4 hours

See attachment for example of the 'Voorraadvwp.csv' . Production will have around 21000 lines

Things to consider
- Script need to be lightweight to process data fast
- Result csv needs to be same name, same location. So overwrite them.

We will give you
- Correct destination url for csv and the ftp login for csv
- Access to webserver to get the script going


Any questions let me know
Related categories: PHP Excel Web Scraping Software Architecture MySQL