Git Product home page Git Product logo

timetable-gen's Introduction

timetable-gen

๐Ÿ“… A command-line tool to generate a neatly organized, configurable timetable PDF.


Version License

About

timetable-gen is a command-line tool designed to simplify the creation of timetables. It takes a configuration file in TOML format as input, processes the given data, and outputs a neatly organized timetable in PDF format. The output PDF will be in A4 landscape orientation, with the classes matrix fitted as needed according to your configuration file.

sample timetable

Installation

Pre-built Binary

Pre-built binaries for timetable-gen can be found on the Releases page of the repository. Download the appropriate binary for your operating system. You can run the binary directly without any dependencies.

Building from Source

To build timetable-gen from source, you need to have Rust installed on your machine. If you don't have Rust installed, you can install it via rustup.

Once you have Rust installed, you can build timetable-gen by cloning the repository and running cargo build --release:

git clone https://github.com/cptpiepmatz/timetable-gen.git
cd timetable-gen
cargo build --release

The built binary can be found in the target/release directory and can be run directly without any dependencies.

Usage

The timetable-gen tool is controlled via command-line arguments. The basic usage is as follows:

timetable-gen [OPTIONS]

Arguments

  • -c, --config <File>: The path to the TOML configuration file required to generate the timetable. Defaults to timetable.toml.

  • -o, --out <File>: The path where the output PDF should be generated. Defaults to timetable.pdf.

For example:

timetable-gen --config path/to/config.toml --out path/to/timetable.pdf

Configuration

The configuration of timetable-gen is done through a TOML file. Here's the structure of the configuration file:

class_name = "0x"
class_room = "RN"
class_teacher = "Class Teacher"

title = "School Year"
subtitle = "Semester"

school_name = "School Name"
school_address = "School Address"

class_durations = [
    "07:55 - 08:40",
    ...
    "16:05 - 16:50"
]

[day_identifiers]
monday = "Mo"
...

[[monday]]
class = "Subject 1"
teacher = "Teacher 1"
room = "Room 1"
...
  • class_name: The name of the class.
  • class_room: The room code for the classroom.
  • class_teacher: The name for the class teacher.
  • title: The title of the timetable.
  • subtitle: The subtitle of the timetable.
  • school_name: The name of the school.
  • school_address: The address of the school.
  • class_durations: The duration of each class throughout the day.
  • day_identifiers: The abbreviations for each day of the week.
  • monday, tuesday, ..., sunday: The subjects, teachers, and rooms for each day of the week. Each day is represented as a list of ClassEntry objects, all fields are optional.
    • class: The subject being taught.
    • teacher: The teacher teaching the subject.
    • room: The room in which the class is being held.

Example Configuration

A complete example of a configuration file can be found in the repository: example/timetable.toml.

It is recommended to name your own configuration file also timetable.toml, as this is the default file aht the CLI will look for.

License

timetable-gen is licensed under the MIT License.

The LiberationSans font, used in this project, is licensed under its own license. The font files and accompanying license can be found in the fonts directory.

timetable-gen's People

Contributors

cptpiepmatz avatar

Watchers

 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.