Giter Club home page Giter Club logo

apwp's Introduction

APWP

Automatic Post for WordPress

Requirement

Use Python3 and

this library to pip install

pip install python-wordpress-xmlrpc

Usage

setup post directory.

post
├── content => wordpress content text
│   ├── content_1.txt
│   └── content_2.txt
├── image => post image file
│   └── sample_image_1.png
│   └── sample_image_2.png
├── postdata.csv => post data(csv)
└── postdata.json => post data(json)

postdata.csv

  • For csv files, you can specify only one tag

  • post/content/{content_file}.txt => content

id,title,content_file,tags,category,date,image
00000001,title is here 1,content_1.txt,cat,mylife,2017-08-31 14:59:59,sample_image_1.png
00000002,title 2,content_2.txt,vacance,summer,2017-08-31 15:00:00,sample_image_2.png

postdata.json

[
  {
    "id":"00000001",
    "title":"Title is here 1",
    "content_file":"content_1.txt",
    "tag":"cat, vegetable",
    "category":"mylife",
    "date":"2017-8-31 14:59:59",
    "image": "sample_image_1.png"
  },
  {
    "id":"00000002",
    "title":"title 2",
    "content_file":"content_2.txt",
    "tag":"vacance, music",
    "category":"summer",
    "date":"2017-08-31 23:59:59",
    "image": "sample_image_2.png"
  }
]

Setting

Clone this repository then make "post" directory and content.

next, set info of wordpress connection and postdata config.

execute "main.py"

git clone https://github.com/shinshin86/APWP.git

cd APWP
mkdir post # and make content(look "Usage")

# copy and edit cfg file.
cp config/connect_wp.cfg.example config/connect_wp.cfg
cp config/postdata_dir.cfg.example config/postdata_dir.cfg

# execute
python app/main.py

Make a roadmap to Version 1.0

Function of Implementation plan.

  • Create a multi post function.
  • Create some "apwp" command.
  • Create web base ui.
  • Change application architecture

Design drawing of application

APWP(web ui)

​ │

​ │Store post schedule and Check post schedule

​ │

APWP(cli) <— fetch post data— json, csv, and DB

​ │

​ │send post to wordpress

​ │

WordPress

Test

Use unittest

python -m unittest discover

Licence

MIT License

apwp's People

Contributors

shinshin86 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

apwp's Issues

Make a roadmap to Version 1.0

  • Create a multi post function.
  • Create some "apwp" command.
    • Create "apwp" command.
    • "apwp" command have CRUD
  • Create web base ui.

Change design of application

Change to ↓

APWP(webui)
​ │
​ │Store post schedule and Check post schedule
​ │
APWP(cli) <— fetch post data— json, csv, and DB
​ │
​ │send post to wordpress
​ │
WordPress

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.