Skip to content

Commit

Permalink
Bugfixes and Auto Update Script Added README.md updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ucoruh committed May 1, 2023
1 parent 6dba7cf commit fda0e11
Show file tree
Hide file tree
Showing 9 changed files with 283 additions and 65 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: .NET Release
name: .NET Windows MacOS Linux Release

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -40,21 +40,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.REBIS_TOKEN }}

- name: Compress Linux artifacts
run: tar -czvf linux-artifacts.tar.gz -C publish/linux .
- name: Compress Linux binaries
run: tar -czvf linux-binaries.tar.gz -C publish/linux .

- name: Compress macOS artifacts
run: tar -czvf macos-artifacts.tar.gz -C publish/macos .
- name: Compress macOS binaries
run: tar -czvf macos-binaries.tar.gz -C publish/macos .

- name: Compress Windows artifacts
run: tar -czvf windows-artifacts.tar.gz -C publish/windows .
- name: Compress Windows binaries
run: tar -czvf windows-binaries.tar.gz -C publish/windows .

- name: Upload Linux release asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_common_release.outputs.upload_url }}
asset_path: ./linux-artifacts.tar.gz
asset_name: linux-artifacts.tar.gz
asset_path: ./linux-binaries.tar.gz
asset_name: linux-binaries.tar.gz
asset_content_type: application/gzip
env:
GITHUB_TOKEN: ${{ secrets.REBIS_TOKEN }}
Expand All @@ -63,8 +63,8 @@ jobs:
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_common_release.outputs.upload_url }}
asset_path: ./macos-artifacts.tar.gz
asset_name: macos-artifacts.tar.gz
asset_path: ./macos-binaries.tar.gz
asset_name: macos-binaries.tar.gz
asset_content_type: application/gzip
env:
GITHUB_TOKEN: ${{ secrets.REBIS_TOKEN }}
Expand All @@ -73,8 +73,8 @@ jobs:
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_common_release.outputs.upload_url }}
asset_path: ./windows-artifacts.tar.gz
asset_name: windows-artifacts.tar.gz
asset_path: ./windows-binaries.tar.gz
asset_name: windows-binaries.tar.gz
asset_content_type: application/gzip
env:
GITHUB_TOKEN: ${{ secrets.REBIS_TOKEN }}
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2023]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
132 changes: 104 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,125 @@
# rebis-grade-excel-importer
# Rebis-Grade-Excel-Importer

This tool import Microsoft Teams, Google Classroom Grade Outputs to REBIS Excel file for Automated Grading Import
Rebis-Grade-Excel-Importer is a tool designed to automate the grading import process in REBIS by importing Microsoft Teams and Google Classroom grade outputs to REBIS Excel files. The following guide will help you understand how to use the tool and make the necessary configurations.

## Download

Download and export artifacts and run `rebis-grade-excel-importer.exe` from command-line as shown below
You can download Rebis-Grade-Excel-Importer from the [Releases page on GitHub](https://github.com/ucoruh/rebis-grade-excel-importer/releases). Simply export the artifacts and run the `rebis-grade-excel-importer.exe` file from the command-line as shown below.

[Releases · ucoruh/rebis-grade-excel-importer · GitHub](https://github.com/ucoruh/rebis-grade-excel-importer/releases)
## Installation

![](assets/2023-04-30-20-09-54-image.png)
1. Extract the folder and move it to `C:/rebis/windows-binaries`.

![](assets/2023-05-01-16-08-17-image.png)

2. Add this folder to your system's `path` variables.
- You can follow the steps given below to add it to your system's path variables.
- Open the Control Panel and click on "System".
- Click on "Advanced system settings" and then click on "Environment Variables".
- Under "System variables", scroll down to "Path" and click on "Edit".
- Add the folder location `C:/rebis/windows-binaries` to the end of the variable value, separated by a semicolon. Click "OK" to save.

![](assets/2023-05-01-16-09-31-image.png)

![](assets/2023-05-01-16-09-17-image.png)

## Usage

Example batch script to run  for windows
1. Create a batch file named `run.bat` in the same location as your Excel files.
2. Copy the example batch script given below and paste it into your `run.bat` file.
3. Replace the file names with the names of your source and destination Excel files.
4. Check that the sheet indices are correct. Note that sheet indices start from 0.
5. Save the file and run it.

```batch
batchCopy code

```bash
@echo off
rem Source Excel file you can get from Teams or Google Classroom.
set first_file="classroom-excel.xlsx"
rem Target Excel file. This will be uploaded to REBIS.
set second_file="rebis-excel.xls"
rem Reference column e-mails are unique. This is the column header.
set reference_column="E-Posta"
rem Source grade value taken from the source Excel column header.
set source_column="Not"
rem Target grade value column header name.
set destination_column="Not"
rem Source Excel sheet number (start from 0).
set source_sheet=1
rem Target Excel sheet number (start from 0).
set destination_sheet=0
rebis-grade-excel-importer.exe %first_file% %second_file% %reference_column% %source_column% %destination_column% %source_sheet% %destination_sheet%
pause
```

## Update

Create a update.bat file near application and copy following code and save

```bash
@echo off
rem source excel file you can get from TEAMS or GOOGLE CLASSROOM
set /p first_file="source.xlsx"
rem target excel file this will be uploaded to REBIS
set /p second_file="ExcelNotGirisTaslak4-30-2023.xls"
rem reference column e-mails are unique, this is column header
set /p reference_column="E-Posta"
rem source grade value taken from source excel column header
set /p source_column="Not"
rem target grade value column header name
set /p destination_column="Not"
rem source excel sheet number (start from 0)
set /p source_sheet=1
rem target excel sheet number (start from 0)
set /p destination_sheet=0
rebis-grade-excel-importer.exe %first_file% %second_file% %reference_column% %source_column% %destination_column% %source_sheet% %destination_sheet%
setlocal EnableExtensions EnableDelayedExpansion

echo Setting current working directory...
CD /D "%~dp0"

set /p answer=This script will delete all .exe, .dll, .json, and .pdb files in the current directory. Do you want to continue (Y/N)?

if /i "!answer!" NEQ "Y" (
echo Script cancelled.
pause
exit /b
)

echo Deleting current files...
for %%f in (*.exe *.dll *.json *.pdb) do (
echo Deleting "%%~nxf"
del "%%f"
)

echo Downloading and installing jq...
curl -sL -o jq.exe https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe

echo Extracting download URL that ends with "windows-binaries.tar.gz" from JSON response using jq...
for /f "delims=" %%a in ('curl -s https://api.github.com/repos/ucoruh/rebis-grade-excel-importer/releases/latest ^| jq -r ".assets[] | select(.name | endswith(\"windows-binaries.tar.gz\")) | .browser_download_url"') do (
set "download_url=%%a"
)

echo Downloading Windows binaries...
curl -sL -o windows-binaries.tar.gz "%download_url%"

echo Extracting contents to current directory...
tar -xf "windows-binaries.tar.gz"

echo Cleaning up...
del "windows-binaries.tar.gz"
del "jq.exe"

echo REBIS Grade Excel Importer downloaded successfully!
echo Download URL: %download_url%
echo Done.
pause


```
## Supported OS
- Windows
Rebis-Grade-Excel-Importer is supported on Windows, Linux, and MacOS.
## Development Environment
Rebis-Grade-Excel-Importer is developed using .NET Core 6.0 and C#. Visual Studio 2022 Community Edition is used as the development environment.
## License
- Linux
This project is licensed under the MIT License - see the [LICENSE](LICENCE.md) file for details.
- MacOS
## Contributors
## Development Environmet
We welcome contributions from everyone. Here are the people who have contributed to this project:
- .NET Core 6.0 + Csharp
- [Asst. Prof. Dr. Uğur CORUH](https://github.com/ucoruh)
- Visual Studio 2022 Community Edition
Thank you for your help!
Binary file added assets/2023-05-01-16-04-56-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2023-05-01-16-08-17-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2023-05-01-16-09-17-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2023-05-01-16-09-31-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fda0e11

Please sign in to comment.