Python Forum
1. How can I automate this batch creation of documents? 2. How can I automate posting
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1. How can I automate this batch creation of documents? 2. How can I automate posting
#1
I want to create and upload hundreds of posts to local Wordpress and want to know if the following is possible.

I have a few hundred documents each containing ~250 words of written content. And in separate folders images to go along with it

For example: Document 'Cat' has it's respective folder 'Cat Images' with cat1.jp, cat2.jpg,...cat50.jpg.

Similarly: Document 'dog' has it's respective folder 'Dog Images' with dog1.jpg,dog2.jpg...dog50.jpg.

There are such 500+ documents and 500+ corresponding image folders and each image folder contains about 50 images each. I am on Linux Mint currently and can open documents in either .odt, .docx or .txt format using Office Libre or Notepad.

Now how do I import the images from folder 'Cat Images' to document 'Cat' without manually selecting all and inserting for each and every file? How can I automate this type of post creation?
How do I automate uploading these documents to wordpress?
Can I skip both 1 and 2 and instead directly create posts in Wordpress?
Reply
#2
You can use a single html like "cat.html", "dog.html" and loop through the content of the image folders inserting them with <img src="Cat%20Images/catX.jpg">.

To automate the post (multiple file upload) I think that is a proper WP plugin to do that.
Reply
#3
wordpress supports REST API
https://www.google.com/search?q=wordpress+rest+api
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to automate the process br0oJ 0 251 Feb-14-2024, 12:01 PM
Last Post: br0oJ
  Automate screenshots taking and paste it to a web form isanka888 0 421 Nov-18-2023, 03:01 PM
Last Post: isanka888
  How to automate loop test check on Network device jpc230 1 586 Oct-09-2023, 09:54 PM
Last Post: Larz60+
  Python loop for posting data to web marciokoko 10 1,553 Aug-26-2023, 02:17 AM
Last Post: deanhystad
  Automate Word snippets PHbench 0 550 Jun-06-2023, 06:59 PM
Last Post: PHbench
  Word documents merging crewdk 1 859 Apr-03-2023, 06:32 AM
Last Post: buran
  Looking to automate updating a spreadsheet with image from email cubangt 2 979 Feb-14-2023, 03:43 PM
Last Post: cubangt
  automate new PDF creation with Bookmarks Based up Regex standenman 0 1,154 Jan-16-2023, 10:56 PM
Last Post: standenman
  Automate MML Commands saisankalpj 10 2,124 Dec-06-2022, 01:59 PM
Last Post: saisankalpj
  batch file for running python scipt in Windows shell MaartenRo 2 1,896 Jan-21-2022, 02:36 PM
Last Post: MaartenRo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020