![]() The path is used as argument for the mkword.py. Normally you adjust this file only once at the beginning. YAML file with all the necessary parameters for render.py. You even don't need to copy this file to your local git repository but you need to add the path to this file into mkword.py file Takes data from the markdown file, converts and inserts it into a Word document. Now you can use git for documentation creation New Word file will be created from your MarkDown file Now you can use this folder for new documentation creationĮdit mkword.py file: change the path to the script/render.py file if necessaryĮdit or create appropriate Word template file Change the name of the folder in accordance with your project. Any simple text editor can be used, but this is not very convenientĬopy folder 'example' to your local git repository. Install Python3 with YAML and pywin32 packages (win32com.client) Table_caption - transforms markdown caption to the word caption for tablesįigure_caption - transforms markdown caption to the word caption for figuresĬlone this project into your local folder Structure_verification - verifies if the section corresponds the titleĬhange_data - inserts data in this section Using the structure.yml data and temporary docx files (created earlier) as input, render.py adds all the necessary Word objects (for example, fields), implement the styles and paste the converted data into the correct places in the resulting Word document They are temporary and render.py removes them in the end One of the first operations performed by render.py is to convert the MarkDown files to docx format. Instead of managing one large file, it’s easier to manage several smaller ones Only MarkDown files are modified manually. Generate Microsoft Word document with all necessary styles, fields, templates. Use MarkDown with one of the markdown editors (I use Typora) Manage several small documents instead of one large. If the document is large (for example, LLD), divide it into smaller pieces. Python with pywin32 - pywin32 is used for Word file change YAML - YAML file (structure.yml) describes the structure of the final Word document and contains other input parameters for python script (render.py) GIT (GitHub for example) - version control system Markdown with some editor (I use Typora) - documents creation We only need to solve this for our particular one.Īdd styles for all tables (in accordance with corporate requirements)Īnd I have exactly the same Word file that I had when I created it manually (old style).įor this change we may use VBA macros but I prefer to use pywin32 package for python. So I think it is impossible or very difficult to solve this task in general for all cases.īut the fact is that we don’t need to solve this problem for all cases. But, of course, we can not convert everything, and we have a lot of things in Word which are missing in MarkDown. With all necessary corporate styles and requirements. Now, if we have all the documentation created in MarkDown, we can think about their It is powerful enough and allows us to use GIT (for example, GitHub) to manage all changes. If we want to take full advantage of GIT we have to use something else instead of Word. It is used in the development, but why not to use it for documentation? But we have another powerful tool with an excellent reputation for managing all of this. And everything looks perfect if you don’t need to make a lot of changes by many employees and keep track of all these changes, discussions and approvals. It is a powerful tool with many features and settings. Microsoft Word is one of the most well-known de facto standards for documentation in many companies. Why is MS Word not always the right choice?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |