Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Export WP Posts and Sync to Sharepoint

Submitted by on November 14, 2017 – 12:24 pm

Long story short: old wiki is overloaded and broken; new wiki is not a wiki but SharePoint – a glorified file server; people are forced to improvise and put documentation on a WP wiki; bosses still want to see documentation in SharePoint; need a way to automatically sync new and updated posts from WP to SharePoint.

A couple of prerequisites to make this happen: the awesome wp2md utility and the pandoc package:

The default WP behavior when exporting posts is to prepend the filename with the date. Obviously, you want to remove this date prefix if you want exported posts to overwrite older files on SharePoint. The script does that.

This process is designed to run daily from cron and so it selects only those posts that have been created or modified in the past two days. You can adjust this as needed. You can download the script here.


Print Friendly, PDF & Email

Leave a Reply