An automation tool for creating draft posts on Wordpress using Rest API. It also supports automated compilation of HTML newsletter emails, Whatsapp Messages (to be used by User in later time) & facebook scheduling of posts with help of published posts & it's excerpt.
Run the setup.py script.
-
Create a jap_config.json file in article_publishing/Config folder with following content:
{ "client_key": <client key>, "client_secret": <client secret>, "google_api_key": <google_api_key>, "google_project_cx": "<search_engine_ID>" }
-
Run authorize.py from JAP_Utilities/JAP_Authentication folder and then follow the instructions.
-
Once done, check the jap_config.json again, it should now have resource_owner_key and resource_owner_secret keys.
-
Done! You are all set now.
-
Create issue_params.json if not already present in the root folder where create_post.py is present and update the fields accordingly:
{ "summaryfile" : "path/to/summaryfile", "articles_folder_path" : "path/to/articles/folder", "images_folder_path" : "path/to/images/folder", "publish_date" : "YYYY-MM-DD", "print_edition_articles" : [<print edition first article number>,<print edition last article number>], "blog_edition_articles" : [<blog edition first article number>,<blog edition last article number>], "volume_number": "Volume Number", "issue_number" : "Issue Number", }
Note :
- summaryfile : Full path to summary.docx file.
- articles_folder_path : Full path to the folder containing only articles files for the current issue.
- images_folder_path : Full path to the folder containing only images for the current issue.
- publish_date : Issue date in YYYY-MM-DD format
-
Name of the images should be the article number e.g 1.png/1.jpeg.
-
If runnig the script in Windows machine, replace '\' with '/' in the all the folder/file paths.
-
All .doc files should be converted to .docx file. This script won't work on .doc files.
-
Run create_post.py