PageRenderTime 52ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/README.md

http://github.com/Uberi/AutoHotkey.net-Website-Generator
Markdown | 142 lines | 98 code | 44 blank | 0 comment | 0 complexity | fff85174fe67d9b7a70591e780ef81b8 MD5 | raw file
  1. AutoHotkey.net Website Generator
  2. ================================
  3. Generates a website automatically using information gathered from the [AutoHotkey Forums].
  4. Examples
  5. --------
  6. Here are some examples of websites generated by this program:
  7. * http://www.autohotkey.net/~Uberi/
  8. * http://www.autohotkey.net/~maul.esel/
  9. * http://www.autohotkey.net/~awannaknow/
  10. * http://www.autohotkey.net/~frankie/
  11. * http://www.autohotkey.net/~sumon/
  12. * http://www.autohotkey.net/~tomoe_uehara/
  13. * http://www.autohotkey.net/~magestickown/
  14. * http://www.autohotkey.net/~DataLife/
  15. * http://www.autohotkey.net/~jpjazzy/
  16. And here are some sites people have built based on the generated pages:
  17. * http://www.autohotkey.net/~aaronbewza/
  18. * http://www.autohotkey.net/~shajul/
  19. Usage
  20. -----
  21. AutoHotkey.net Website Generator supports configuration through either variables at the top of the main script, through command line parameters, or through a GUI.
  22. ### Variable configuration
  23. Setting the variables at the top of the main script, "Website Generator.ahk", will affect how the script works if it is run without any other configuration. This may be useful when one desires to schedule website updates automatically or on a schedule. However, command line configuration may be more appropriate in some cases.
  24. ### Command line configuration
  25. Command line parameters override the variables set at the top of the main script. Parameter names mirror the names of the aforementioned variables:
  26. GenerateWebsite.ahk --ShowGUI=False --ForumUsername=Uberi --UploadWebsite=True --AutoHotkeyNetPassword=MyPassword --ColorScheme=Blue > Log.txt
  27. The above would silently generate a page for the user "Uberi" at the AutoHotkey Forums with a blue color scheme, and then upload it to AutoHotkey.net over FTP. Any errors encountered would be reported in Log.txt
  28. ### GUI configuration
  29. A configuration GUI will be shown if the "ShowGUI" option is set. This option also enables usage of a configuration file, which is in INI format.
  30. Options
  31. -------
  32. ### Credentials
  33. * _ForumUsername_ - The forum username to generate the website for.
  34. * _AutoHotkeyNetUsername_ - The AutoHotkey.net account username. Leave blank if it is the same as the forum username.
  35. ### Upload
  36. * _UploadWebsite_ - Upload the website to AutoHotkey.net after it has been generated.
  37. * _AutoHotkeyNetPassword_ - The AutoHotkey.net account password. Necessary only if _UploadWebsite_ is set.
  38. ### Search
  39. * _SearchEnglishForum_ - Search the English AutoHotkey Forums for posts.
  40. * _SearchGermanForum_ - Search the German AutoHotkey Forums for posts.
  41. ### Behavior
  42. * _ShowGUI_ - Show the configuration GUI on startup.
  43. * _UseCache_ - Use the information cache to avoid downloading unnecessary data.
  44. * _RelativeLinks_ - Rewrite links to scripts to make them relative to the webpage if possible.
  45. * _DownloadResources_ - Download resources such as scripts and images to the website directory, to make the generated website self contained.
  46. ### Appearance
  47. * _Stylesheet_ - The stylesheet to use for the generated website, without the ".css" extension.
  48. * _SortEntries_ - Whether or not to sort the website entries alphabetically. If not set, the script will sort by the time of the last update.
  49. ### Output
  50. * _OutputDirectory_ - The local directory to save the generated website.
  51. Templates
  52. ---------
  53. Templates are located in subdirectories within the "Resources" directory of AutoHotkey.net Website Generator, and are named after those subdirectories. Every file in that folder will be directly copied to the output, except for the following file types, which are run through the templating engine before being output:
  54. * *.htm
  55. * *.html
  56. * *.css
  57. Invalid properties or mismatched tags result in the tag being ignored. All HTML special characters are escaped.
  58. See existing templates for examples of usage.
  59. Template Tags
  60. -------------
  61. ### <ahk_script *PROPERTY*>
  62. Self contained tag that is a placeholder for data specified by *PROPERTY*, where *PROPERTY* may be either a template or script property (script properties are only available if the tag is contained within an <ahk_for_each> tag). Both types of properties are documented below.
  63. ### &lt;ahk_for_each *SCRIPT_TYPE*&gt;
  64. Matched tag that searches the AutoHotkey forum for scripts of type *SCRIPT_TYPE*, where *SCRIPT_TYPE* may be either "Script" or "Library", and duplicates the contents of the tag for each search result. Tag contents may contain template tags; they will be processed separately for each iteration.
  65. ### &lt;ahk_if *PROPERTY*&gt;
  66. Matched tag that does nothing if the data specified by *PROPERTY* is present, where *PROPERTY* may be either a template or script property (script properties are only available if the tag is contained within an <ahk_for_each> tag), but otherwise prevents the tag contents from reaching the output.
  67. ### &lt;ahk_if_not *PROPERTY*&gt;
  68. Matched tag that prevents the tag contents from reaching the output if the data specified by *PROPERTY* is present, where *PROPERTY* may be either a template or script property (script properties are only available if the tag is contained within an <ahk_for_each> tag), but otherwise does nothing.
  69. Tag Properties
  70. --------------
  71. The following properties are available anywhere in a template:
  72. * _Author_ - The forum username of the person generating the webpage.
  73. * _Time_ - The time webpage generation was started.
  74. * _Date_ - The date webpage generation was started.
  75. * _Template_ - The name of the template.
  76. The following properties are available within an <ahk_for_each> tag:
  77. * _Index_ - The index of the current script in the search results.
  78. * _Fragment_ - A unique generated string suitable for use as a URL fragment identifying the script entry.
  79. * _Title_ - The title of the forum topic taken from the search results.
  80. * _Image_ - An optional image that may be related to the script.
  81. * _Description_ - A description of the script.
  82. * _Topic_ - The URL of the forum topic.
  83. * _Source_ - The optional download URL.
  84. License
  85. -------
  86. Copyright 2011 Anthony Zhang <azhang9@gmail.com>
  87. This file is part of AutoHotkey.net Website Generator. Source code is available at <https://github.com/Uberi/AutoHotkey.net-Website-Generator>.
  88. AutoHotkey.net Website Generator is free software: you can redistribute it and/or modify
  89. it under the terms of the GNU Affero General Public License as published by
  90. the Free Software Foundation, either version 3 of the License, or
  91. (at your option) any later version.
  92. This program is distributed in the hope that it will be useful,
  93. but WITHOUT ANY WARRANTY; without even the implied warranty of
  94. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  95. GNU Affero General Public License for more details.
  96. You should have received a copy of the GNU Affero General Public License
  97. along with this program. If not, see <http://www.gnu.org/licenses/>.
  98. [AutoHotkey Forums]: http://www.autohotkey.com/forum/