Skip to content

Use cases

Andrew Stanton edited this page Dec 7, 2018 · 13 revisions

Use cases

Copy sanitisation

  • Remove garbage attributes from tags
  • Delete / replace undesired elements
  • Format and mark up recognised elements
  • Format code

Update costs & apply info

Names --> Names plus info

  • Split list
  • Foreach item ask for sub items

Asking to:

  • Create form to fill
  • Plugin to take selected items
  • Scraper / API to ask system

Scrape entry requirements and language

Fix this

<p>The way you&rsquo;re assessed may depend on the units you select. As a guide, students on this course last year were typically assessed as follows:</p>
<p>
</p>
<li><strong>Year 1 students</strong>:&nbsp;35% by written exams, 3% by practical exams and 62% by coursework</li>
<li><strong>Year 2 students</strong>:&nbsp;6% by written exams, 10% by practical exams and 84% by coursework</li>
<li><strong>Year 3 students</strong>: 17% by written exams, 4% by practical exams and 79% by coursework</li>
<p>&nbsp;</p>

To validate code

Fix this

<ul>
    <li>96-112 points to include a minimum of 2 A levels, or equivalent.<br />
    <a rel="noopener noreferrer" rel="noopener noreferrer" href="theURL" target="_blank">See the other qualifications we accept</a></li>
</ul>
<ul>
    <li>English language proficiency at a minimum of IELTS band 6.0 with no component score below 5.5.<br />
    <a rel="noopener noreferrer" rel="noopener noreferrer" href="theURL" target="_blank">See alternative English language qualifications</a></li>
</ul>

to

<ul>
    <li>
        <p>96-112 points to include a minimum of 2 A levels, or equivalent.</p>
        <p><a rel="noopener noreferrer" href="http://www.registryhub.port.ac.uk/entry_requirements/?course_code=C2143&amp;year=2019" target="_blank">See the other qualifications we accept</a></p>
    </li>
</ul>

<ul>
    <li>
        <p>English language proficiency at a minimum of IELTS band 6.0 with no component score below 5.5.</p>
        <p><a rel="noopener noreferrer" href="http://www.registryhub.port.ac.uk/entry_requirements/?course_code=C2143&amp;year=2019" target="_blank">See alternative English language qualifications</a></p>
    </li>
</ul>

Fix this

<p data-gtm-vis-has-fired-9152982_32="1">The way you’re assessed may depend on the units you select. As a guide, students on this course last year were typically assessed as follows:</p>
<p data-gtm-vis-has-fired-9152982_32="1">
</p>
<li data-gtm-vis-has-fired-9152982_32="1"><strong data-gtm-vis-has-fired-9152982_32="1">Year 1 students</strong>:&nbsp;<span style="background-color: #ffffff; color: #384047;" data-gtm-vis-has-fired-9152982_32="1"></span><span style="background-color: #ffffff; color: #384047;" data-gtm-vis-has-fired-9152982_32="1">100% by coursework</span> </li>
<li data-gtm-vis-has-fired-9152982_32="1"><strong data-gtm-vis-has-fired-9152982_32="1">Year 2 students</strong>:&nbsp;<span style="background-color: #ffffff; color: #384047;" data-gtm-vis-has-fired-9152982_32="1"></span><span style="background-color: #ffffff; color: #384047;" data-gtm-vis-has-fired-9152982_32="1">100% by coursework</span> </li>
<li data-gtm-vis-has-fired-9152982_32="1"><strong data-gtm-vis-has-fired-9152982_32="1">Year 3 students</strong>:&nbsp;<span style="background-color: #ffffff; color: #384047;" data-gtm-vis-has-fired-9152982_32="1"></span><span style="background-color: #ffffff; color: #384047;" data-gtm-vis-has-fired-9152982_32="1">100% by coursework</span></li>

Another to fix

<div>
	<h3>Optional pathways</h3>
</div>

Generating related items

  • Sanitise list
  • Look up items
    • Exact match
    • Fuzzy match
  • Prompt for unknown items

Extract

<table xmlns="http://www.w3.org/1999/xhtml" cellspacing="0" cellpadding="0" dir="ltr" border="1" style="width: 0px; border: none;">
    <colgroup><col width="188" /><col width="188" /><col width="188" /></colgroup>
    <tbody>
        <tr style="height: 21px;">
            <td data-sheets-value="{'1':2,'2':'MSc Construction Project Management'}" style="color: #000000; padding: 2px 3px; border-color: #000000; border-top-style: solid; border-left-style: solid; text-align: left;">MSc Construction Project Management</td>
            <td data-sheets-value="{'1':2,'2':'MSc Quantity Surveying'}" style="color: #000000; padding: 2px 3px; border-bottom-color: #000000; border-right-color: #000000; border-top-color: #000000; border-top-style: solid; text-align: left;">MSc Quantity Surveying</td>
            <td data-sheets-value="{'1':2,'2':'MSc Civil Engineering\n'}" style="color: #000000; padding: 2px 3px; border-bottom-color: #000000; border-right-color: #000000; border-top-color: #000000; border-top-style: solid; text-align: left;">MSc Civil Engineering<br />
            </td>
        </tr>
    </tbody>
</table>

Into items with URLS

Course details

  1. Separate components
  2. Mark up address and style it
  3. Check dates and replace content if expired
  4. Swap out old text for new phrasing

• => ul

Clone this wiki locally