Utente:Bot55/Imdb Filmografia

Da Wikipedia, l'enciclopedia libera.
Vai alla navigazione Vai alla ricerca

Questa regex viene utilizzata tramite AWB per formattare automaticamente in linguaggio wiki la filmografia degli attori, così come appare se copiata dall'Internet Movie Database. Per funzionare si rende quindi necessario copincollare la filmografia dalla pagina dell'attore e incollarla in una propria sandbox, per poi far fare un passaggio al bot (vedi esempio). È comunque necessario un controllo umano, sui wikilink ai film/telefilm e su eventuali parti non formattate (a causa di eccezioni non gestite dalla regex).

Utilizzo[modifica | modifica wikitesto]

Per utilizzarla copincollare (seleziona, Ctrl+C, Ctrl+V) opportunamente nel proprio file di impostazioni (generalmente "settings.xml") il seguente codice:

      <IRule xsi:type="Rule">
        <enabled_>true</enabled_>
        <Children>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children />
            <Name>Sintassi</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>([ ])?\:([ ])?</replace_>
            <with_> - </with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children />
            <Name>== Filmografia ==</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>^</replace_>
            <with_>== Filmografia ==
=== Cinema ===
</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children />
            <Name>=== Televisione ===</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>$</replace_>
            <with_>\n\r=== Televisione ===\n</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children />
            <Name>Puntate</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>[ ]{4}[^\n]+[\n]*</replace_>
            <with_ />
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children />
            <Name>... alias</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>\.\.\. alias.+\n</replace_>
            <with_ />
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children />
            <Name>(film TV)</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>\n([^\(\)\"\n]+) \((\d{4})\) \(TV\)[^\n]*([\n]+)</replace_>
            <with_>\n"$1"  ($2)$3</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>None</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children />
            <Name>Film</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>\n([^\(\n]+) (\([\d]{4}\))[^\n]+</replace_>
            <with_>\n*[[$1]] $2</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children />
            <Name>\n eccessivi</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>\n\n</replace_>
            <with_>\n</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children>
              <IRule xsi:type="Rule">
                <enabled_>true</enabled_>
                <Children />
                <Name>\n eccessivi</Name>
                <ruletype_>OnWholePage</ruletype_>
                <replace_>\n[\s]*\n</replace_>
                <with_>\n</with_>
                <ifContains_ />
                <ifNotContains_ />
                <regex_>true</regex_>
                <ifIsRegex_>false</ifIsRegex_>
                <numoftimes_>1</numoftimes_>
                <ifRegexOptions_>None</ifRegexOptions_>
                <regexOptions_>IgnoreCase</regexOptions_>
              </IRule>
              <IRule xsi:type="Rule">
                <enabled_>true</enabled_>
                <Children />
                <Name>=== Televisione === eccessivi</Name>
                <ruletype_>OnWholePage</ruletype_>
                <replace_>\)(\n)=== Televisione ===\n</replace_>
                <with_>)$1</with_>
                <ifContains_ />
                <ifNotContains_ />
                <regex_>true</regex_>
                <ifIsRegex_>false</ifIsRegex_>
                <numoftimes_>1</numoftimes_>
                <ifRegexOptions_>None</ifRegexOptions_>
                <regexOptions_>IgnoreCase</regexOptions_>
              </IRule>
            </Children>
            <Name>Televisione</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>([^"]+)([\n])"([^"]*)"[^\(]+\(([^\)\n]+)\)([^\=]*)</replace_>
            <with_>$1$2$5=== Televisione ===
*[[$3]] ($4)
</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>40</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Children>
              <IRule xsi:type="Rule">
                <enabled_>true</enabled_>
                <Children />
                <Name>\n eccessivi</Name>
                <ruletype_>OnWholePage</ruletype_>
                <replace_>\n[\s]*\n</replace_>
                <with_>\n</with_>
                <ifContains_ />
                <ifNotContains_ />
                <regex_>true</regex_>
                <ifIsRegex_>false</ifIsRegex_>
                <numoftimes_>1</numoftimes_>
                <ifRegexOptions_>None</ifRegexOptions_>
                <regexOptions_>IgnoreCase</regexOptions_>
              </IRule>
            </Children>
            <Name>Cinema</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>([^\*]+)([\n])\*([^\]]*)\]\] \(([\d]{4})\)([^\=]*)</replace_>
            <with_>$1$2$5=== Cinema ===
*$3]] ($4)
</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>40</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Name>=== Cinema === eccessivi</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>=== Cinema ===\n</replace_>
            <with_ />
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Name>" eccessivi</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>\*\[\[\"(.+)\"\]\]</replace_>
            <with_>*[[$1]]</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase Multiline</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Name>=== Cinema ===</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>== Filmografia ==\n</replace_>
            <with_>== Filmografia ==\n=== Cinema ===</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
          <IRule xsi:type="Rule">
            <enabled_>true</enabled_>
            <Name>\n === Televisione ===</Name>
            <ruletype_>OnWholePage</ruletype_>
            <replace_>=== Televisione ===</replace_>
            <with_>\n=== Televisione ===</with_>
            <ifContains_ />
            <ifNotContains_ />
            <regex_>true</regex_>
            <ifIsRegex_>false</ifIsRegex_>
            <numoftimes_>1</numoftimes_>
            <ifRegexOptions_>None</ifRegexOptions_>
            <regexOptions_>IgnoreCase</regexOptions_>
          </IRule>
        </Children>
        <Name>Filmografia IMDb</Name>
        <ruletype_>OnWholePage</ruletype_>
        <replace_ />
        <with_ />
        <ifContains_ />
        <ifNotContains_ />
        <regex_>false</regex_>
        <ifIsRegex_>false</ifIsRegex_>
        <numoftimes_>1</numoftimes_>
        <ifRegexOptions_>None</ifRegexOptions_>
        <regexOptions_>None</regexOptions_>
      </IRule>