Skip to main content

LINE theme editor.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

linetheme-1.0.0-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page