Giter Site home page Giter Site logo

lazycollate's Introduction

LazyCollate

Each semester, some 70 students enroll in Colby College's CS 151. A student worker is tasked with collating each week's projects into a sensible directory structure, including each student's writeup rendered as a PDF.

I'm lazy, so I wrote a program to automate this procedure.

Working off a project number and a list of students, LazyCollate locates the students' code on a network share and renders Confluence pages using either QtWebKit or PhantomJS. File renaming, content warnings, and web scraping are all done automatically.

Installation and setup

Dependencies

LazyCollate is tested on a GNU/Linux system, but should be cross-platform.

The versions within your operating system's package manager will most likely be fine.

Core dependencies

Configuration

  1. Mount the CS 151 network share to /mnt/CS151 (or elsewhere, but change CS151_MOUNT_POINT in collate.py if you do so).

  2. Optionally change any of the global variables within collate.py.

Instructions

Basic usage:

First, create a file students.txt with each CS151 student's Colby ID on its own line.

Then, to collate project 2, call:

$ python collate.py 2 students.txt

LazyCollate will ask for your password and log in for you. Then, sit back while it does the rest!

Logging

LazyCollate writes out to the comprehensive collation.log. The --verbose flag will ensure that all messages permeate to standard output in addition to this log file.

Other options

To see all available options:

$ python collate.py --help

Maintenance

LazyCollate is designed to work with Atlassian Confluence 3.5.13's login system. If failed login error messages change, or if the HTML login form changes name or field names, writeups.py will need to be modified accordingly.

Cookie-based logins with wkhtmltopdf don't work currently. The active workaround is to just POST the username and password with a redirect for the desired page (such as in save_writeup() in collate.py). See cookie_login() in writeups.py for where cookies should work.

Known bugs

wkhtmltopdf has an issue on OS X with printing Conflence URL's with a POST (passing a recommended flag might help, but it's far easier to just use phantomjs instead).

lazycollate's People

Contributors

davidcain avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.