AutoHotkey Community

It is currently May 27th, 2012, 10:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: February 13th, 2010, 8:05 am 
Offline

Joined: January 8th, 2007, 1:14 pm
Posts: 83
This is really awesome, thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2010, 11:17 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Thx.

I might change it so it does AHK syntax highlighting in the future.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2010, 11:30 am 
i have not seen how it looks. But i trust you blindly and know it is a good work like allways.
One question. Is it somehow possible to integrate html code into documentation? Have never tried this. Custom html should be usable in doc for better organizing it.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2010, 12:10 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Quote:
Is it somehow possible to integrate html code into documentation? Have never tried this. Custom html should be usable in doc for better organizing it.

Nope, as far as i know. However, project is open source and I guess it will be easy to fix Perl script to support something like that. For instance with (start html) (end html) similar to (start code) (end code).
Thinking about it, it can be done by an ahk script too, without changing the NDoc Perl code. This would mean that I don't have to fix each new version of NDoc. For instance, I could mark html code like this:

Code:
(start code)
(start html)
       html code
(end code)


You can located then this <pre>(start html) section and fix it (decode html and replace pre section with it) to get HTML injection.

Sounds feasibile... I might just do it when I find time.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2010, 2:24 pm 
i was more thinking to integrate single tags in and between paragraphs without marking it as a code section. Otherwise it takes the simplecity away. Or your suggested way could be combined with custom tags like BBCode, translated automatically.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 13th, 2010, 2:34 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
OK, I implemented script that transforms ndoc html file with

Code:
(start code)
(html)
   html code...
(end code)


to html without code section and given html instead.
The idea is good, Ill extend NDoc to support other extensions working as a post build Natural Docs script. The (html) extension is to be used with longer html paragraphs containing stuff like tables etc..

I'll support some form of small markup extensions - is it going to be bbcode or something else like textille is yet to be determined.

For now, you can use this simple script to use (html) extension:


Code:
   FileIn = test.html
   FileOut = test_ex.html


   FileRead, html, %FileIn%   
   ExtendCodeBock(html)
   FileDelete, %FileOut%
   FileAppend, %html%, %FileOut%
return

ExtendCodeBock(ByRef html) {
   loop
   {
      j := RegExmatch(html, "\Q<blockquote><pre>(html)\E(.+?)\Q</pre></blockquote>\E", m)
      if !j
         return

      DecodeHtml(m1)
      html := SubStr(html, 1, j-1) m1 SubStr(html, j+StrLen(m))
   }
}

DecodeHtml(ByRef txt) {
   StringReplace, txt, txt, &amp, &, A
   StringReplace, txt, txt, &quot;, ", A
   StringReplace, txt, txt, ', ', A
   StringReplace, txt, txt, &lt;, <, A
   StringReplace, txt, txt, &gt;, >, A
}

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 11:50 pm 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Just discovered this the other day and started to play with it. Works great but I'll have to change my documentation style a little bit to get it to work the best. Thanks for sharing. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2010, 4:23 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
After long time of no coding, I needed a docu generation tool. In the past, I worked with Natural Docs, and it was ok. But before installing it again, I tried the GenDocs, which comes with the SciTE4AutoHotkey. After having an issue with it (still not reported by me), I am back to Natural Docs. It is easier and more powerful. I like it still. Here is a simple "make.ahk" script I use to generate the docs with mkdoc s:
Code:
#NoEnv
SendMode Input
If RegExMatch(A_ScriptName, "^make_(.*?)\.(?:ahk|exe)$", dir)
   SetWorkingDir %A_ScriptDir%\%dir1%
else
   SetWorkingDir %A_ScriptDir%
EnvGet, PATH, PATH
EnvSet, PATH, C:\Program Files\NaturalDocs\mkDoc;%PATH%
Run, %comspec% /c mkdoc s

This file can be named to whatever you will. It works as if the command line was open for that current directory and calls mkdoc s. But what if the is in an other directory as the script.

Then the script can be named to something like this: "make_dir", where "dir" is a relative folder to A_ScriptDir. The script sets then the WorkingDir to "%A_ScriptDir%\%dir%". This can be in example ".." to go one up in directory structure. Then the script to document is searched in that folder.

Do you have some other more or less useful scripts to work with Natural Docs? Please share or share your idea.

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 14th, 2011, 4:19 pm 
Offline
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
Hi,
this is really great :!: Thx majkinetor :!:

I'm having some questions on it:
  • Can you tell me what NDoc version it uses?
    If not yet up to date, could you please update it to 1.51 (or tell me how to do so):?:
    Would be very nice.
  • mkdocs is also very useful. Question: Would it be possible to merge different files (as the forms framework docs) into one single file?
    (without merging the source files of course)
  • Related to this and to anyone out here who has some knowledge of HTML:
    I like the idea of modifying the documents with AHK, but unfortunately I don't know anything about html.
    How could I make (page: [title]) tags start a new page just like different files?


Regards
maul.esel

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Last edited by maul.esel on April 22nd, 2011, 9:48 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2011, 5:43 pm 
Offline
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
NaturalDocs 1.52 is released! Please update!

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: specter333, XX0 and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group