Support users in publishing data on WordPress and generate prompts for ChatGPT - prompt templates are intended to prepare descriptions for the platforms YouTube, Instagram, and Pinterest.
- Prepare prompts for YouTube, Instagram, and Pinterest based on templates (users must copy-paste prompts to ChatGPT because using API needs an extra fee so it is not included in this project).
- Generate WordPress code which can be copy-paste to the WordPress application
- Create an API to automatically publish posts on WordPress.
- Example templates for prompts generator and WordPress code
- Before every run automatic backup preparation in the indicated location
Main functionalities for web platforms:
WordPress | YouTube | ||
---|---|---|---|
generate copy-paste code for posts based on templates | prompt for ChatGPT | prompt for ChatGPT | prompt for ChatGPT |
publishing new posts via API | - | - | - |
ability to copy the entire code or its fragments from the UI level or separate text files | - | - | - |
- Input data for the application are stored in an Excel file (the application converts data from an Excel file for temporary data tables on which you can later invoke SQL commands)
- Every web application's data contains example templates that include specific strings of characters to replace data from the database (example: '_EXAPLE_STRINGS_TOREPLACE'). Example templates are located in the folder: ..\prepare_data\templates
- Prepared data are saved in the output file and visible to the user in the main application window. The main output file is located in the folder: ..\prepare_data\output. Smaller pieces of code generated when preparing the final output file are located in the folder: ..\prepare_data\templates
- Prepared data for WordPress could be used to create new posts via API or copy-paste manually
- Windows 11 (the application has not been tested on any other environment)
- Visual Studio Code
- Python
- JSON
- Excel
- Txt files
- WordPress REST API Authentication
Download files from GitHub
git clone https://github.com/FooodMoood/python-app_updating_web_data.git
Before using the app set you configuration in a files below:
File path | Variable name |
---|---|
..\apis\config.py | wp_base_url |
..\apis\config.py | wp_username |
..\apis\config.py | wp_password |
..\prepare_data\config.py | yt_icon_url |
..\data\data-food.xlsx | sheet: ingredients, column: ingredient_wp_url |
..\data\data-food.xlsx | sheet: wp_categories, column: wp_id |
The application is launched from the app.py file. The application is prepared to run locally on a private computer.