librian 2.0.2__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {librian-2.0.2 → librian-2.2.0}/PKG-INFO +2 -9
- {librian-2.0.2 → librian-2.2.0}/librian/__init__.py +1 -1
- librian-2.2.0/librian/librian/346/234/254/351/253/224/librian.py +26 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224/librian/350/231/233/346/223/254/346/251/237//350/256/200/350/200/205.py +10 -8
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/261/261/345/275/245.py +13 -4
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//347/222/260/345/242/203.py +1 -2
- librian-2.2.0/librian/librian/346/234/254/351/253/224//347/233/243/350/201/275/346/234/215/345/213/231.py +32 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//347/252/227/345/217/243.py +11 -6
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//351/205/215/347/275/256.yaml +1 -1
- {librian-2.0.2 → librian-2.2.0}/librian.egg-info/PKG-INFO +2 -9
- {librian-2.0.2 → librian-2.2.0}/librian.egg-info/SOURCES.txt +1 -1
- {librian-2.0.2 → librian-2.2.0}/librian.egg-info/requires.txt +3 -3
- {librian-2.0.2 → librian-2.2.0}/setup.py +8 -9
- librian-2.0.2/librian/librian/346/234/254/351/253/224/librian.py +0 -21
- librian-2.0.2/librian/librian/346/234/254/351/253/224//346/270/254/350/251/246.py +0 -51
- {librian-2.0.2 → librian-2.2.0}/librian/__main__.py +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian_util//345/212/240/350/274/211/345/231/250.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian_util//346/226/207/344/273/266.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian_util//350/267/257/345/276/221.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224/librian/350/231/233/346/223/254/346/251/237//345/221/275/344/273/244.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224/librian/350/231/233/346/223/254/346/251/237//347/253/213/347/271/252.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224/librian/350/231/233/346/223/254/346/251/237//347/256/261/345/272/255.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224/librian/350/231/233/346/223/254/346/251/237//350/231/233/346/223/254/346/251/237/347/222/260/345/242/203.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224/librian/350/231/233/346/223/254/346/251/237//350/247/222/350/211/262.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224/librian/350/231/233/346/223/254/346/251/237//351/217/241/351/240/255.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/adv.html" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/adv.ptml" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/dist/NotoSerifSC-SemiBold.otf" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/dist/bundle.js" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/dist/t0.png" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/dist//347/264/231/350/203/214/346/231/257/350/212/261/347/264/213.jpg" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/dist//347/264/231/350/203/214/346/231/257/350/212/261/347/264/213.webp" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/dist//347/264/231/350/203/214/346/231/257/350/212/261/347/264/213/346/250/241/347/263/212.jpg" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/dist//347/264/231/350/203/214/346/231/257/350/212/261/347/264/213/346/250/241/347/263/212.webp" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/package-lock.json" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/package.json" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257/webpack.config.js" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/HELP-US-OUT.txt" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/css/font-awesome.css" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/css/font-awesome.min.css" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/fonts/FontAwesome.otf" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/fonts/fontawesome-webfont.eot" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/fonts/fontawesome-webfont.svg" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/fonts/fontawesome-webfont.woff" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/animated.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/bordered-pulled.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/core.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/fixed-width.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/font-awesome.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/icons.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/larger.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/list.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/mixins.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/path.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/rotated-flipped.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/screen-reader.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/stacked.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/less/variables.less" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_animated.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_bordered-pulled.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_core.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_fixed-width.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_icons.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_larger.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_list.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_mixins.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_path.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_rotated-flipped.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_screen-reader.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_stacked.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/_variables.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/font-awesome-4.7.0/scss/font-awesome.scss" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/synthetic_css/_synthetic_offline.sass" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/synthetic_css/synthetic_offline.css" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/synthetic_css//347/264/231/350/203/214/346/231/257/350/212/261/347/264/213.webp" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/221/347/247/221/346/212/200/synthetic_css//347/264/231/350/203/214/346/231/257/350/212/261/347/264/213/346/250/241/347/263/212.webp" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/230/350/252/215/346/250/231/351/241/214/347/225/253/351/235/242//345/256/232/344/275/215.coffee" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/230/350/252/215/346/250/231/351/241/214/347/225/253/351/235/242//345/256/232/344/275/215.js" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/230/350/252/215/346/250/231/351/241/214/347/225/253/351/235/242//346/250/231/351/241/214.html" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/230/350/252/215/346/250/231/351/241/214/347/225/253/351/235/242//346/250/231/351/241/214.ptml" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/230/350/252/215/346/250/231/351/241/214/347/225/253/351/235/242//346/250/243/345/274/217.css" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/211/215/347/253/257//351/273/230/350/252/215/346/250/231/351/241/214/347/225/253/351/235/242//350/231/233/345/203/236/347/232/204/345/201/207/351/235/242.png" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/260/216/345/207/272/346/226/207/344/273/266.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/271/273/350/261/241.py" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//350/263/207/346/272/220/Librian/345/260/217.png" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//350/263/207/346/272/220/librian.ico" +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian.egg-info/dependency_links.txt +0 -0
- {librian-2.0.2 → librian-2.2.0}/librian.egg-info/top_level.txt +0 -0
- {librian-2.0.2 → librian-2.2.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: librian
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: librian
|
|
5
5
|
Home-page: https://github.com/RimoChan/librian
|
|
6
6
|
Author: RimoChan
|
|
@@ -72,13 +72,6 @@ Description: # Librian: 簡明強大的 Galgame | Visual Novel 引擎
|
|
|
72
72
|
|
|
73
73
|
你可以直接用 `pip install liber` 來安裝它。
|
|
74
74
|
|
|
75
|
-
## 援交~
|
|
76
|
-
|
|
77
|
-
QQ 群「Librian蘿莉會所」: 618775838。
|
|
78
|
-
|
|
79
|
-
如果你需要使用幫助,或者對 Librian 和 Galgame 製作有興趣,或者想觀看蘿莉色圖,都可以來這裏討論。
|
|
80
|
-
總之,一起玩就行啦。
|
|
81
|
-
|
|
82
75
|
## 贊助
|
|
83
76
|
|
|
84
77
|
如果你覺得 Librian 對你的工作或學習有幫助,歡迎給作者介紹一些可愛的女朋友。
|
|
@@ -88,5 +81,5 @@ Description: # Librian: 簡明強大的 Galgame | Visual Novel 引擎
|
|
|
88
81
|
Platform: UNKNOWN
|
|
89
82
|
Classifier: Programming Language :: Python :: 3
|
|
90
83
|
Classifier: Operating System :: OS Independent
|
|
91
|
-
Requires-Python: >=3.6
|
|
84
|
+
Requires-Python: >=3.6,<3.10
|
|
92
85
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import logging
|
|
3
|
+
|
|
4
|
+
from . import 環境
|
|
5
|
+
from . import librian虛擬機
|
|
6
|
+
from . import 窗口
|
|
7
|
+
|
|
8
|
+
from .librian虛擬機 import 虛擬機環境
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def ember(project, 編寫模式=False, 跳過標題畫面=False, 監聽模式=False, 端口=8000):
|
|
12
|
+
logging.info('librian_main啓動。')
|
|
13
|
+
librian虛擬機.虛擬機環境.加載配置(os.path.abspath(project))
|
|
14
|
+
環境.導入全局配置({
|
|
15
|
+
'編寫模式': 編寫模式,
|
|
16
|
+
'跳過標題畫面': 跳過標題畫面,
|
|
17
|
+
'監聽模式': 監聽模式,
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
os.makedirs(f'{虛擬機環境.工程路徑}/存檔資料/手動存檔', exist_ok=True)
|
|
21
|
+
|
|
22
|
+
if 監聽模式:
|
|
23
|
+
from . import 監聽服務
|
|
24
|
+
監聽服務.啓動服務(端口)
|
|
25
|
+
app = 窗口.啓動app()
|
|
26
|
+
app.MainLoop()
|
|
@@ -92,8 +92,8 @@ class 劇本:
|
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
class 讀者:
|
|
95
|
-
def __init__(self,
|
|
96
|
-
self.劇本棧 = [self.編譯(初始劇本)]
|
|
95
|
+
def __init__(self, 初始劇本=None):
|
|
96
|
+
self.劇本棧 = [self.編譯(初始劇本)] if 初始劇本 else []
|
|
97
97
|
self.狀態 = 狀態()
|
|
98
98
|
self.狀態.重置()
|
|
99
99
|
self.箱庭 = 箱庭.箱庭(self)
|
|
@@ -117,6 +117,10 @@ class 讀者:
|
|
|
117
117
|
with good_open(s) as f:
|
|
118
118
|
return 劇本(liber.load(f), s)
|
|
119
119
|
|
|
120
|
+
def 動態執行(self, 文本):
|
|
121
|
+
self.劇本棧.append(劇本(liber.load(文本), 'agent'))
|
|
122
|
+
self.步進()
|
|
123
|
+
|
|
120
124
|
def 步進(self, 防止終焉=False):
|
|
121
125
|
s = self.下一句()
|
|
122
126
|
if s['類型'] == '終焉' and 防止終焉:
|
|
@@ -229,18 +233,16 @@ class 讀者句控制:
|
|
|
229
233
|
def 鏡頭(讀者, 鏡頭符號, 內容):
|
|
230
234
|
if 鏡頭符號 == '+':
|
|
231
235
|
try:
|
|
232
|
-
d = yaml.
|
|
236
|
+
d = yaml.safe_load(內容)
|
|
233
237
|
鏡頭.生成鏡頭(d)
|
|
234
238
|
except Exception as e:
|
|
235
|
-
logging.exception(
|
|
236
|
-
logging.warning(f'鏡頭「{內容}」的內容不正確。')
|
|
239
|
+
logging.exception(f'鏡頭「{內容}」的內容不正確。')
|
|
237
240
|
讀者.步進()
|
|
238
241
|
elif 鏡頭符號 == '-':
|
|
239
242
|
try:
|
|
240
|
-
鏡頭.解除鏡頭(yaml.
|
|
243
|
+
鏡頭.解除鏡頭(yaml.safe_load(內容))
|
|
241
244
|
except Exception as e:
|
|
242
|
-
logging.exception(
|
|
243
|
-
logging.warning(f'鏡頭「{內容}」的內容不正確。')
|
|
245
|
+
logging.exception(f'鏡頭「{內容}」的內容不正確。')
|
|
244
246
|
讀者.步進()
|
|
245
247
|
|
|
246
248
|
@staticmethod
|
{librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/261/261/345/275/245.py
RENAMED
|
@@ -17,9 +17,17 @@ from .librian虛擬機 import 虛擬機環境
|
|
|
17
17
|
from .環境 import 配置
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
當前山彥 = None
|
|
21
|
+
|
|
22
|
+
|
|
20
23
|
def 綁定(app, 標題url):
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
global 當前山彥
|
|
25
|
+
if 配置['監聽模式']:
|
|
26
|
+
讀者實例 = 讀者.讀者(None)
|
|
27
|
+
else:
|
|
28
|
+
讀者實例 = 讀者.讀者(f'{虛擬機環境.工程路徑}/{虛擬機環境.劇本入口}')
|
|
29
|
+
當前山彥 = 極山彥(app.frame, app.frame.browser, 讀者實例, 標題url)
|
|
30
|
+
app.frame.set_browser_object("山彥", 當前山彥)
|
|
23
31
|
|
|
24
32
|
|
|
25
33
|
class 山彥(vue_ob):
|
|
@@ -159,9 +167,10 @@ class 極山彥(帶標題山彥):
|
|
|
159
167
|
if 字 != 原字:
|
|
160
168
|
self.更新終態()
|
|
161
169
|
原字 = 字
|
|
162
|
-
t = threading.Thread(target
|
|
163
|
-
t.setDaemon(True)
|
|
170
|
+
t = threading.Thread(target=監視, daemon=True)
|
|
164
171
|
t.start()
|
|
172
|
+
elif 配置['跳過標題畫面']:
|
|
173
|
+
self.步進()
|
|
165
174
|
|
|
166
175
|
def 更新終態(self):
|
|
167
176
|
self.讀者.從一而終(f'{虛擬機環境.工程路徑}/{虛擬機環境.劇本入口}')
|
{librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//347/222/260/345/242/203.py
RENAMED
|
@@ -2,7 +2,6 @@ import os
|
|
|
2
2
|
import logging
|
|
3
3
|
|
|
4
4
|
import yaml
|
|
5
|
-
yaml.warnings({'YAMLLoadWarning': False})
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
def 導入全局配置(a):
|
|
@@ -11,7 +10,7 @@ def 導入全局配置(a):
|
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
with open(os.path.split(os.path.realpath(__file__))[0] + '/配置.yaml', encoding='utf8') as f:
|
|
14
|
-
配置 = yaml.
|
|
13
|
+
配置 = yaml.safe_load(f)
|
|
15
14
|
logging_config = {
|
|
16
15
|
'format': '【%(filename)s - %(lineno)s】(%(levelname)s): %(message)s',
|
|
17
16
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import logging
|
|
3
|
+
import threading
|
|
4
|
+
from http.server import HTTPServer, BaseHTTPRequestHandler
|
|
5
|
+
|
|
6
|
+
from . import 山彥
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class 響(BaseHTTPRequestHandler):
|
|
10
|
+
def do_POST(self):
|
|
11
|
+
len_ = int(self.headers.get('Content-Length', 0))
|
|
12
|
+
data = self.rfile.read(len_).decode('utf8')
|
|
13
|
+
try:
|
|
14
|
+
assert self.path == '/liber'
|
|
15
|
+
if 山彥.當前山彥:
|
|
16
|
+
req = json.loads(data)
|
|
17
|
+
content = req.get('content', data) if isinstance(req, dict) else data
|
|
18
|
+
山彥.當前山彥.讀者.動態執行(content)
|
|
19
|
+
山彥.當前山彥.更新()
|
|
20
|
+
self.send_response(200)
|
|
21
|
+
self.end_headers()
|
|
22
|
+
self.wfile.write(b'{"status": "ok"}')
|
|
23
|
+
except Exception as e:
|
|
24
|
+
logging.exception(e)
|
|
25
|
+
self.send_response(500)
|
|
26
|
+
self.end_headers()
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def 啓動服務(port=8000):
|
|
30
|
+
server = HTTPServer(('0.0.0.0', port), 響)
|
|
31
|
+
threading.Thread(target=server.serve_forever, daemon=True).start()
|
|
32
|
+
logging.info(f'監聽服務已在端口 {port} 啓動。')
|
{librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//347/252/227/345/217/243.py
RENAMED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import os
|
|
1
2
|
import logging
|
|
3
|
+
import tempfile
|
|
2
4
|
|
|
3
5
|
from librian.librian_util import 文件
|
|
4
6
|
try:
|
|
@@ -15,9 +17,8 @@ from .環境 import 配置
|
|
|
15
17
|
from .librian虛擬機 import 虛擬機環境
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
|
|
19
20
|
def 啓動app():
|
|
20
|
-
if 配置['編寫模式']:
|
|
21
|
+
if 配置['編寫模式'] or 配置['跳過標題畫面'] or 配置['監聽模式']:
|
|
21
22
|
url = 路徑.librian本體 / '前端/adv.html'
|
|
22
23
|
elif 虛擬機環境.標題畫面:
|
|
23
24
|
url = f'{虛擬機環境.工程路徑}/{虛擬機環境.標題畫面}'
|
|
@@ -31,11 +32,15 @@ def 啓動app():
|
|
|
31
32
|
else:
|
|
32
33
|
圖標 = 路徑.librian本體 / '資源/librian.ico'
|
|
33
34
|
|
|
35
|
+
cache_path = os.path.join(tempfile.gettempdir(), 'librian_cef')
|
|
36
|
+
os.makedirs(cache_path, exist_ok=True)
|
|
37
|
+
|
|
34
38
|
app, 瀏覽器 = wxcef.group(
|
|
35
|
-
title=虛擬機環境.標題,
|
|
36
|
-
url=標題url,
|
|
37
|
-
icon=圖標,
|
|
38
|
-
size
|
|
39
|
+
title=虛擬機環境.標題,
|
|
40
|
+
url=標題url,
|
|
41
|
+
icon=圖標,
|
|
42
|
+
size=虛擬機環境.主解析度,
|
|
43
|
+
cache_path=cache_path,
|
|
39
44
|
)
|
|
40
45
|
山彥.綁定(app, 標題url=標題url)
|
|
41
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: librian
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: librian
|
|
5
5
|
Home-page: https://github.com/RimoChan/librian
|
|
6
6
|
Author: RimoChan
|
|
@@ -72,13 +72,6 @@ Description: # Librian: 簡明強大的 Galgame | Visual Novel 引擎
|
|
|
72
72
|
|
|
73
73
|
你可以直接用 `pip install liber` 來安裝它。
|
|
74
74
|
|
|
75
|
-
## 援交~
|
|
76
|
-
|
|
77
|
-
QQ 群「Librian蘿莉會所」: 618775838。
|
|
78
|
-
|
|
79
|
-
如果你需要使用幫助,或者對 Librian 和 Galgame 製作有興趣,或者想觀看蘿莉色圖,都可以來這裏討論。
|
|
80
|
-
總之,一起玩就行啦。
|
|
81
|
-
|
|
82
75
|
## 贊助
|
|
83
76
|
|
|
84
77
|
如果你覺得 Librian 對你的工作或學習有幫助,歡迎給作者介紹一些可愛的女朋友。
|
|
@@ -88,5 +81,5 @@ Description: # Librian: 簡明強大的 Galgame | Visual Novel 引擎
|
|
|
88
81
|
Platform: UNKNOWN
|
|
89
82
|
Classifier: Programming Language :: Python :: 3
|
|
90
83
|
Classifier: Operating System :: OS Independent
|
|
91
|
-
Requires-Python: >=3.6
|
|
84
|
+
Requires-Python: >=3.6,<3.10
|
|
92
85
|
Description-Content-Type: text/markdown
|
|
@@ -13,8 +13,8 @@ librian/librian本體/librian.py
|
|
|
13
13
|
librian/librian本體/導出文件.py
|
|
14
14
|
librian/librian本體/山彥.py
|
|
15
15
|
librian/librian本體/幻象.py
|
|
16
|
-
librian/librian本體/測試.py
|
|
17
16
|
librian/librian本體/環境.py
|
|
17
|
+
librian/librian本體/監聽服務.py
|
|
18
18
|
librian/librian本體/窗口.py
|
|
19
19
|
librian/librian本體/配置.yaml
|
|
20
20
|
librian/librian本體/librian虛擬機/命令.py
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import setuptools
|
|
2
|
-
|
|
3
|
-
import librian
|
|
2
|
+
from pathlib import Path
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
setuptools.setup(
|
|
7
6
|
name='librian',
|
|
8
|
-
version=
|
|
7
|
+
version='2.2.0',
|
|
9
8
|
author='RimoChan',
|
|
10
9
|
author_email='the@librian.net',
|
|
11
10
|
description='librian',
|
|
@@ -13,7 +12,7 @@ setuptools.setup(
|
|
|
13
12
|
long_description_content_type='text/markdown',
|
|
14
13
|
url='https://github.com/RimoChan/librian',
|
|
15
14
|
packages=[
|
|
16
|
-
'librian',
|
|
15
|
+
'librian',
|
|
17
16
|
'librian.librian_util',
|
|
18
17
|
'librian.librian本體',
|
|
19
18
|
'librian.librian本體.librian虛擬機',
|
|
@@ -21,7 +20,7 @@ setuptools.setup(
|
|
|
21
20
|
package_data={
|
|
22
21
|
'librian.librian本體': [
|
|
23
22
|
'前端/*', '前端/dist/*', '前端/默認標題畫面/*', '前端/黑科技/**/*', '前端/黑科技/**/**/*',
|
|
24
|
-
'資源/*',
|
|
23
|
+
'資源/*',
|
|
25
24
|
'配置.yaml',
|
|
26
25
|
],
|
|
27
26
|
},
|
|
@@ -31,16 +30,16 @@ setuptools.setup(
|
|
|
31
30
|
],
|
|
32
31
|
install_requires=[
|
|
33
32
|
'liber>=1.0.1',
|
|
34
|
-
'rimo_utils>=1.
|
|
35
|
-
'cefpython3>=66.
|
|
33
|
+
'rimo_utils>=1.9.0',
|
|
34
|
+
'cefpython3>=66.1',
|
|
36
35
|
'wxPython>=4.0.4',
|
|
37
36
|
'cloudpickle>=1.2.2',
|
|
38
37
|
'opencc>=1.1.1',
|
|
39
|
-
'PyYAML>=
|
|
38
|
+
'PyYAML>=6.0',
|
|
40
39
|
'fire>=0.2.1',
|
|
41
40
|
'requests>=2.24.0',
|
|
42
41
|
'libsass>=0.20.0',
|
|
43
42
|
'AppKit>=0.2.8 ; sys_platform == "darwin"',
|
|
44
43
|
],
|
|
45
|
-
python_requires='>=3.6,
|
|
44
|
+
python_requires='>=3.6,<3.10', # cefpython3只支持到3.9
|
|
46
45
|
)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import logging
|
|
3
|
-
|
|
4
|
-
from . import 環境
|
|
5
|
-
from . import librian虛擬機
|
|
6
|
-
from . import 窗口
|
|
7
|
-
|
|
8
|
-
from .librian虛擬機 import 虛擬機環境
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def ember(project, 編寫模式=False):
|
|
12
|
-
logging.info('librian_main啓動。')
|
|
13
|
-
librian虛擬機.虛擬機環境.加載配置(project)
|
|
14
|
-
環境.導入全局配置({
|
|
15
|
-
'編寫模式': 編寫模式
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
os.makedirs(f'{虛擬機環境.工程路徑}/存檔資料/手動存檔', exist_ok=True)
|
|
19
|
-
|
|
20
|
-
app = 窗口.啓動app()
|
|
21
|
-
app.MainLoop()
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
|
|
3
|
-
from rimo_utils import good_open
|
|
4
|
-
|
|
5
|
-
import 環境
|
|
6
|
-
from Librian虛擬機 import 虛擬機環境
|
|
7
|
-
|
|
8
|
-
虛擬機環境.加載配置('./project/_默認工程')
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class 全部測試(unittest.TestCase):
|
|
12
|
-
maxDiff = None
|
|
13
|
-
# def test_角色(self):
|
|
14
|
-
# from Librian虛擬機 import 角色
|
|
15
|
-
# self.assertEqual(
|
|
16
|
-
# str(角色.角色表),
|
|
17
|
-
# "{'潘大爺': 角色(潘大爺->[衣:{'_默認': ['_']}],[顏:{'_默認': []}])}"
|
|
18
|
-
# )
|
|
19
|
-
# self.assertEqual(
|
|
20
|
-
# str(角色.角色表['潘大爺'].圖層座標),
|
|
21
|
-
# "{'_': {'x': 0, 'y': 0}}"
|
|
22
|
-
# )
|
|
23
|
-
|
|
24
|
-
def test_編譯(self):
|
|
25
|
-
from Librian虛擬機 import 編譯
|
|
26
|
-
with good_open(f'{虛擬機環境.工程路徑}/{虛擬機環境.配置["劇本入口"]}') as f:
|
|
27
|
-
self.assertEqual(
|
|
28
|
-
編譯.編譯(f),
|
|
29
|
-
[
|
|
30
|
-
{'縮進數': 0, '註釋': ' 背景來自pixiv_id=75399001的「無料背景素材[和風縁側]」。', '類型': '註釋'},
|
|
31
|
-
{'縮進數': 0, '註釋': ' 潘大爺的立繪來自某黃昏風立繪生成器。', '類型': '註釋'}, {'縮進數': 0, '註釋': ' 音樂來自https://filmmusic.io,作者Kevin MacLeod,使用CC4條款。', '類型': '註釋', '之後的空白': 1},
|
|
32
|
-
{'縮進數': 0, '原文': 'BGM call-to-adventure', '函數': 'BGM', '參數表': [{'a': 'call-to-adventure'}], '類型': '函數調用'},
|
|
33
|
-
{'縮進數': 0, '原文': 'BG 和風縁側', '函數': 'BG', '參數表': [{'a': '和風縁側'}], '類型': '函數調用'},
|
|
34
|
-
{'縮進數': 0, '名': '潘大爺', '代': None, '特效': None, '顏': None, '語': '今天天氣不錯,\n去散步吧。', '類型': '人物對話'},
|
|
35
|
-
{'縮進數': 0, '類型': '旁白', '旁白': '潘大爺走了。'}, {'縮進數': 0, '鏡頭符號': '-', '內容': '潘大爺', '類型': '鏡頭'}, {'縮進數': 0, '類型': '旁白', '旁白': '然後就誰也沒有了。'}
|
|
36
|
-
]
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
def test_劇本(self):
|
|
40
|
-
from Librian虛擬機 import 劇本
|
|
41
|
-
讀者 = 劇本.讀者(f'{虛擬機環境.工程路徑}/{虛擬機環境.配置["劇本入口"]}')
|
|
42
|
-
self.assertEqual(
|
|
43
|
-
list(讀者.迭代器()),
|
|
44
|
-
[
|
|
45
|
-
{'額外信息': '', '話語': '今天天氣不錯,\n去散步吧。', '名字': '潘大爺', '立繪': [{'圖層': [{'文件': '../project/_默認工程/_臨時文件/潘大爺/_.png', '子位置': (0, 0)}], '位置': [300, 0, 1], '動作': ('淡入',), '特效': None, '名字': '潘大爺'}], '視頻': '', '背景': ('和風縁側.jpg', 1, '_淡出'), '背景音樂': ('call-to-adventure.mp3', 1), 'cg': '', 'js': '', '選項': [], '語者': '潘大爺', '特效表': {}},
|
|
46
|
-
{'額外信息': '', '話語': '潘大爺走了。', '名字': '', '立繪': [{'圖層': [{'文件': '../project/_默認工程/_臨時文件/潘大爺/_.png', '子位置': (0, 0)}], '位置': [300, 0, 1], '動作': None, '特效': None, '名字': '潘大爺'}], '視頻': '', '背景': ('和風縁側.jpg', 1, '_淡出'), '背景音樂': ('call-to-adventure.mp3', 1), 'cg': '', 'js': '', '選項': [], '語者': '', '特效表': {}},
|
|
47
|
-
{'額外信息': '', '話語': '然後就誰也沒有了。', '名字': '', '立繪': [], '視頻': '', '背景': ('和風縁側.jpg', 1, '_淡出'), '背景音樂': ('call-to-adventure.mp3', 1), 'cg': '', 'js': '', '選項': [], '語者': '', '特效表': {}}
|
|
48
|
-
]
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
unittest.main()
|
|
File without changes
|
{librian-2.0.2 → librian-2.2.0}/librian/librian_util//345/212/240/350/274/211/345/231/250.py"
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{librian-2.0.2 → librian-2.2.0}/librian/librian/346/234/254/351/253/224//345/271/273/350/261/241.py"
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|