User:Kevin Reid/Task list updater.e: Difference between revisions

description
(Created page with "<lang e>#!/usr/bin/env rune pragma.syntax("0.9") pragma.enable("accumulator") def [lang] := interp.getArgs() def unimpURL := <http>[`//rosettacode.org/wiki/Reports:Tasks_not_im...")
 
(description)
 
(2 intermediate revisions by the same user not shown)
Line 1:
This script updates the classified task lists I maintain (such as [[../E tasks]]) by moving completed tasks to the completed list and adding new tasks. It takes a language name (with underscores) as a parameter, and outputs the updated source of the task page on stdout.
 
<lang e>#!/usr/bin/env rune
pragma.syntax("0.9")
Line 6 ⟶ 8:
 
def unimpURL := <http>[`//rosettacode.org/wiki/Reports:Tasks_not_implemented_in_$lang`]
def catURL := <http>[`//rosettacode.org/mw/index.php?title=User:Kevin_Reid/E_tasks${lang}_tasks&action=raw`]
 
def unimpText := unimpURL.getText()
Line 30 ⟶ 32:
completed with= line
} else {
if (inClassifySection && toAdd.size().aboveZero()) {
var add := toAdd.getElements()[0]
if (add < title) {
Line 37 ⟶ 39:
}
}
if (inCompleted && completed.size().aboveZero()) {
var add := completed.getElements()[0]
if (add < line) {