Offline chm Help did not open local, Onlinehelp is only opend lazarus / 13-General ---------------------------------------------------------------------- af0815 · 2015-01-10 13:06 I use the ChmHelpPkg and have all the chm in lazarusdir/docs/chm inserted. If i use the help funtion inside the code, it works. The Offlinedocs are open correct. If i go inside of Lazarus and open a dialog like Tools->Code Templates (German: Werkzeuge->Vorlagen) and use the helpbutton, only the Onlinehelp is loaded, not the Offline. If i search in fpdoc for 'Code Templates' it was found. I see this was done by all the helpbuttons inside the Dialogs of Lazarus. Normally the package ChmHelpPkg, should do a rewrite of the Origin (Online to Offline). Is this correct, or is this not implemented for the Lazarus internal dokumentation ? Lazarus built from SVN. ---------------------------------------------------------------------- marcov · 2015-01-10 13:23 Afaik there is no offline IDE Help.  FPC main docs are in latex, and library (units) reference in fpdoc (distributed as CHM) For Lazarus, LCL is in fpdoc format, the IDE help is not. I asked several times how to download the relevant rough html (to start working on packaging on CHM), but I was told (Vincent or Marc) there used to be a tool, but that it didn't work after a wiki update. Probably due to anti spam/bot measures. ---------------------------------------------------------------------- af0815 · 2015-01-10 13:32 The keyword used by the ide is '_Code_Templates'. The help in fpdoc is found with 'code templates' in user.chm::/user/usersu53.html. So i think the content is here, but not the binding from the ide- topics to the chm-topics. ---------------------------------------------------------------------- marcov · 2015-01-10 13:50 Quote from: af0815 on January 10, 2015, 02:32:40 pmThe keyword used by the ide is '_Code_Templates'. The help in fpdoc is found with 'code templates' in user.chm::/user/usersu53.html. That is true. Note the screenshot in that text to see /which/ IDE's code templates are described there. QuoteSo i think the content is here, but not the binding from the ide- topics to the chm-topics. That is true. The Textmode IDE help is probably not linked to those topics. But I doubt that is what you were talking about. ---------------------------------------------------------------------- af0815 · 2015-01-10 14:15 Quote from: marcov on January 10, 2015, 02:50:07 pmThat is true. The Textmode IDE help is probably not linked to those topics. But I doubt that is what you were talking about. I am Talking about the Lazarus-IDE help to the contetnt visible in fpdoc, if you press the Button in the Lazarus-Code Templates-Help Button :-) ---------------------------------------------------------------------- marcov · 2015-01-10 14:22 Quote from: af0815 on January 10, 2015, 03:15:05 pmI am Talking about the Lazarus-IDE help to the contetnt visible in fpdoc, if you press the Button in the Lazarus-Code Templates-Help Button :-) Yes, so again, that is only online afaik.  That code templates link in the FPC user manual is about the textmode IDE, not lazarus. That being said, if we ever have Lazarus fpdoc help we must make sure the keywords don't clash with the textide ones :_) ---------------------------------------------------------------------- af0815 · 2015-01-10 14:37 Quote from: marcov on January 10, 2015, 03:22:34 pmThat being said, if we ever have Lazarus fpdoc help we must make sure the keywords don't clash with the textide ones :_) Or generate a lazuser.chm, withe the correct content for Lazarus and only based on the actual user.chm but not depended. Ok, so this point is now clear. ---------------------------------------------------------------------- marcov · 2015-01-10 14:39 Step one is to get the content in a repeatable way. (iow not saving every page manually) ---------------------------------------------------------------------- af0815 · 2015-01-10 15:17 Quote from: marcov on January 10, 2015, 03:39:28 pmStep one is to get the content in a repeatable way. (iow not saving every page manually) This can be done in two ways First: Reactivating of the old wiki scanner (lazarus-ccr) and convert the wikipages into html (and fight against spam-blocker :-) ) Second: A snapshot from the wiki db is generated, extract and processed like First step Update: the old wiki scanner is not operable, because it looks like the wiki is protected by the 'bad behavior'. ---------------------------------------------------------------------- valdir.marcos · 2015-01-11 01:18 Quote from: af0815 on January 10, 2015, 04:17:23 pmSecond: A snapshot from the wiki db is generated, extract and processed like First step Maybe, this  information helps: http://en.wikipedia.org/wiki/Wikipedia:Database_download#Static_HTML_t ree_dumps_for_mirroring_or_CD_distribution http://medialab.di.unipi.it/wiki/Wikipedia_Extractor http://trulymadlywordly.blogspot.com.br/2011/03/creating-text-corpus- from-wikipedia.html http://wiki.imacros.net/Data_Extraction http://wiki.dbpedia.org/Datasets ---------------------------------------------------------------------- af0815 · 2015-01-11 07:54 Quote from: valdir.marcos on January 11, 2015, 02:18:37 amQuote from: af0815 on January 10, 2015, 04:17:23 pmSecond: A snapshot from the wiki db is generated, extract and processed like First step Maybe, this  information helps: ....No, the technique is wellknown, but the way is not gone today. I think the soloution can only come from the Team around the Wiki Server, if the give a way to process the data from the wiki other people can use this way to generate Offline- Help (eg. by a snapshoot via ftp). I have not found any soloution yet to work around the blocking software and to get the wiki content. ---------------------------------------------------------------------- marcov · 2015-01-11 10:07 Quote from: af0815 on January 11, 2015, 08:54:55 amNo, the technique is wellknown, but the way is not gone today. I think the soloution can only come from the Team around the Wiki Server, if the give a way to process the data from the wiki other people can use this way to generate Offline-Help (eg. by a snapshoot via ftp). I have not found any soloution yet to work around the blocking software and to get the wiki content. That is the same conclusion I reached about 2.5 years ago. Nothing changed since, though I have to admit I didn't really continuously pressured people. For the second step (export to help conversion, fixing up links, CHM etc) have a look at the programs (.pp's) in the fpcdoc repository (the ones that postprocess the latex generated html to chm) ---------------------------------------------------------------------- af0815 · 2015-01-11 11:52 Quote from: marcov on January 11, 2015, 11:07:11 amThat is the same conclusion I reached about 2.5 years ago. Nothing changed since, though I have to admit I didn't really continuously pressured people. For the second step (export to help conversion, fixing up links, CHM etc) have a look at the programs (.pp's) in the fpcdoc repository (the ones that postprocess the latex generated html to chm) Yes the caveeat is the first step. And also there are interesting parts in the lazarus-ccr. BTW i have tested with an older Browsers, it is also not working with the Lazarsu wiki. But the actual major browsers work. ---------------------------------------------------------------------- howardpc · 2015-01-11 14:00 Quote from: af0815 on January 11, 2015, 08:54:55 amI have not found any soloution yet to work around the blocking software and to get the wiki content. The wiki does have an export page in the toolbox section. If you choose a Category (e. g. IDE) rather than a single page, it will export all pages in that category as a single .xml file. This may go part way to helping you get content (without slowing the wiki server to a crawl for other users). ---------------------------------------------------------------------- valdir.marcos · 2015-01-11 16:23 Quote from: af0815 on January 11, 2015, 08:54:55 amI have not found any soloution yet to  ...  get the wiki content. Just one naive question: running a copy of the wiki content on a local server would not solve the problem with anti spam/bot measures? Static HTML tree dumps for mirroring or CD distribution MediaWiki 1.5 includes routines to dump a wiki to HTML, rendering the HTML with the same parser used on a live wiki. As the following page states, putting one of these dumps on the web unmodified will constitute a trademark violation. They are intended for private viewing in an intranet or desktop installation. http://en.wikipedia.org/wiki/Wikipedia:Database_download#Static_HTML_t ree_dumps_for_mirroring_or_CD_distribution See below where and how to make downloads: http://dumps.wikimedia.org/ http://en.wikipedia.org/wiki/Wikipedia:Database_download#Where_do_I_ge t... ---------------------------------------------------------------------- valdir.marcos · 2015-01-11 16:40 Quote from: marcov on January 11, 2015, 11:07:11 amFor the second step (export to help conversion, fixing up links, CHM etc) have a look at the programs (.pp's) in the fpcdoc repository (the ones that postprocess the latex generated html to chm) The problem is only to get the wiki content? After that, the rest of the process of generating help CHM files is still working? I am not sure is this is helpful in any way, but I was searchin information on the CHM format file and about open source tools to convert from HTML (or XML) to CHM files and found: http://linuxpoison.blogspot.com.br/2012/01/convert-chm-file-to-pdf- under-linux.html http://www.russotto.net/chm/chmformat.html https://code.google.com/p/html2chm/ https://www.openhub.net/p/html2chm http://www.softpedia.com/get/Authoring-tools/Help-e-book- creators/Tarabi-html2chm.shtml https://www.facebook.com/rabiul.khan.98622 http://cweiske.de/tagebuch/Generating%20CHM%20files%20with%20Wine%20on %20a%20Linux%20server,%20and%20a%20bit%20about%20PEAR's%20PhD%20transi tion.htm ---------------------------------------------------------------------- marcov · 2015-01-11 18:03 The CHM conversion will probably be done using the fcl-xml (which also contains html DOM parsers) and package CHM for the Dom to CHM work. External tools are not necessary. (and afaik no open source tool is crossplatform anyway, except for the FPC chm package) ---------------------------------------------------------------------- marcov · 2015-01-11 18:29 Quote from: howardpc on January 11, 2015, 03:00:58 pmThe wiki does have an export page in the toolbox section.  If you choose a Category (e. g. IDE) rather than a single page, it will export all pages in that category as a single .xml file. This may go part way to helping you get content (without slowing the wiki server to a crawl for other users). I searched a bit, and found that export link, and the output looks decent in XML. It is wiki though, not html, so we would have to render that to html (not too difficult I hope) So if we can create a list of topics from the source and mark them with a category in the wiki, we can at least manually export them. So Make list of IDE topics (software to do that regularly?)Mark the relevant topics with a category[li]export that category manually [/li][/list] Maybe another step would be to check the exported XML against the first topic list. (would yield a list of topics still to mark, deleted, not created etc) ---------------------------------------------------------------------- af0815 · 2015-01-11 19:41 I have also searched a little, and found a soloution only running in windows, but working. it is possible to use the IE with activeX to scan part of the wiki automated with a pascalprogramm  . So i can reuse some code of the old wiki scanner. One Goal is, which is the best format i have to convert to ? I got the wiki format or is better only to scan and do a preprocessing later ?! AND i can scan more than only english, so it is possible to build also other languages content. The result from scanning: http://wiki.lazarus.freepascal.org/Category:IDE_Window QuoteIDE_Window:_Assembler IDE_Window:Breakpoint_properties IDE_Window:Breakpoints IDE_Window:_Change_Encoding_Dialog IDE_Window:_Character_Map IDE_Window:_Clean_up_build_files_dialog IDE_Window:_Code_Explorer IDE_Window:_Code_Templates IDE_Window:_Codetools_Defines_Editor IDE_Window:_Configure_Build_file IDE_Window:_Call_Stack IDE_Window:_Divider_Drawing IDE_Window:_Debug_Output IDE_Window:_Debugger_Options IDE_Window:_Debugger_Options/pt IDE_Window:_Edit_Tool IDE_Window:_Editor_Options_Code_Folding IDE_Window:_Editor_Options_Display IDE_Window:_Editor_Options_General IDE_Window:_Editor_Options_General_Misc IDE_Window:_Editor_Options_HighlightColors IDE_Window:_Editor_Options_Keymap IDE_Window:_Editor_Options_Mouse IDE_Window:_Editor_User_Defined_Words IDE_Window:_Editor_Window_Manager IDE_Window:_EditorMouseOptionsAdvanced IDE_Window:_Evaluate/Modify IDE_Window:_Event_Log IDE_Window:_Find_or_Rename_identifier IDE_Window:_Debug_History IDE_Window:_Add_directory_to_package IDE_Window:_Add_to_Package IDE_Window:_Anchor_Editor IDE_Window:_Clean_Directory IDE_Window:_Code_Explorer_Options IDE_Window:_Codetools_Directory_Values IDE_Window:_Codetools_Options IDE_Window:_Conditional_Defines IDE_Window:_Configure_Build_Lazarus IDE_Window:_Create_new_package_component IDE_Window:_Diff IDE_Window:_Editor_Macros IDE_Window:_Editor_Options IDE_Window:_Editor_Options_Completion_Hints IDE_Window:_Editor_Options_Markup IDE_Window:_Editor_Options_MultiWindow IDE_Window:_Environment_Options IDE_Window:_External_Tool IDE_Window:_External_Tools IDE_Window:_Find IDE_Window:_Find_in_files IDE_Window:_Find_Unused_Units IDE_Window:_Help_Options IDE_Window:_IDE_Options_Dialog IDE_Window:_Installed_Packages IDE_Window:_JCF_Format_Settings_Options IDE_Window:_Messages IDE_Window:_Options IDE_Window:_Package_Editor IDE_Window:_Package_Graph IDE_Window:_Package_Options IDE_Window:_ToDo_List IDE_Window:_Local_Variables IDE_Window:_Publish_Project_Package IDE_Window:_Registers IDE_Window:_Run_parameters IDE_Window:_Search_Results IDE_Window:_Sort_selection IDE_Window:_Threads IDE_Window:_Unit_dependencies IDE_Window:_Unit_info IDE_Window:_View_project_forms_units IDE_Window:_Variable_Inspector IDE_Window:_Watch_list IDE_Window:_Watch_Properties ---------------------------------------------------------------------- af0815 · 2015-01-11 19:46 A Scan from http://wiki.lazarus.freepascal.org/index.php?title=IDE_Win dow:_Code_Templates This is the Wiki Format, like seen in the buit in Editor. Quote{{IDE Window: Code Templates}} == What are Code Templates? == A Code Template is a section of 'boiler plate' code with an associated abbreviation which invokes its insertion. For example, you can type 'cl' in the Source Editor, and then press the Ctrl+J keyboard shortcut to invoke the code template(s) starting with 'cl'. This feature is a great time saver. The Code Templates dialog (accessed via the Tools|Code Templates... menu option) allows you to edit existing templates, or add your own templates. Code template text can contain macros, and you can even add your own macros to the list of those already available by creating a design time package and using the macrointf.pas of the IDEIntf package. == Example 1 - ifb == type <pre>   ifb| </pre> Here the pipe symbol (|) represents the blinking screen cursor. Press Ctrl+j. The three characters you typed ('ifb') will be expanded to <pre>   if | then begin   end; </pre> Again the pipe represents the cursor blinking onscreen. You will see that the cursor has been moved. This template is called 'ifb' and it is defined as follows: <pre> if | then begin end; </pre> This time the pipe '|' is an actual character you type as part of this code template's definition. It stipulates where the cursor will be positioned after the template has been inserted. == Example 2 - Using macros == This second example shows you how to create a code template 'w' which repeats the name of the current procedure somewhere in your code. For long names this can be quite a time saver, and it also types it for you without any spelling mistakes! * In the Code Templates dialog, click on the [Add] button. In the dialog which pops up set Token to 'w', and Comment to 'writeln(ProcName)', then click [OK]. * Your new code template item has been added to the list box. * In the source below fill in   writeln(' ',|); * Here pipe is an actual pipe character defining the new cursor position. Now place the cursor after the first apostrophe (') and click on the 'Insert macro' button. A dialog pops up listing all available code macros. Choose 'ProcedureName' and click 'Insert Macro'. You should now have:   writeln('$ProcedureName() ',|); * Click [OK] to save and close the Code Templates dialog. * Move the cursor into the body of a method, and type 'w'. For instance:   procedure TForm1.FormDestroy(Sender: TObject);   begin     w|   end; (Here the pipe represents the blinking cursor, not a character). * Press Ctrl+j. You will get:   procedure TForm1.FormDestroy(Sender: TObject);   begin     writeln('TForm1.FormDestroy ',|);   end; ==Template Autocompletion== Code templates are invoked either by using the Ctrl+j shortcut, or (if you set this option) automatically following particular events. For each template you can specify the event (if any) that automatically invokes it. You can enable none, some or all of the following events: *line break - insert the template whenever the user presses the [Return] or [Enter] key *space - insert the template whenever the user presses the [Space bar]. *word end - whenever the user presses a word-ending key. For example, when typing 'b;' the code template 'b' can be executed. *do not add character - this option can be combined with any of the above. When enabled the triggering key itself will not be inserted. For example when the option 'space' is enabled and the user triggers a template insertion by pressing the space bar, the space character itself will not be inserted in the source editor. ==Macros== Macros have the form '''$(MacroName)''' or '''$MacroName(Param1,...)'''. Macros can be nested. ===Define your own macros=== You can register your own macros by writing a design time package and installing it. See ide/codetemplatesdlg.pas procedure CreateStandardCodeMacros for examples. =DCI file format= The default dci file of the IDE is ''pcp/lazarus.dci'', where ''pcp'' is your primary config path (e.g. under Linux $HOME/.lazarus). If this file is not present the IDE will copy the file ide/lazarus_dci_file.dci. A dci file is a text file with a list of templates. Each template starts with line [name | description]. The template's value are the following lines. [[Category:IDE Window|C]] ---------------------------------------------------------------------- marcov · 2015-01-12 08:27 I think wiki format is fine. Most constructs translate 1:1. The exact key in the code templates window can be gotten from docs/idewindowhelptree.xml (which is a mapping of dialog name to topic name) Note that it uses a page-anchor system. (e.g. a page per dialog, but help on the various tabs on that dialog translate to an anchor on the webpage). Many of the htmlsystems can't deal very well with anchors. (e.g. if we ever want to use native CHM help instead of lhelp on Windows) ---------------------------------------------------------------------- af0815 · 2015-01-12 13:49 Today the code is a Q&D project :-) So i have to do some improvements. But a questen for me is, the layout of the diretories for the project. I should be compatible with the existing layout, bust have to be multilanguage, because the wiki is able for this and have some translated content. If it works for other languages (russian,... ), i dont know yet. What kind of extension should i give the wiki files ? .wiki .txt  ?