Operations list (filterable/sortable offline web page)

Post Reply
User avatar
tos1
Site Admin
Posts: 5
Joined: Mon May 13, 2024 7:05 am UTC

Operations list (filterable/sortable offline web page)

Post by tos1 »

(Edited to add a patch file on 2024.05.28 UTC)
1. HTML sample page
The header_operations.py (or its expanded version) included in MOD development system is one of the important files that even experienced modders (MOD developers) refer to frequently, but searching for information across the file with text editor and/or command line tends to be complicated work.
Image
header_operations.ph (expanded version) with Vim editor
header_operations.ph (expanded version) with Vim editor
3c.jpg (285.12 KiB) Viewed 810 times
So, I created a sortable/filterable list of operations as a offline web page to help modders (and potential modders).
Sortable opcode list (an offline web page)
Sortable opcode list (an offline web page)
sortable1a.jpg (350.74 KiB) Viewed 810 times
In the sample page, I used the header_operations expanded version v.1.0.3 (Nov 21 2021) downloaded from Eärendil Ardamírë's gitLab.

Download the sample offline web page:
modope_sample1a.zip
(292.25 KiB) Downloaded 104 times
mytblsorter_patch_240528a.zip
This patch makes it easier to change themes. (readme included)
(2.51 KiB) Downloaded 83 times

Features:
  • Comments consolidated into one line per operation for ease of search and translation.
  • Multi-column sort. Click the 1st column and Shift-click the 2nd.
  • Search using regular expression, logical AND/OR. >, <=, >=, <, !=, column number, etc.
  • Operable column width.
  • Pager (row height, jump, etc.).
  • No internet connection required (except a link to the help page for filtering commands)
For detail of the filtering command, see this link. You can also use column number like n: in the search command box. E.g. 4:is searches lines where opName contains "is".

2. Converter
The sample web page has a set of <table> - </table> tag. When the header_operations.py (or its extended version) is revised or translated, it would be happy if it automatically loads the file from a specific relative directory, but modern web browsers are designed not to load arbitrary local files automatically due to security reason. It seems inconvenient to have to select a file in the file selection dialog every time the user opens a page, and if I put the whole page on a server, it can't be used in an offline environment.

So, I have prepared a converter (a separate Python script) to convert header_operations.py into <table> - </table> of HTML that contains its information. Instructions on how to use it are in the included readme.txt.

Download the converter (Python script):
hdrope2tbl_1a.zip
Converter. (Python engine needed)
(2.86 KiB) Downloaded 90 times
Note: This file may be updated at any time. When updating, I'll change the revision number in the tail.
Image
How to deal with revised header_operations.py
How to deal with revised header_operations.py
sortable2a.jpg (224.5 KiB) Viewed 810 times
3. License and Disclaimer
About the license of the header_operations.py file, tablesorter, Filter Widget, and JQuery libraries I used, please check on your own responsibility. You may freely modify and redistribute other parts (i.e. the sample web page other than <table> tag, and the convertor) without any notice to the author, but the author does not guarantee any loss, damage, or disadvantage that you may incur as a result of the use.

I will respond to bugs and feature suggestions as proactively and promptly as possible, but I cannot promise that I will always do so. :|

4. Acknowledgment to contributors
The tool is based on the unofficial works of many developers and proposers opened on the TW Forum and elsewhere. One of entry points:
Better MS Scripting Reference: header_operations expanded
Post Reply