Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
__pycache__/
*.py[cod]
*$py.class

*.md
# C extensions
*.so

*.spec
# Distribution / packaging
.Python
build/
Expand Down Expand Up @@ -162,3 +162,6 @@ cython_debug/

# Download file specific
mods/

# Factorio Mod Downloader specific
.factorio-mod-downloader/
23 changes: 23 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "factorio_mod_downloader_rust"
version = "0.3.0"
edition = "2021"

[lints.rust]
dead_code = "allow"

[lib]
name = "factorio_mod_downloader_rust"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.22", features = ["extension-module"] }
reqwest = { version = "0.12", features = ["blocking", "json", "multipart", "cookies", "gzip", "brotli", "deflate", "rustls-tls", "native-tls", "socks"] }
tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
futures-util = "0.3"
indicatif = "0.18.3"
console = "0.16.1"
colored = "3.0.0"
clap = { version = "4.5", features = ["derive"] }
60 changes: 45 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ It is really helpful if you want to download a mod or modpack containing various

![Factorio Mod Downloader](factorio_mod_downloader.png)

## Features

### Features
1. Added Dark Mode
2. Added progress bars and logs to see what files are being downloaded.
3. Added a seperate downloads section to track each file with custom progress and success icons.
Expand All @@ -24,37 +24,67 @@ It is really helpful if you want to download a mod or modpack containing various
6. Updated to add the option to downlaod optional dependencies as well (Use with caution as it may significantly increase number of files getting downloaded).
7. Completely interactive and requires no other dependency. 100% standalone app.


### How to download
1. Go to [Releases](https://github.com/vaibhavvikas/factorio-mod-downloader/releases/latest)
2. Download the latest executable i.e. **\*.exe file** from the latest version added inside the assets dropdown. Latest release version is mentioned on the top of README.md file.

1. Go to [Releases](https://github.com/vaibhavvikas/factorio-mod-downloader/releases/latest)
2. Download the latest executable i.e. **\*.exe file** from the latest version added inside the assets dropdown. Latest release version is mentioned on the top of README.md file.

### How to run

1. Run the app, select the directory and add mod url from official [factorio mod portal](https://mods.factorio.com/) for e.g. URL for Krastorio 2 mod is: `https://mods.factorio.com/mod/Krastorio2`.
2. Click on Download button.
3. The application will start downloading the mods and show the status and progress in the corresponding sections.
4. The first step of loading dependencies take some time as it download [chromium-drivers](https://github.com/yeongbin-jo/python-chromedriver-autoinstaller) (~30-35 MB) required for loading URLs and the mods for downloading.
5. Once completed the application will show a download complete dialog.


### Development
1. You can build and run the app yourself. I have written the code in python and implemented poetry for dependency management and easy build.
2. Install python > v3.12 and install poetry, refer to [poetry official website](https://python-poetry.org/docs/#installation) for installation guide.
3. Install dependencies via the command `poetry install`.
4. To run the application use the command `poetry run factorio-mod-downloader`. This will run the application directly without building.
5. To build the application, I am using pyinstaller (you need a **Windows x64** system to build it). Run the command `poetry build` to build the application. A new .exe file will be generated inside `/dist/pyinstaller/win_amd64`.

#### Prerequisites

Before you begin, ensure you have the following installed on your machine:

1. **Python 3.12**(recommended)
- Download from [python.org](https://python.org/downloads/)

2. **Rust (for building the performance extension)**
- Download from [rustup.rs](https://rustup.rs/)

3. **Poetry (Python dependency manager)**
- Install via: `pip install poetry`
- Or follow [poetry official guide](https://python-poetry.org/docs/#installation)
- `poetry self add poetry-pyinstaller-plugin`(important to get the `.exe`)

4. **Maturin (Rust-Python bridge)**
- Installed automatically by Poetry
- manually: `pip install maturin`

#### Quick Start

```bash
# Clone the repository
git clone https://github.com/vaibhavvikas/factorio-mod-downloader.git
cd factorio-mod-downloader

# Install dependencies and build Rust extension
.\build.ps1 -BuildExe or -be # additionally builds the `.exe` available at `\dist\fmd-0.4.0.exe` make sure to use `deactivate` venv when your re-building.

# Run the application (GUI mode)
poetry run python -m factorio_mod_downloader --gui

# Run in CLI mode
poetry run python -m factorio_mod_downloader --help # `-hh` more info

# you use the executable
fmd.exe | fmd.exe -h
```

### Note
I have finally included optional dependencies as well. My advice is handle with care as it significantly increase the number and size of downloads.

I have finally included optional dependencies as well. My advice is handle with care as it significantly increase the number and size of downloads.
Also, download speed is based on re146, Its not super fast but its fine.
Feel free to reach out to me or start a message in the discussions tab if you need some help.

Feel free to reach out to me or start a message in the discussions tab if you need some help.
### Credits


### Credits:
- re146.dev
- [radioegor146](https://github.com/radioegor146)

Loading