Skip to content

Commit

Permalink
Update Makefile for Windows
Browse files Browse the repository at this point in the history
Updated README accordingly.
  • Loading branch information
MarcoBenelli committed Jan 13, 2022
1 parent dbe4450 commit 17b45ff
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 129 deletions.
96 changes: 48 additions & 48 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
ifeq ($(OS),Windows_NT)
pathsep = ;
options = --windowed
else
pathsep = :
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
options = --windowed --name 'Study and Repeat'
else
options = --onefile
endif
endif

ifeq ($(OS),Windows_NT)
study_and_repeat_windows.exe : dist/study_and_repeat inno_setup.iss
iscc inno_setup.iss
endif

dist/study_and_repeat : src/*.py src/*/*.py
pyinstaller $(options) --icon src/img/favicon.ico \
--add-data 'src/img/fugue-icons-3.5.6/icons-shadowless/*.png$(pathsep)src/img/fugue-icons-3.5.6/icons-shadowless' \
--add-data 'src/img/favicon.ico$(pathsep)src/img' \
src/study_and_repeat.py

requirements.txt : FORCE
python -m pip freeze >requirements.txt
FORCE :

install :
python3 -m venv env
. env/bin/activate ; python -m pip install -r requirements.txt
ifeq ($(UNAME),Darwin)
curl --output fugue-icons-3.5.6.zip https://p.yusukekamiyamane.com/icons/downloads/fugue-icons-3.5.6.zip
else
wget https://p.yusukekamiyamane.com/icons/downloads/fugue-icons-3.5.6.zip
endif
unzip -d src/img/fugue-icons-3.5.6 fugue-icons-3.5.6.zip
rm fugue-icons-3.5.6.zip

clean :
ifeq ($(OS),Windows_NT)
-rmdir /s /q build dist
-erase .\*.spec .\*.exe
else
rm -rf build dist ./*.spec
endif

.PHONY : clean install
ifeq ($(OS),Windows_NT)
pathsep = ;
options = --windowed
wget = Invoke-WebRequest -OutFile
unzip = Expand-Archive -DestinationPath
else
pathsep = :
UNAME := $(shell uname)
unzip = unzip -d
ifeq ($(UNAME),Darwin)
options = --windowed --name 'Study and Repeat'
wget = curl --output
else
options = --onefile
wget = wget --output-document
endif
endif

ifeq ($(OS),Windows_NT)
study_and_repeat_windows.exe : dist/study_and_repeat inno_setup.iss
iscc inno_setup.iss
endif

dist/study_and_repeat : src/*.py src/*/*.py
pyinstaller $(options) --icon src/img/favicon.ico \
--add-data 'src/img/fugue-icons-3.5.6/icons-shadowless/*.png$(pathsep)src/img/fugue-icons-3.5.6/icons-shadowless' \
--add-data 'src/img/favicon.ico$(pathsep)src/img' \
src/study_and_repeat.py

requirements.txt : FORCE
python -m pip freeze >requirements.txt
FORCE :

install :
python -m pip install --requirement requirements.txt
$(wget) fugue-icons-3.5.6.zip https://p.yusukekamiyamane.com/icons/downloads/fugue-icons-3.5.6.zip
$(unzip) src/img/fugue-icons-3.5.6 fugue-icons-3.5.6.zip
rm fugue-icons-3.5.6.zip

clean :
ifeq ($(OS),Windows_NT)
-rmdir /s /q build dist
-erase .\*.spec .\*.exe
else
rm -rf build dist ./*.spec
endif

.PHONY : clean install
178 changes: 99 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,99 @@
# Study and Repeat

Study and Repeat is an application that aims to integrate the spaced repetition technique into your study method.
Through it, a student or any person wishing to learn a certain topic can do it in a simple and intuitive way, optimizing time and avoiding long study sessions in the last days before the exam.
The entire development phase of the application and other information about it are available in the [paper](paper.pdf).

## Usage
Download the file for your operating system from [latest release](https://github.com/lucabindini/study_and_repeat/releases/latest).
Alternatively, if you want to build the application on your own, follow the instructions in the [Build](#build) section.

## Build
Clone the repository in a directory of your choice(required `git`):
```sh
git clone https://github.com/lucabindini/study_and_repeat
```
Open `study_and_repeat` project folder:
```sh
cd study_and_repeat
```

Create virtual environment and install all dependencies in it (required `make` and `zip`):
```sh
make install
```

Activate the environment:
```sh
. env/bin/activate
```

Build the application (the output will be in `dist`):
```sh
make
```

## Functionalities
Below is a list of all the functionalities of the application:
* **Create deck** in your local machine with the possibility to edit it whenever you want.
* **Add card** to a desired deck. Cards can have an answer not only formed by text but enriched by images.
* **Move card** inside his deck.
* **Remove card** if it's incorrect or no longer needed.
* **Rename deck** if it has incorrect or outdated name.
* **Delete deck** if it's no longer needed.
* **Reset deck** if you want to clear spaced repetition temporal statistics.
* **Export deck** in a `.tar` archive file. During the export phase you can choose whether or not to enter the temporal information of the spaced repetition technique.
* **Import deck** from a `.tar` deck file previously exported.
* **View statistics** in particular the number of new cards (never studied) and the number of cards to be reviewed today

## GUI
The application is divided into 3 main screens.

* **Home** that is the main screen of the application.

<p align="center">
<img src="screenshots/home.png" width="80%">
</p>

* **Edit deck** that is the screen where you can edit a certain deck.

<p align="center">
<img src="screenshots/edit.png" width="80%">
</p>

* **Study deck** that is the screen where you can study a certain deck.

<p align="center">
<img src="screenshots/study_question.png" width="80%">
</p>

<p align="center">
<img src="screenshots/study_answer.png" width="80%">
</p>

## Authors
* [Luca Bindini](https://github.com/lucabindini)
* [Marco Benelli](https://github.com/MarcoBenelli)

## License
Licensed under the term of [GNU GPL v3.0](LICENSE).
# Study and Repeat

Study and Repeat is an application that aims to integrate the spaced repetition technique into your study method.
Through it, a student or any person wishing to learn a certain topic can do it in a simple and intuitive way, optimizing time and avoiding long study sessions in the last days before the exam.
The entire development phase of the application and other information about it are available in the [paper](paper.pdf).

## Usage
Download the file for your operating system from [latest release](https://github.com/lucabindini/study_and_repeat/releases/latest).
Alternatively, if you want to build the application on your own, follow the instructions in the [Build](#build) section.

## Requirements
These are the requirements in case you want to build the application, they are not needed in case you just want to run the release.

program |GNU/Linux |Windows |macOS
--------|------------|------------|------------
`python`|required |required |required
`make` |recommended |recommended |recommended
`git` |recommended |recommended |recommended
`zip` |preinstalled|not required|recommended


## Build

Clone the repository in a directory of your choice:
```sh
git clone https://github.com/lucabindini/study_and_repeat
```

Open `study_and_repeat` project folder:
```sh
cd study_and_repeat
```

Create and activate a virtual environment (this step is optional and can be done in many different ways, e. g. you might want to use `conda`).
On Unix-like systems, you could do it like this:
```sh
python3 -m venv env
. env/bin/activate
```
On Windows PowerShell, you could do it like this:
```powershell
python -m venv env
.\env\Scripts\Activate.ps1
```

Install the library and icons dependencies:
```sh
make install
```

Build the application, the output will be in `dist`:
```sh
make
```

## Functionalities
Below is a list of all the functionalities of the application:
* **Create deck** in your local machine with the possibility to edit it whenever you want.
* **Add card** to a desired deck. Cards can have an answer not only formed by text but enriched by images.
* **Move card** inside his deck.
* **Remove card** if it's incorrect or no longer needed.
* **Rename deck** if it has incorrect or outdated name.
* **Delete deck** if it's no longer needed.
* **Reset deck** if you want to clear spaced repetition temporal statistics.
* **Export deck** in a `.tar` archive file. During the export phase you can choose whether or not to enter the temporal information of the spaced repetition technique.
* **Import deck** from a `.tar` deck file previously exported.
* **View statistics** in particular the number of new cards (never studied) and the number of cards to be reviewed today

## GUI
The application is divided into 3 main screens.

* **Home** that is the main screen of the application.

<p align="center">
<img src="screenshots/home.png" width="80%">
</p>

* **Edit deck** that is the screen where you can edit a certain deck.

<p align="center">
<img src="screenshots/edit.png" width="80%">
</p>

* **Study deck** that is the screen where you can study a certain deck.

<p align="center">
<img src="screenshots/study_question.png" width="80%">
</p>

<p align="center">
<img src="screenshots/study_answer.png" width="80%">
</p>

## Authors
* [Luca Bindini](https://github.com/lucabindini)
* [Marco Benelli](https://github.com/MarcoBenelli)

## License
Licensed under the term of [GNU GPL v3.0](LICENSE).
2 changes: 1 addition & 1 deletion inno_setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Study and Repeat"
#define MyAppVersion "1.0"
#define MyAppVersion "1.3"
#define MyAppPublisher "Marco Benelli, Luca Bindini"
#define MyAppURL "https://github.com/lucabindini/study_and_repeat"
#define MyAppExeName "study_and_repeat.exe"
Expand Down
2 changes: 1 addition & 1 deletion src/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def about(self) -> None:
QtWidgets.QMessageBox.about(
self, 'About Study and Repeat',
'<h2>Study and Repeat</h2>'
'<p>Version 1.0</p>'
'<p>Version 1.3</p>'
'<p>Study and Repeat is an application aimed at improving the '
'quality of the study, through the technique of spaced repetition.'
'</p>'
Expand Down

0 comments on commit 17b45ff

Please sign in to comment.