Python Automation with Pandas
Budget: $30 – $250 USD
MCT0124-22
Write a program that can read and write from/to a csv file and modify files in a filesystem.
We have a folder containing ten websites. We are looking for a one-click solution that will allow us to batch delete contact.us/contact.html files in each folder and replace them with a standard contact.html page that's populated with correct info from a csv file.
(CSV rows do not have to be mapped, program will run through whatever data is in the spreadsheet on a given folder of websites and change them according to what is present in the csv)
For every folder:
Program will use a CSV file as data.
Program will use contact.html as an html template.
Program will search recursively in each folder for contact.html or contact-us.html files.
Program will delete existing contact.html/contact-us.html files found in folder.
Program will edit the contact.html template with data found in spreadsheet.
For each folder the program will searches recursively for contact-us.html or contact.html.
If found, it will delete the contact-us.html/contact.html.
Then it creates a new contact.html or contact-us.html in its place (to preserve existing nav links).
So, for example:
A folder named website-1 has a contact.html page in its root directory.
The script will delete the contact.html page and replace it with the template contact.html.
Folder website-2 has a contact-us.html located under /contact/contact-us.html from its root. Program will delete the file under /contact/contact-us.html and replace it with the contact.html template under the same path. HOWEVER it must write the name of the file as contact-us.html, the same as before, in order to preserve existing nav links.
The new contact.html is going to have a generic template. The info in the contact page will be different according to the addresses listed in the spreadsheet. Each row of the spreadsheet corresponds to a company.
Program iterates through whatever data is in the csv regardless of folders, it will make changes to the first folder, in alphabetical order. We do not want to map the spreadsheet rows to individual folders manually.
please respond with PANDAS in your message body if you've read this far.
Deliverables
Program will use a CSV file as data.
Program will use contact.html as an html template.
Program will search recursively in each folder for contact.html or contact-us.html files.
Program will delete existing contact.html/contact-us.html files found in folder.
Program will edit the contact.html template with data found in spreadsheet.
Write a program that can read and write from/to a csv file and modify files in a filesystem.
We have a folder containing ten websites. We are looking for a one-click solution that will allow us to batch delete contact.us/contact.html files in each folder and replace them with a standard contact.html page that's populated with correct info from a csv file.
(CSV rows do not have to be mapped, program will run through whatever data is in the spreadsheet on a given folder of websites and change them according to what is present in the csv)
For every folder:
Program will use a CSV file as data.
Program will use contact.html as an html template.
Program will search recursively in each folder for contact.html or contact-us.html files.
Program will delete existing contact.html/contact-us.html files found in folder.
Program will edit the contact.html template with data found in spreadsheet.
For each folder the program will searches recursively for contact-us.html or contact.html.
If found, it will delete the contact-us.html/contact.html.
Then it creates a new contact.html or contact-us.html in its place (to preserve existing nav links).
So, for example:
A folder named website-1 has a contact.html page in its root directory.
The script will delete the contact.html page and replace it with the template contact.html.
Folder website-2 has a contact-us.html located under /contact/contact-us.html from its root. Program will delete the file under /contact/contact-us.html and replace it with the contact.html template under the same path. HOWEVER it must write the name of the file as contact-us.html, the same as before, in order to preserve existing nav links.
The new contact.html is going to have a generic template. The info in the contact page will be different according to the addresses listed in the spreadsheet. Each row of the spreadsheet corresponds to a company.
Program iterates through whatever data is in the csv regardless of folders, it will make changes to the first folder, in alphabetical order. We do not want to map the spreadsheet rows to individual folders manually.
please respond with PANDAS in your message body if you've read this far.
Deliverables
Program will use a CSV file as data.
Program will use contact.html as an html template.
Program will search recursively in each folder for contact.html or contact-us.html files.
Program will delete existing contact.html/contact-us.html files found in folder.
Program will edit the contact.html template with data found in spreadsheet.