Skip to content

Commit

Permalink
release: 2.0.0 (#46)
Browse files Browse the repository at this point in the history
* chore: bump version to 2.0.0

* docs: updated readme

* style: updated readme

* fix: go ref badge

* style: updated readme

* style: updated readme

* style: updated readme

* style: max image size
  • Loading branch information
Jia Wei Lee authored Aug 2, 2022
1 parent 97682f1 commit 0eec8b7
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 43 deletions.
2 changes: 1 addition & 1 deletion FyneApp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Website = "https://github.com/beebeeoii/lominus"
Icon = "./assets/app-icon.png"
Name = "Lominus"
ID = "com.beebeeoii.lominus"
Version = "1.2.1"
Version = "2.0.0"
Build = 199
98 changes: 57 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
![GitHub Lominus version](https://img.shields.io/badge/Lominus-v1.2.1-blueviolet)
![GitHub all releases](https://img.shields.io/github/downloads/beebeeoii/lominus/total)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/beebeeoii/lominus)
[![Go Reference](https://pkg.go.dev/badge/github.com/beebeeoii/lominus.svg)](https://pkg.go.dev/github.com/beebeeoii/lominus)
<p align="center">
<img src="./assets/app-icon.png" alt="lominus-app-icon" width="196" />
</p>

<p align="center">
<img src="https://img.shields.io/badge/Lominus-v2.0.0-blueviolet" />
<img src="https://img.shields.io/github/downloads/beebeeoii/lominus/total" />
<img src="https://img.shields.io/github/go-mod/go-version/beebeeoii/lominus" />
<a href="https://pkg.go.dev/github.com/beebeeoii/lominus">
<img src="https://pkg.go.dev/badge/github.com/beebeeoii/lominus.svg" alt="Go Reference">
</a>
</p>

# Table of Contents

Expand All @@ -24,31 +32,24 @@

# About <a name="about">

Lominus is a tool written in Go to automatically sync [Luminus](https://luminus.nus.edu.sg) 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.
Lominus is a tool written in Go to automatically sync [Luminus](https://luminus.nus.edu.sg) and [Canvas](https://canvas.nus.edu.sg/) 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 to authenticate with [Luminus](https://luminus.nus.edu.sg).**
**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 <a name="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!
Lominus removes the hassle to download (or redownload) whenever files are uploaded (or updated). 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
- 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 (Windows only)
- System tray icon
- Telegram integration
- Grades notification
- Files notification
- API

To be implemented:

- Multimedia download
- Notion integration
- Custom webhook integration

# Getting Started <a name="getting-started">

## Installation <a name="getting-started-installation">
Expand All @@ -65,8 +66,6 @@ Your anti-virus software like Windows Defender may prompt that `lominus.exe` as

This occurs because the app is unsigned amongst other reasons regarding Go executables which you may find out more [here](https://go.dev/doc/faq#virus). 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](#getting-started-building)

### macOS <a name="getting-started-installation-mac">

> Tested on M1 MacBook Air 2020 macOS Monterey Version 12.1
Expand All @@ -91,7 +90,7 @@ where `[filepath]` is the path to the `.dmg` file.

### Linux <a name="getting-started-installation-linux">

> Tested on Ubuntu Focal 20.04.2 LTS
> Tested on Ubuntu Focal 20.04.2 LTS and Arch
Download and extract the tarball

Expand All @@ -107,11 +106,9 @@ sudo make install

## Building <a name="getting-started-building">

You are highly recommended to compile and the program manually.

### Prerequisites <a name="getting-started-building-prerequisites">

1. [Go](https://go.dev/dl/)
1. [Golang](https://go.dev/dl/)

2. `gcc`

Expand Down Expand Up @@ -161,33 +158,52 @@ import (
"github.com/beebeeoii/lominus/pkg/api"
"github.com/beebeeoii/lominus/pkg/auth"
"github.com/beebeeoii/lominus/pkg/constants"
)
func main() {
credentials := auth.Credentials{
func getLuminusModules() {
jwtToken, jwtTokenErr := auth.RetrieveJwtToken(auth.LuminusCredentials{
Username: "nusstu\\e0123456",
Password: "p455w0rd",
Password: "password",
}, false)
if jwtTokenErr != nil {
log.Fatalln(jwtTokenErr)
}
modulesReq, modReqErr := api.BuildModulesRequest(jwtToken, constants.Luminus)
if modReqErr != nil {
log.Fatalln(modReqErr)
}
modules, modulesErr := modulesReq.GetModules()
if modulesErr != nil {
log.Fatalln(modulesErr)
}
_, err := auth.RetrieveJwtToken(credentials, true)
if err != nil {
log.Fatalln(err)
for _, module := range modules {
log.Println(module.ModuleCode, module.Name)
}
}
moduleRequest, modReqErr := api.BuildModuleRequest()
func getCanvasModules() {
canvasToken := "your-canvas-token"
modulesReq, modReqErr := api.BuildModulesRequest(canvasToken, constants.Canvas)
if modReqErr != nil {
log.Fatalln(modReqErr)
}
modules, modErr := moduleRequest.GetModules()
if modErr != nil {
log.Fatalln(modErr)
modules, modulesErr := modulesReq.GetModules()
if modulesErr != nil {
log.Fatalln(modulesErr)
}
for _, module := range modules {
log.Println(module.ModuleCode, module.Name)
}
}
```
### Sample output <a name="getting-started-api-example-output">
Expand All @@ -206,19 +222,19 @@ func main() {
## Telegram
As a major messenging platform, Telegram can be used to receive notifications for things such as new grades releases.
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](https://telegram.me/BotFather). Take note of the _bot token_ sent to you by **BotFather**.
1) Retrieve your _bot token_ via [BotFather](https://telegram.me/BotFather).
2) **_Important_**: Drop the bot you have just created a message to enable it to message you.
2) Retrieve your _Telegram user ID_. The simplest way is via [UserInfoBot](https://telegram.me/userinfobot).
3) You will also need to figure out your _Telegram ID_. The simplest way to get your _Telegram ID_ is via [UserInfoBot](https://telegram.me/userinfobot).
3) Copy and paste the _bot token_ and your _Telegram user ID_ in Lominus, under the Integrations tab.
4) Copy and paste the _bot token_ and your _Telegram ID_ in Lominus, under the Integrations tab.
4) Save and you should receive a test message from your bot.
5) Click 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 <a name="screenshots">
Expand Down
2 changes: 1 addition & 1 deletion internal/lominus/lominus.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package lominus

const APP_NAME = "Lominus"
const APP_ID = "com.lominus.beebeeoii"
const APP_VERSION = "1.2.1"
const APP_VERSION = "2.0.0"

const LOCK_FILE_NAME = "lominus.lock"

Expand Down

0 comments on commit 0eec8b7

Please sign in to comment.