UniversalIMG


NameUniversalIMG JSON
Version 1.2.2 PyPI version JSON
download
home_page
SummaryOpen & edit .img files for gta III / VC / SA (+GUI)
upload_time2022-12-14 11:24:24
maintainer
docs_urlNone
authorNikita (NIKDISSV)
requires_python>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Universal iMG

https://github.com/NIKDISSV-Forever/UniversalIMG

### Open & edit .img files for gta III / VC / SA (+GUI)

# GUI

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/main.png)

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/1.png)

## Buttons

### Hotkeys

<kbd>F2</kbd> <kbd>Ctrl+O</kbd> - Open | Открыть

<kbd>F3</kbd> <kbd>Ctrl+E</kbd> - Extract | Извлечь

<kbd>Ctrl+A</kbd> - Add | Добавить

<kbd>Ctrl+Shift+A</kbd> - Select All | Выбрать всё

<kbd>F4</kbd> <kbd>Ctrl+D</kbd> - Delete | Удалить

<kbd>F5</kbd> <kbd>Ctrl+R</kbd> - Reload | Перезагрузить

<kbd>F6</kbd> <kbd>Ctrl+Shift+R</kbd> - Rebuild | Перестроить

<kbd>F7</kbd> <kbd>Ctrl+L</kbd> - Light (Theme) | Лампочка (Тема)

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/4.png)

While something works, other buttons are disabled.

Если вы нажали на что-то, кнопки побледнеют пока то на что вы нажали, делает что должно
![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/8.png)

There are light and dark themes, the letter A under the light bulb means that the theme depends on the theme of the
system (Win 10)

Есть светлая и тёмная темы, буква A под лампочкой означает, что тема зависит от темы системы (Win 10)
![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/14.png)

## Files list

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/10.png)

Click on the button with the file name to rename it.

Нажмите на кнопку с именем файла чтоб его переименовать.
![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/12.png)

### Sorting

Нажмите на название колонки чтобы по ней отсортировать.

Just click on a column heading to sort.
![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/2.png)
![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/11.png)

### Navigation bar

Specify the size and page number. Search by file name.

Указывайте размер и номер страницы. Ищите по названию файла.

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/9.png)

Up/Down Arrows, Top (First Page)/Down (Last Page) Arrows

Стрелки вверх/вниз, в самый верх (первая страница)/в самый низ (последняя страница)

### Select all

Select all files to delete or export (see Buttons)

Ничего особенного. Выберите все файлы, чтоб их удалить или экспортировать (смотрите Buttons)

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/3.png)

## Logging

[freimgedcs](https://code.google.com/archive/p/freimgedcs) output. If it has Failed, then something is going wrong.

Вывод [freimgedcs](https://code.google.com/archive/p/freimgedcs). Если в нём есть Failed, значит что-то идёт не так.

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/5.png)

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/6.png)

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/13.png)

## Progress bar

There is a progress display.

Если что-то происходит с группой файлов, эта оранжевая полоска будет двигаться.
![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/7.png)

---

Если у вас проблемы с открытием архивов, может помочь запуск от имени администратора.

Если это не помогло, вам придётся убедиться что исполняемый файл и архив находятся на одном диске.

If you're having trouble opening archives, running as administrator may help.

If this does not help, you will have to make sure that the executable and the archive are on the same disk.

![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/error.png)
![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/fixed_error.png)

# Code

> pip install [UniversalIMG](https://pypi.org/project/UniversalIMG)

```python
class BlocksBytes:
    """Class for storing Block/Size format data present in the html file generated by the -lst command"""

    def __init__(self, bb: str):
        ...


class ArchiveContent:
    """Stores one line data from the generated html file"""

    def __init__(self, offset: str, size: str, name: str):
        ...


class IMGArchive:
    """API for freimgedcs.exe"""

    def __init__(self, imgname: str | Path,
                 freimgedcs_path: str = get_freimgedcs_exe()):
        ...

    def rebuild(self):
        """Rebuild archive (imgname)"""
        ...

    def list(self, *, delete_html_file: bool = False):
        """
        Returns the header of the opened archive, information about it, and a list of files of the class ArchiveContent
        """
        ...

    def add(self, filename: str):
        """Add/replace file [filename] to/in archive (imgname)"""
        ...

    def extract(self, filename: str, filename2: str):
        """Extract file [filename] from archive (imgname) to file [filename2]"""
        ...

    def rename(self, filename: str, filename2: str):
        """Rename file [filename] in archive (imgname) to file [filename2]"""
        ...

    def delete(self, filename: str):
        """Delete file [filename] from archive (imgname)"""
        ...
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "UniversalIMG",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "Nikita (NIKDISSV)",
    "author_email": "nikdissv@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/ab/97/0c65c78eadb7ab7444acf1aec4f88ad48beb690a4b920a9c6049caddf83a/UniversalIMG-1.2.2.tar.gz",
    "platform": null,
    "description": "# Universal iMG\r\n\r\nhttps://github.com/NIKDISSV-Forever/UniversalIMG\r\n\r\n### Open & edit .img files for gta III / VC / SA (+GUI)\r\n\r\n# GUI\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/main.png)\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/1.png)\r\n\r\n## Buttons\r\n\r\n### Hotkeys\r\n\r\n<kbd>F2</kbd> <kbd>Ctrl+O</kbd> - Open | \u041e\u0442\u043a\u0440\u044b\u0442\u044c\r\n\r\n<kbd>F3</kbd> <kbd>Ctrl+E</kbd> - Extract | \u0418\u0437\u0432\u043b\u0435\u0447\u044c\r\n\r\n<kbd>Ctrl+A</kbd> - Add | \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\r\n\r\n<kbd>Ctrl+Shift+A</kbd> - Select All | \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0451\r\n\r\n<kbd>F4</kbd> <kbd>Ctrl+D</kbd> - Delete | \u0423\u0434\u0430\u043b\u0438\u0442\u044c\r\n\r\n<kbd>F5</kbd> <kbd>Ctrl+R</kbd> - Reload | \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c\r\n\r\n<kbd>F6</kbd> <kbd>Ctrl+Shift+R</kbd> - Rebuild | \u041f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0438\u0442\u044c\r\n\r\n<kbd>F7</kbd> <kbd>Ctrl+L</kbd> - Light (Theme) | \u041b\u0430\u043c\u043f\u043e\u0447\u043a\u0430 (\u0422\u0435\u043c\u0430)\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/4.png)\r\n\r\nWhile something works, other buttons are disabled.\r\n\r\n\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0436\u0430\u043b\u0438 \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e, \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e\u0431\u043b\u0435\u0434\u043d\u0435\u044e\u0442 \u043f\u043e\u043a\u0430 \u0442\u043e \u043d\u0430 \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0436\u0430\u043b\u0438, \u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/8.png)\r\n\r\nThere are light and dark themes, the letter A under the light bulb means that the theme depends on the theme of the\r\nsystem (Win 10)\r\n\r\n\u0415\u0441\u0442\u044c \u0441\u0432\u0435\u0442\u043b\u0430\u044f \u0438 \u0442\u0451\u043c\u043d\u0430\u044f \u0442\u0435\u043c\u044b, \u0431\u0443\u043a\u0432\u0430 A \u043f\u043e\u0434 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u043e\u0439 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0435\u043c\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0435\u043c\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b (Win 10)\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/14.png)\r\n\r\n## Files list\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/10.png)\r\n\r\nClick on the button with the file name to rename it.\r\n\r\n\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430 \u0447\u0442\u043e\u0431 \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c.\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/12.png)\r\n\r\n### Sorting\r\n\r\n\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u043d\u0435\u0439 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.\r\n\r\nJust click on a column heading to sort.\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/2.png)\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/11.png)\r\n\r\n### Navigation bar\r\n\r\nSpecify the size and page number. Search by file name.\r\n\r\n\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0418\u0449\u0438\u0442\u0435 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u0430.\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/9.png)\r\n\r\nUp/Down Arrows, Top (First Page)/Down (Last Page) Arrows\r\n\r\n\u0421\u0442\u0440\u0435\u043b\u043a\u0438 \u0432\u0432\u0435\u0440\u0445/\u0432\u043d\u0438\u0437, \u0432 \u0441\u0430\u043c\u044b\u0439 \u0432\u0435\u0440\u0445 (\u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430)/\u0432 \u0441\u0430\u043c\u044b\u0439 \u043d\u0438\u0437 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430)\r\n\r\n### Select all\r\n\r\nSelect all files to delete or export (see Buttons)\r\n\r\n\u041d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b, \u0447\u0442\u043e\u0431 \u0438\u0445 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 Buttons)\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/3.png)\r\n\r\n## Logging\r\n\r\n[freimgedcs](https://code.google.com/archive/p/freimgedcs) output. If it has Failed, then something is going wrong.\r\n\r\n\u0412\u044b\u0432\u043e\u0434 [freimgedcs](https://code.google.com/archive/p/freimgedcs). \u0415\u0441\u043b\u0438 \u0432 \u043d\u0451\u043c \u0435\u0441\u0442\u044c Failed, \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e-\u0442\u043e \u0438\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a.\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/5.png)\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/6.png)\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/13.png)\r\n\r\n## Progress bar\r\n\r\nThere is a progress display.\r\n\r\n\u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u0433\u0440\u0443\u043f\u043f\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432, \u044d\u0442\u0430 \u043e\u0440\u0430\u043d\u0436\u0435\u0432\u0430\u044f \u043f\u043e\u043b\u043e\u0441\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f.\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/7.png)\r\n\r\n---\r\n\r\n\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u0430\u0440\u0445\u0438\u0432\u043e\u0432, \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430.\r\n\r\n\u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u043e, \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0430\u0440\u0445\u0438\u0432 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0434\u0438\u0441\u043a\u0435.\r\n\r\nIf you're having trouble opening archives, running as administrator may help.\r\n\r\nIf this does not help, you will have to make sure that the executable and the archive are on the same disk.\r\n\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/error.png)\r\n![](https://github.com/NIKDISSV-Forever/UniversalIMG/raw/main/screenshots/fixed_error.png)\r\n\r\n# Code\r\n\r\n> pip install [UniversalIMG](https://pypi.org/project/UniversalIMG)\r\n\r\n```python\r\nclass BlocksBytes:\r\n    \"\"\"Class for storing Block/Size format data present in the html file generated by the -lst command\"\"\"\r\n\r\n    def __init__(self, bb: str):\r\n        ...\r\n\r\n\r\nclass ArchiveContent:\r\n    \"\"\"Stores one line data from the generated html file\"\"\"\r\n\r\n    def __init__(self, offset: str, size: str, name: str):\r\n        ...\r\n\r\n\r\nclass IMGArchive:\r\n    \"\"\"API for freimgedcs.exe\"\"\"\r\n\r\n    def __init__(self, imgname: str | Path,\r\n                 freimgedcs_path: str = get_freimgedcs_exe()):\r\n        ...\r\n\r\n    def rebuild(self):\r\n        \"\"\"Rebuild archive (imgname)\"\"\"\r\n        ...\r\n\r\n    def list(self, *, delete_html_file: bool = False):\r\n        \"\"\"\r\n        Returns the header of the opened archive, information about it, and a list of files of the class ArchiveContent\r\n        \"\"\"\r\n        ...\r\n\r\n    def add(self, filename: str):\r\n        \"\"\"Add/replace file [filename] to/in archive (imgname)\"\"\"\r\n        ...\r\n\r\n    def extract(self, filename: str, filename2: str):\r\n        \"\"\"Extract file [filename] from archive (imgname) to file [filename2]\"\"\"\r\n        ...\r\n\r\n    def rename(self, filename: str, filename2: str):\r\n        \"\"\"Rename file [filename] in archive (imgname) to file [filename2]\"\"\"\r\n        ...\r\n\r\n    def delete(self, filename: str):\r\n        \"\"\"Delete file [filename] from archive (imgname)\"\"\"\r\n        ...\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Open & edit .img files for gta III / VC / SA (+GUI)",
    "version": "1.2.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "71df357f2a5ff0414bc0e80734d55225",
                "sha256": "8f431d7b8bfe01a4de916814339d9e7483290550a346dc3e768e8f62a4c6a770"
            },
            "downloads": -1,
            "filename": "UniversalIMG-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "71df357f2a5ff0414bc0e80734d55225",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 211547,
            "upload_time": "2022-12-14T11:24:20",
            "upload_time_iso_8601": "2022-12-14T11:24:20.993923Z",
            "url": "https://files.pythonhosted.org/packages/54/bb/fc6836f1642efd371ab448b94f7c28ffbbcf06b98b48bac04d914f8b89fc/UniversalIMG-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "8e0d10559a56fb017713c974b4a30166",
                "sha256": "73d4d5b35258e6fd68740af2e427af73c4b65d0c8b29eb13358985473ed423b0"
            },
            "downloads": -1,
            "filename": "UniversalIMG-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8e0d10559a56fb017713c974b4a30166",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 211177,
            "upload_time": "2022-12-14T11:24:24",
            "upload_time_iso_8601": "2022-12-14T11:24:24.390612Z",
            "url": "https://files.pythonhosted.org/packages/ab/97/0c65c78eadb7ab7444acf1aec4f88ad48beb690a4b920a9c6049caddf83a/UniversalIMG-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-14 11:24:24",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "universalimg"
}
        
Elapsed time: 0.01949s