Giter Site home page Giter Site logo

wp-feedtoposts's Introduction

JSON Feed wp-posts importer

A posts importer based on a JSON stream.
Posts generation by form and handle an automation system.

Thanks to this tutorial Creating Custom WordPress Administration Pages and to Easy WordPress Admin Notifications, which helped me a lot for the creation of this plugin

Getting Started

  • Local server environment or live server

Prerequisites

  • Tested on WP 4.9.7

  • Your Feed must be a JSON, and formatted like this below

{
   "items": [
      {
         "pubdate": "Thu, 21 Dec 2000 16:01:07 +0000",
         "description": "Your content (html is ok)1",
         "title": "Title1"
      },
      {
         "pubdate": "Thu, 21 Dec 2000 16:01:07 +0000",
         "description": "Your content (html is ok)2",
         "title": "Title2"
      }
   ]
}

I do not know if it will work on previous or higher versions

Installing

  • Clone or download the repository, and put files into /wp-content/plugins/
https://github.com/natinho68/wp-FeedToPosts.git
  • Activate the plugin
  • Go to the Feed to posts page in the admin menu
  • Put a feed and click on "Generate Posts"
  • Your posts have been imported

Automation

Please note that for automation, you must first inject posts via the form in the settings of the plugin. Once done, you are free to do automation as explained below.

If you want to check that new posts are available in your feed, add a cron job like this (here every 5 minutes) :

*/5 * * * * wget http://YOURDOMAIN.DOMAIN/?rest_route=/FeedToPosts/v1/feedtoposts

If you want simple authentication, add a .htaccess require_auth and .htpasswd pair, for this url. Just add --user user --password pass to your cron job.

Author

Nathan MEYER

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.