How to approach automated text writing? What are the tools, practices and algorithms used in automated text writing?

For example, lets assume that I have access to wikipedia/wikinews and similar websites API and I would like to produce article about "Data Science with Python".

I believe that this task should be divided into two segments. First would be text mining and second would be text building. I'm more or less aware how text mining is performed and there are lots of materials about it in Internet. However, amount of materials related to automated text building seems to be lower. There are plenty of articles which says that some companies are using it, but there is lack of details. Are there any common ideas about such text building?
You should probably do some reading in the field of "Natural Language Generation", since this seems to relate most directly to your question. 

But the way you have described the process -- "text mining...text building" -- leads me to wonder if you are aiming for something much more ambitious.  It seems as though you aim to automate the process of 1) reading natural language texts, 2) understanding the meaning, and then 3) generate new texts based on that semantic knowledge.  I'm not aware of any general-purpose end-to-end systems that can do that, not even specialized systems by the likes of Palantir.  What you are aiming for would probably pass the Turing Test for fully capable Artificial Intelligence.