<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://horizonffxi.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AProcessJobs</id>
	<title>Module:ProcessJobs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://horizonffxi.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AProcessJobs"/>
	<link rel="alternate" type="text/html" href="https://horizonffxi.wiki/w/index.php?title=Module:ProcessJobs&amp;action=history"/>
	<updated>2026-04-05T21:37:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://horizonffxi.wiki/w/index.php?title=Module:ProcessJobs&amp;diff=42091&amp;oldid=prev</id>
		<title>Edwardcd: added example input and output</title>
		<link rel="alternate" type="text/html" href="https://horizonffxi.wiki/w/index.php?title=Module:ProcessJobs&amp;diff=42091&amp;oldid=prev"/>
		<updated>2024-03-24T13:31:06Z</updated>

		<summary type="html">&lt;p&gt;added example input and output&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:31, 24 March 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--  job list for any equipable item, era tagged and all.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--  job list for any equipable item, era tagged and all.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--  Written by edwardcd&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--- Usage&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{#invoke:}} method&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--- Example Input&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--  mnk WaR COR BLm&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--- Example Output&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--  [[WAR]] / [[MNK]] / [[BLM]] &amp;lt;span class=&amp;#039;toau&amp;#039;&amp;gt;/ [[COR]]&amp;lt;/span&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--- &lt;/ins&gt;Written by edwardcd&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--  last modification: 24 March 2024&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--  last modification: 24 March 2024&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--  version 0.1a (testing)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--  version 0.1a (testing)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key horizon_wiki:diff::1.12:old-42090:rev-42091 --&gt;
&lt;/table&gt;</summary>
		<author><name>Edwardcd</name></author>
	</entry>
	<entry>
		<id>https://horizonffxi.wiki/w/index.php?title=Module:ProcessJobs&amp;diff=42090&amp;oldid=prev</id>
		<title>Edwardcd: Allows users to enter in job abbrvs in any order and without wiki tags or era tags and processes it automatically.</title>
		<link rel="alternate" type="text/html" href="https://horizonffxi.wiki/w/index.php?title=Module:ProcessJobs&amp;diff=42090&amp;oldid=prev"/>
		<updated>2024-03-24T13:26:14Z</updated>

		<summary type="html">&lt;p&gt;Allows users to enter in job abbrvs in any order and without wiki tags or era tags and processes it automatically.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--- Job Processor for ITEMS, uses the Scribunto module (LUA).&lt;br /&gt;
--  Let&amp;#039;s users enter in jobs without tags or worring about&lt;br /&gt;
--  what era the specific job comes from.&lt;br /&gt;
--  Output will be a clean and uniform, correctly displayed,&lt;br /&gt;
--  job list for any equipable item, era tagged and all.&lt;br /&gt;
--&lt;br /&gt;
--  Written by edwardcd&lt;br /&gt;
--  last modification: 24 March 2024&lt;br /&gt;
--  version 0.1a (testing)&lt;br /&gt;
--&lt;br /&gt;
-- Module:ProcessJobsModule&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.processJobs(frame)&lt;br /&gt;
    local jobsString = frame.args.jobs or &amp;#039;&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    -- Convert the jobs string into an array&lt;br /&gt;
    -- Removes spaces and punctuation&lt;br /&gt;
    local jobsArray = {}&lt;br /&gt;
    for job in jobsString:upper():gmatch(&amp;quot;%w+&amp;quot;) do&lt;br /&gt;
        table.insert(jobsArray, job)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Define job codes in the desired order, as per ASB&lt;br /&gt;
    local jobCodes = {&lt;br /&gt;
        &amp;quot;WAR&amp;quot;, &amp;quot;MNK&amp;quot;, &amp;quot;WHM&amp;quot;, &amp;quot;BLM&amp;quot;, &amp;quot;RDM&amp;quot;, &amp;quot;THF&amp;quot;, &amp;quot;PLD&amp;quot;, &amp;quot;DRK&amp;quot;,&lt;br /&gt;
        &amp;quot;BST&amp;quot;, &amp;quot;BRD&amp;quot;, &amp;quot;RNG&amp;quot;, &amp;quot;SAM&amp;quot;, &amp;quot;NIN&amp;quot;, &amp;quot;DRG&amp;quot;, &amp;quot;SMN&amp;quot;, &amp;quot;BLU&amp;quot;,&lt;br /&gt;
        &amp;quot;COR&amp;quot;, &amp;quot;PUP&amp;quot;, &amp;quot;DNC&amp;quot;, &amp;quot;SCH&amp;quot;, &amp;quot;GEO&amp;quot;, &amp;quot;RUN&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    -- Create a lookup table for jobCodes&lt;br /&gt;
    local jobCodesLookup = {}&lt;br /&gt;
    for i, v in ipairs(jobCodes) do&lt;br /&gt;
        jobCodesLookup[v] = i&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Define era spans for specific jobs&lt;br /&gt;
    local specialSpans = {&lt;br /&gt;
        toau = {[&amp;quot;BLU&amp;quot;] = true, [&amp;quot;COR&amp;quot;] = true, [&amp;quot;PUP&amp;quot;] = true},&lt;br /&gt;
        wotg = {[&amp;quot;DNC&amp;quot;] = true, [&amp;quot;SCH&amp;quot;] = true},&lt;br /&gt;
        soa = {[&amp;quot;GEO&amp;quot;] = true, [&amp;quot;RUN&amp;quot;] = true}&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    -- Filter out invalid codes&lt;br /&gt;
    -- Sort the valid codes &lt;br /&gt;
    local processedJobs = {}&lt;br /&gt;
    for _, job in ipairs(jobsArray) do&lt;br /&gt;
        if jobCodesLookup[job] then&lt;br /&gt;
            table.insert(processedJobs, job)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local processedJobs = {}&lt;br /&gt;
    for _, job in ipairs(jobsArray) do&lt;br /&gt;
        if jobCodesLookup[job] then&lt;br /&gt;
            local spanStart, spanEnd = &amp;quot;&amp;quot;, &amp;quot;&amp;quot;&lt;br /&gt;
            if specialSpans.toau[job] then&lt;br /&gt;
                spanStart, spanEnd = &amp;#039;&amp;lt;span class=&amp;quot;toau&amp;quot;&amp;gt;&amp;#039;, &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
            elseif specialSpans.wotg[job] then&lt;br /&gt;
                spanStart, spanEnd = &amp;#039;&amp;lt;span class=&amp;quot;wotg&amp;quot;&amp;gt;&amp;#039;, &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
            elseif specialSpans.soa[job] then&lt;br /&gt;
                spanStart, spanEnd = &amp;#039;&amp;lt;span class=&amp;quot;soa&amp;quot;&amp;gt;&amp;#039;, &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
            end&lt;br /&gt;
            table.insert(processedJobs, spanStart .. &amp;quot;[[&amp;quot; .. job .. &amp;quot;]]&amp;quot; .. spanEnd)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    table.sort(processedJobs, function(a, b) return jobCodesLookup[a:match(&amp;quot;%w+&amp;quot;)] &amp;lt; jobCodesLookup[b:match(&amp;quot;%w+&amp;quot;)] end)&lt;br /&gt;
    &lt;br /&gt;
    local output = table.concat(processedJobs, &amp;#039; / &amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    return output&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Edwardcd</name></author>
	</entry>
</feed>