/README.md
Markdown | 142 lines | 98 code | 44 blank | 0 comment | 0 complexity | fff85174fe67d9b7a70591e780ef81b8 MD5 | raw file
- AutoHotkey.net Website Generator
- ================================
- Generates a website automatically using information gathered from the [AutoHotkey Forums].
- Examples
- --------
- Here are some examples of websites generated by this program:
- * http://www.autohotkey.net/~Uberi/
- * http://www.autohotkey.net/~maul.esel/
- * http://www.autohotkey.net/~awannaknow/
- * http://www.autohotkey.net/~frankie/
- * http://www.autohotkey.net/~sumon/
- * http://www.autohotkey.net/~tomoe_uehara/
- * http://www.autohotkey.net/~magestickown/
- * http://www.autohotkey.net/~DataLife/
- * http://www.autohotkey.net/~jpjazzy/
- And here are some sites people have built based on the generated pages:
- * http://www.autohotkey.net/~aaronbewza/
- * http://www.autohotkey.net/~shajul/
- Usage
- -----
- AutoHotkey.net Website Generator supports configuration through either variables at the top of the main script, through command line parameters, or through a GUI.
- ### Variable configuration
- 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.
- ### Command line configuration
- Command line parameters override the variables set at the top of the main script. Parameter names mirror the names of the aforementioned variables:
- GenerateWebsite.ahk --ShowGUI=False --ForumUsername=Uberi --UploadWebsite=True --AutoHotkeyNetPassword=MyPassword --ColorScheme=Blue > Log.txt
- 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
- ### GUI configuration
- 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.
- Options
- -------
- ### Credentials
- * _ForumUsername_ - The forum username to generate the website for.
- * _AutoHotkeyNetUsername_ - The AutoHotkey.net account username. Leave blank if it is the same as the forum username.
- ### Upload
- * _UploadWebsite_ - Upload the website to AutoHotkey.net after it has been generated.
- * _AutoHotkeyNetPassword_ - The AutoHotkey.net account password. Necessary only if _UploadWebsite_ is set.
- ### Search
- * _SearchEnglishForum_ - Search the English AutoHotkey Forums for posts.
- * _SearchGermanForum_ - Search the German AutoHotkey Forums for posts.
- ### Behavior
- * _ShowGUI_ - Show the configuration GUI on startup.
- * _UseCache_ - Use the information cache to avoid downloading unnecessary data.
- * _RelativeLinks_ - Rewrite links to scripts to make them relative to the webpage if possible.
- * _DownloadResources_ - Download resources such as scripts and images to the website directory, to make the generated website self contained.
- ### Appearance
- * _Stylesheet_ - The stylesheet to use for the generated website, without the ".css" extension.
- * _SortEntries_ - Whether or not to sort the website entries alphabetically. If not set, the script will sort by the time of the last update.
- ### Output
- * _OutputDirectory_ - The local directory to save the generated website.
- Templates
- ---------
- 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:
- * *.htm
- * *.html
- * *.css
- Invalid properties or mismatched tags result in the tag being ignored. All HTML special characters are escaped.
- See existing templates for examples of usage.
- Template Tags
- -------------
- ### <ahk_script *PROPERTY*>
- 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.
- ### <ahk_for_each *SCRIPT_TYPE*>
- 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.
- ### <ahk_if *PROPERTY*>
- 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.
- ### <ahk_if_not *PROPERTY*>
- 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.
- Tag Properties
- --------------
- The following properties are available anywhere in a template:
- * _Author_ - The forum username of the person generating the webpage.
- * _Time_ - The time webpage generation was started.
- * _Date_ - The date webpage generation was started.
- * _Template_ - The name of the template.
- The following properties are available within an <ahk_for_each> tag:
- * _Index_ - The index of the current script in the search results.
- * _Fragment_ - A unique generated string suitable for use as a URL fragment identifying the script entry.
- * _Title_ - The title of the forum topic taken from the search results.
- * _Image_ - An optional image that may be related to the script.
- * _Description_ - A description of the script.
- * _Topic_ - The URL of the forum topic.
- * _Source_ - The optional download URL.
- License
- -------
- Copyright 2011 Anthony Zhang <azhang9@gmail.com>
- This file is part of AutoHotkey.net Website Generator. Source code is available at <https://github.com/Uberi/AutoHotkey.net-Website-Generator>.
- AutoHotkey.net Website Generator is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- [AutoHotkey Forums]: http://www.autohotkey.com/forum/