Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
James231 committed Oct 1, 2018
1 parent eb5b0f2 commit 360241b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 49 deletions.
2 changes: 1 addition & 1 deletion Documentation/documentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Thanks for downloading Documentation Templater!
It is current functioning but incomplete. There is much more content to come!

See the readme.md for more info (or view it on GitHub) here:
https://github.com/james231/documentation-templater
https://github.com/james231/documentation-templater.git

Before using it for your own project, take a look at the .txt files in Input folder. These contain the page content generate the .html files in the 'Output' folder. Make sure you view the 'Output' HTML files to see what the tool is currenlty capable of.
The rest of the HTML (styling and layout) comes from the 'Template' folder.
Expand Down
Binary file added Documentation/images/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 0 additions & 46 deletions Source/docTemplater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,18 @@
using System.Reflection;
using System.Collections.Generic;



/*
Debugging can be done using the VS command prompt. add -debug flag when compiling
finish the "Needs finishing"s with more content (tabs, tables, etc)
Nested tabs not working.
Problem is occuring as when the code sees ### Begin Tabs it looks for the next ### End Tabs
but with nested tabs there will be another ### Begin Tabs and ### End Tabs first which it should ignore
checkout function "CreateFileMenuContent" and handle layers
Should be able to identify a certain tab as active
separate templates for active tab?
Sidenav:
Check subsubdirectories are working
Have an active tag thingy on the active menu item (different files for active and not active)
the active menu item should have directory menus expanded
checkout function "CreateFileMenuContent" and handle layers
*/




namespace apitosandboxtool
{
class MainClass
{
public static string[] templateFileNames = new string[12] {"page_template.html", "section_content.html", "section_header.html", "sidenav_directory.html", "sidenav_page.html", "table_cell.html", "table_heading.html", "table_parent.html", "table_row.html", "tabs_content.html", "tabs_parent.html", "tabs_tab.html"};

// directorys do not end in a slash !!!
public static string dirPath;
public static string outputPath;
public static string templatePath;

// class representing the root directory. Directories will only contain the txt/html files we are dealing with
public static MyDirectory root;

// Counts the number of sections/tabs/tables/HTMLs we are using
public static int baseItemNumber = 1;


Expand Down Expand Up @@ -103,8 +68,6 @@ public static void CreateFile (MyFile file) {
public static List<BaseContent> ParseStringToContent (string text) {
string[] lines = text.Split(new[] { Environment.NewLine }, StringSplitOptions.None);

// In this list we'll have all consecutive content lines joined together
// so the strings should alternate between identifiers and content
List<string> parts = new List<string>();

string curPart = "";
Expand Down Expand Up @@ -354,15 +317,6 @@ public override string GetString (string filePath) {
baseItemNumber++;
return tableString;
}


///////////////////////////////////////////////////////////////////////////////
// Needs finishing
// If you need to get the string for general content (which may contain sections/tables/tabs etc)
// then use the GetMainContent function (passing in the children as the argument)
//////////////////////////////////////////////////////////////////////////////


return "";
}
}
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ It comes with an example template using [Bootstrap 4](https://getbootstrap.com/)

Note: This is project is still WIP. You may encounter bugs. I plan on adding better documentation for using the tool, supporting more page elements, more example templates, and possibly an interface soon.

<img src="https://i.imgur.com/plBgyrW.png" alt="drawing" width="700" height="500" />
![Image](Documentation/images/main.png)


## Install

### Windows
Clone the repository using:
`git clone https://github.com/james231/documentation-templater`
`git clone https://github.com/james231/documentation-templater.git`
To generate the documentation you need to execute the `docTemplater.exe`. This is built as a Windows Console Appliction so can be executed by double clicking on through the Command Line.
If you want to rebuild the application from the source file `Source/docTemplater.cs`, you can use the lates Mono or .NET C# compilers.

Expand Down

0 comments on commit 360241b

Please sign in to comment.