Skip to content

Beebeeoii/lominus

Repository files navigation

lominus-app-icon

Go Reference

image

Table of Contents

  1. About
  2. Features
  3. Getting Started
  4. Integrations
  5. Screenshots
  6. Contributing

About

Lominus is a tool written in Go to automatically sync Canvas files onto your local storage for easy access to updated files. It runs on Windows, macOS and Linux.

No credentials, files, or any other form of information is uploaded to any servers. Everything is stored locally on your system. Credentials are only used for authentication.

Features

Lominus removes the hassle to download (or redownload) whenever files are uploaded (or updated). And many more!

  • Works with Canvas (New !)
  • Keeps files updated and organised
  • Automatic download of module files
  • Automatic update of module files when files are reuploaded
  • System notifications
  • System-based dark/light mode
  • System tray icon
  • Telegram integration
  • API

Getting Started

Installation

Unsigned standalone executables for Windows, macOS and Linux are available from releases.

Note: Please read through installation introduction for the respective operating systems below.

Windows

Tested on Windows 10 Home Version 10.0.19044 Build 19044

Your anti-virus software like Windows Defender may prompt that lominus.exe as a false positive. You may need to make an exception for it.

This occurs because the app is unsigned amongst other reasons regarding Go executables which you may find out more here. Signing it requires a valid certificate which is payable.

macOS

Tested on M1 MacBook Air 2020 macOS Monterey Version 12.1

You may receive the prompt

“Lominus” is damaged and can’t be opened. You should eject the disk image.

or

The app is from an unidentified developer.

This happens because the app is unsigned. Signing it requires a valid certificate which requires a valid Apple Developer Program membership.

To enable exception for this app

xattr -cr [filepath]

where [filepath] is the path to the .dmg file.

Linux

Tested on Ubuntu Focal 20.04.2 LTS and Arch

Download and extract the tarball

tar -xf [filename].tar.xz

Install the application

sudo make install

Building

Prerequisites

  1. Golang >= 1.18

  2. gcc

  3. gtk3 and libayatana-appindicator3-dev (Linux)

    • For Debian and Ubuntu, you may install these via

      sudo apt-get install gcc libgtk-3-dev libayatana-appindicator3-dev
    • If you are on Linux Mint, you will require libxapp-dev as well.

  4. libxxf86vm-dev might help if Lominus keeps crashing on startup

Build

  1. Ensure GOPATH is set in your system env

    export GOPATH=$HOME/go
  2. Install dependencies in the directory where you cloned

    go install
  3. Install fyne

    go install fyne.io/fyne/v2/cmd/fyne@latest
  4. Ensure that your system PATH contains $GOPATH/bin before building.

    export PATH=$GOPATH/bin:$PATH
    fyne package

API

Lominus can also be used as an API. Please visit documentations for more details. However, do note that the documentations are lacking after v2.0.0 update due to lack of time :(. This should be fixed in due time.

Example: Retrieving your modules

package main

import (
    "log"

    "github.com/beebeeoii/lominus/pkg/api"
    "github.com/beebeeoii/lominus/pkg/auth"
    "github.com/beebeeoii/lominus/pkg/constants"
)

func getCanvasModules() {
    canvasToken := "your-canvas-token"

    modulesReq, modReqErr := api.BuildModulesRequest(canvasToken, constants.Canvas)
    if modReqErr != nil {
        log.Fatalln(modReqErr)
    }

    modules, modulesErr := modulesReq.GetModules()
    if modulesErr != nil {
        log.Fatalln(modulesErr)
    }

    for _, module := range modules {
        log.Println(module.ModuleCode, module.Name)
    }
}

Sample output

2021/12/09 12:51:49 CP1002 School of Computing Placement Test: Programming Methodology
2021/12/09 12:51:49 CS2100 Computer Organisation
2021/12/09 12:51:49 IDRES2021 Advancing Interdisciplinary Education in Singapore
2021/12/09 12:51:49 IS1103 Ethics in Computing
2021/12/09 12:51:49 MA2001 Linear Algebra I
2021/12/09 12:51:49 MA2002 Calculus
2021/12/09 12:51:49 SOCT101 SoC Teaching Workshop

Integrations

Telegram

Telegram can be used to receive notifications for things such as new grades releases.

Setting up

  1. Retrieve your bot token via BotFather.

  2. Retrieve your Telegram user ID. The simplest way is via UserInfoBot.

  3. Copy and paste the bot token and your Telegram user ID in Lominus, under the Integrations tab.

  4. Save and you should receive a test message from your bot.

Ensure that the bot is able to message you by dropping it a message.

Screenshots

Click here for more screenshots

Credentials Integrations Preferences
image image image
image image image

Contributing

Lominus is far from perfect. All contributions, regardless large or small, are highly encouraged as this would help to make Lominus better. Please submit an issue or fork this repo and submit a pull request if necessary.

FAQ

  1. Will my annotated lecture notes be overwritten if there exists a newer version uploaded by the Professor?

    • Your annotated file will be renamed to [v1] XXX.XXX and the newer version will be downloaded.