filecollector

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 14 Imported by: 0

README

File Collector

File Collector is an application that uses HTTP protocol to collect homework and files.

Usage

When filecollector is run, it will automatically parse the configuration file (the default is filecollector.json), and then start an http server on the specified port.

Usage of ./filecollector:
  -c string
        config file path (default "filecollector.json")
  -v    show version

Configuration

the deadline and pattern are optional configuration items.

example:

{
  "host": "0.0.0.0",
  "port": 3000,
  "title": "CSS:APP Homeworks Upload",
  "forms": [
    {
      // URL prefix => http://127.0.0.1:3000/HW01
      "prefix": "HW01",
      // File storage path
      "storage": "./files/hw_01",
      "title": "CSS:APP Lab 1",
      // Form inputs are used in the filenameTemplate
      "inputs": [
        {
          "name": "name",
          "label": "Name",
          "pattern": "[A-Z]+"
        },
        {
          "name": "number",
          "label": "Student Number"
        }
      ],
      "deadline": "2021-10-11T04:35:06Z",
      "filenameTemplate": "hw_01_{{number}}-{{name}}"
    },
    {
      "prefix": "HW02",
      "storage": "./files/hw_02",
      "title": "CSS:APP Lab 2",
      "inputs": [
        {
          "name": "name",
          "label": "Name",
          "pattern": "[A-Z]+"
        },
        {
          "name": "number",
          "label": "Student Number"
        }
      ],
      "filenameTemplate": "hw_02_{{number}}-{{name}}"
    }
  ]
}

Screenshots

Home

Form

Files

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL