Skip to main content

line-theme-editor

Donate License PyPi

LINEの着せ替えを簡単に編集できるライブラリ

ライブラリの詳細

Theme(theme_name, os_type='Android', base_theme='black', log=True)
引数 概要
base_theme base_themefile/{os_type}/{base_name} がベースファイルとして扱われる
os_type iOS, Android
※iOSは脱獄が必要なため未実装
theme_name 自作着せ替えの名前
log ログファイルの残すか否か
メソッド 概要
thaw_file() ベースファイルの解凍を行う。
temp_{theme_name}配下に解凍される。
compression_file(delete_temp=True) temp_{theme_name} を圧縮する。
comp_themefile/{os_type}/{theme_name}/themefileに保存される。
delete_tempがTrueだと temp_{theme_name} が削除される。
edit_theme(*args) theme.jsonを編集する。 詳しくはこちら
edit_by_egg(key, status) あらかじめ定義されているjsonの編集メソッド。
使い方はsample_egg.pyを参照。
add_image(file_name) temp_{theme_name}/images 配下に画像を追加するメソッド。
※既存している場合、上書きされる。
load_log(file_name) ログファイルから一括編集できるメソッド。
apply(theme_id=None) LINEの着せ替えを置き換えるメソッド。
theme_idを指定いない場合、base_theme の着せ替えに適用される。

theme.jsonの編集

修正前のtheme.json

"manifest": {
    "name": "black",
    "provider": {
        "name": "LINE Corporation",
        "url": "http://www.linecorp.com"
    },
    "themeVersion": "9.17.0"
}

このプログラムを動かす

from linetheme import Theme

THEME_NAME = 'ETS_black'

if __name__ == "__main__":
    theme = Theme(THEME_NAME, 'Android', 'black', False)
    theme.thaw_file()

    theme.edit_theme('manifest', 'name', THEME_NAME)
    theme.edit_theme('manifest', 'provider', 'name', 'nanato12')
    theme.edit_theme('manifest', 'provider', 'url', 'http://www.nanato12.info')
    theme.edit_theme('manifest', 'themeVersion', '1.0.0')

    theme.compression_file(False)

    theme.apply()

編集後のtheme.json

"manifest": {
    "name": "ETS_black",
    "provider": {
        "name": "nanato12",
        "url": "http://www.nanato12.info"
    },
    "themeVersion": "1.0.0"
}

Other

Androidの色透明化はこちらの記事を参考に。

License

MIT

Release files for linetheme 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for linetheme 1.0.0
File Interpreter ABI Platform
linetheme-1.0.0-py3-none-any.whl Python 3 none any Details

Release files / linetheme-1.0.0-py3-none-any.whl

Download URL linetheme-1.0.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64a5c8df9c03aa0b67d2155c69aab072db4d1050e834959a0babb4f287b32bb5
BLAKE2b-256 checksum
How to use checksums
7e4474c1d4272bae5dba84d59047358c214a9bdf8f34cbc38ca17992a662ea5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page