I found this question that had the answer to the question about performing batch conversions with Pandoc, but it does not answer the question of how to make it recursive. I stipulate in advance that I am not a programmer, so I ask for help here.
The Pandoc documentation is subtle regarding the details regarding file transfers to an executable, and based on the script, it seems that Pandoc itself is not able to parse more than one file at a time. The script below works fine on Mac OS X, but only processes files in the local directory and displays the results in the same place.
find . -name \*.md -type f -exec pandoc -o {}.txt {} \;
I used the following code to get something from the result I was hoping for:
find . -name \*.html -type f -exec pandoc -o {}.markdown {} \;
This simple script, using Pandoc installed on Mac OS X 10.7.4, converts all the relevant files to the directory in which I run it for markdown and saves them in one directory. For example, if I had a file called apps.html , it will convert this file in apps.html.markdown to the same directory as the source files.
While I am glad that he is doing the conversion, and this is fast, I need him to process all the files located in one directory and put the markup versions into a set of mirrored directories for editing. Ultimately, these directories are in the Github repositories. One branch is for editing, and the other is for production / publication. In addition, this simple script saves the original extension and adds a new extension to it. If I go back, it will add the HTML extension after the markdown extension, and the file size will only grow and grow.
Technically, all I need to do is to parse one branch directory and synchronize it with the production one, then when all the changed, deleted and new data is checked correctly, I can make commits to post the changes. Looks like the Find command can handle all this, but I just have no idea how to set it up correctly, even after reading Mac OS X and Ubuntu pages.
Any kind words of wisdom will be deeply appreciated.
Tf