(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import javax.xml.transform.TransformerFactory | |
import javax.xml.transform.stream.StreamResult | |
import javax.xml.transform.stream.StreamSource | |
def cli = new CliBuilder( usage: 'groovy TransformXml.groovy -h -i inputfile -o output -x xsltfile...') | |
cli.h(longOpt:'help', 'usage information') | |
cli.i(argName:'input', longOpt:'input', args:1, required:true, type:GString, 'Directory/file for input') | |
cli.o(argName:'output', longOpt:'output', args:1, required:true, type:GString, 'Direcoty/file for output') | |
cli.x(argName:'xsltfile', longOpt:'xsltfile', args:1, required:true, type:GString, 'The transformation file') |
#! /usr/bin/env python | |
''' | |
Module to remove empty folders recursively. Can be used as standalone script or be imported into existing script. | |
''' | |
import os, sys | |
def removeEmptyFolders(path, removeRoot=True): | |
'Function to remove empty folders' | |
if not os.path.isdir(path): |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import argparse | |
import os | |
import re | |
from pathvalidate import sanitize_filename | |
from canvasapi import Canvas | |
from canvasapi.course import Course | |
from canvasapi.exceptions import Unauthorized, ResourceDoesNotExist | |
from canvasapi.file import File | |
from canvasapi.module import Module, ModuleItem |