lominus

command module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 7 Imported by: 0

README

GitHub Lominus version GitHub all releases GitHub go.mod Go version Go Reference

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 Luminus files onto your local storage for easy access at a fixed interval of your choice. It is designed to run on Windows, macOS and Linux operating systems.

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 to authenticate with Luminus.

Features

Lominus removes the hassle to download (or redownload) whenever files are uploaded (or updated), resulting in necessary manual cleanup and organisation of the files. And many more!

  • Keeps your Luminus files organised
  • Automatic download of all files from Luminus Files
  • Automatic update of files when files are reuploaded on Luminus
  • System notifications
  • System-based dark/light mode
  • System tray icon (Windows only)
  • Telegram integration
    • Grades notification
    • Files notification
  • API

To be implemented:

  • Multimedia download
  • Notion integration
  • Custom webhook integration

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.

If you want to be sure (which is highly recommended), compile and build the source code manually. You may find out more under Building

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

Download and extract the tarball

tar -xf [filename].tar.xz

Install the application

sudo make install

Building

You are highly recommended to compile and the program manually.

Prerequisites
  1. Go

  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.

Build
  1. Ensure Go is set in you system env var

  2. Install dependencies in the directory where you cloned

    go install
    
  3. Install fyne

    go get fyne.io/fyne/v2/cmd/fyne
    
  4. Finally, build and compile

    fyne package
    

API

Lominus can also be used as an API. Please visit documentations for more details.

Example: Retrieving your modules
package main

import (
    "log"

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

func main() {
    credentials := auth.Credentials{
        Username: "nusstu\\e0123456",
        Password: "p455w0rd",
    }

    _, err := auth.RetrieveJwtToken(credentials, true)
    if err != nil {
        log.Fatalln(err)
    }

    moduleRequest, modReqErr := api.BuildModuleRequest()
    if modReqErr != nil {
        log.Fatalln(modReqErr)
    }

    modules, modErr := moduleRequest.GetModules()
    if modErr != nil {
        log.Fatalln(modErr)
    }

    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

As a major messenging platform, Telegram can be used to receive notifications for things such as new grades releases.

Setting up
  1. You need to create a bot on your own via BotFather. Take note of the bot token sent to you by BotFather.

  2. Important: Drop the bot you have just created a message to enable it to message you.

  3. You will also need to figure out your Telegram ID. The simplest way to get your Telegram ID is via UserInfoBot.

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

  5. Click save and you should receive a test message from your bot.

Screenshots

Click here for more screenshots

Login Info 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. I am unable to verify my Luminus login credentials.

    • Please ensure that you have trusted the SSL Certificate used by Luminus, especially on Unix systems.
  2. Will my annotated lecture notes be overwritten if there exists a newer version uploaded by the Professor?

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

Documentation

Overview

Package main is where Lominus starts from.

Directories

Path Synopsis
internal
app
Package app provides primitives to initialise crucial files for Lominus.
Package app provides primitives to initialise crucial files for Lominus.
app/auth
Package appAuth provides path retrievers for Lominus auth files.
Package appAuth provides path retrievers for Lominus auth files.
app/dir
Package appDir provides directory generators for Lominus config files.
Package appDir provides directory generators for Lominus config files.
app/integrations/telegram
Package intTelegram provides path retrievers for Lominus Telegram integration files.
Package intTelegram provides path retrievers for Lominus Telegram integration files.
app/lock
Package appLock provides path retrievers for Lominus lock file.
Package appLock provides path retrievers for Lominus lock file.
app/pref
Package appPref provides path retrievers for Lominus preferences files.
Package appPref provides path retrievers for Lominus preferences files.
cron
Package cron provides primitives to initialise and control the main cron scheduler.
Package cron provides primitives to initialise and control the main cron scheduler.
file
Package file provides util primitives to file operations.
Package file provides util primitives to file operations.
indexing
Package file provides primitives to file indexing for sync operations.
Package file provides primitives to file indexing for sync operations.
log
Package logs provides primitives to initialise and access the logger.
Package logs provides primitives to initialise and access the logger.
lominus
Package lominus provides app config constants.
Package lominus provides app config constants.
notifications
Package notifications provides primitives to initialise the notification channel.
Package notifications provides primitives to initialise the notification channel.
ui
Package ui provides primitives that initialises the UI.
Package ui provides primitives that initialises the UI.
pkg
api
Package api provides functions that link up and communicate with Luminus servers.
Package api provides functions that link up and communicate with Luminus servers.
auth
Package auth provides functions that link up and communicate with Luminus authentication server.
Package auth provides functions that link up and communicate with Luminus authentication server.
integrations/telegram
Package telegram provides functions that facilitates the integration with Telegram.
Package telegram provides functions that facilitates the integration with Telegram.

Jump to

Keyboard shortcuts

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