Giter Site home page Giter Site logo

code2md's People

Contributors

itsametuni avatar

Watchers

 avatar

code2md's Issues

Rewrite plan

This is the basic code structure for the rewrite

Worker classes

  • MarkdownBuilder-> Helper class to build a string with markdown contents. The same as the current MarkdownHelper.
  • MarkdownGenerator-> Class that will be in charge of generating the markdown pages using the reflection and XML data provided.
  • ReflectionToText-> (static) class that will have helper methods used to convert reflection data into text (such as gathering modifiers, cleaning up the type names, etc)
  • DataGatherer-> Class that will be in charge of gathering and joining together the data obtained through reflection and XML
  • Utils -> (static) class that has miscellaneous helper methods that don't belong anywhere else (like a method for string cleaning)
  • TemplateParser - > class responsible for parsing the supplied template.
  • TemplateReplacer -> class that will be in charge of replacing the supplied parsed template with the data passed to it by the MardownGenerator. Basically replacing the template tags with data gathered about the project.

Data Types

  • XmlData -> contains the contents of all possible XML tags as string fields.
  • TypeData -> contains information about a type such as it's TypeData, lists of children fields, properties and methods, XmlData.
  • MethodData -> contains information about a method such as it's XmlData, list of parameters data, MethodInfo.
  • PropertyData -> contains information about a property such as it's XmlData, PropertyInfo.
  • ParameterData -> contains information about a parameter such as it's ParameterInfo and description (one string).
  • FieldData -> contains information about a field such as it's FieldInfo and XmlData.

Output templates

There should be a configuration file that serves as a template for the generated output. code2md will then grab that template and replace some tags (like $method_signature$) with the data it got from the XML documentation and from the assembly. This would allow a lot more control over the generated markdown and would enable the user to customize it however he/she wants.

For example:

Here the user chose to add an html tag e with the highlight-type class which will be picked up by some HTML/CSS/Javascript wizardry and color it according to its contents.

# $class_name$

## Fields

Type                                           | Name             | Description
-----------------------------------------------|:----------------:|------------
<e class="highlight-type">$parameter_type$</e> | $parameter_name$ | **Summary:** $parameter_summary$ **Remarks:** $parameter_remarks$

## Methods

### **$method_signature$**

**Summary:** $method_summary$
**Remarks:** $method_remarks$

...

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.