Spaces:
Sleeping
Sleeping
Ethscriptions
commited on
Commit
·
8a72757
1
Parent(s):
a82bc79
Add application file
Browse files- .DS_Store +0 -0
- app.py +18 -10
- data/.DS_Store +0 -0
- data/eths_data.db +0 -0
- data/ethscriptions_data.db +2 -2
- img/.DS_Store +0 -0
- img/news.jpeg +0 -0
- pages/1_🔍_批量查询铭文状态.py +3 -3
- pages/2_🆔_ 批量题写域名铭文.py +1 -0
- pages/3_🪙_ 批量题写代币铭文.py +1 -0
- pages/{4_🕵️♀️_Ethscriptions Data.py → 4_💹️_铭文数据分析.py} +2 -2
- pages/5_🏫_教程中心.py +9 -0
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
app.py
CHANGED
@@ -1126,24 +1126,29 @@ def get_eths_staking():
|
|
1126 |
return {} # 返回一个空字典作为默认值
|
1127 |
|
1128 |
|
1129 |
-
st.set_page_config(page_title=
|
1130 |
|
1131 |
# 首页
|
1132 |
st.markdown(
|
1133 |
-
f'# <a href="https://ethpen.com" target="_self"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "ethpen_logo.svg"))}" alt="Image" width="64px" height="64px" style="border-radius: 8px;"/></a> EthPen - 以太之笔',
|
1134 |
unsafe_allow_html=True)
|
1135 |
-
st.
|
1136 |
-
|
|
|
|
|
1137 |
st.markdown(
|
1138 |
-
f'
|
1139 |
unsafe_allow_html=True)
|
1140 |
-
st.markdown(f'
|
|
|
1141 |
# 广告位图片
|
|
|
1142 |
st.markdown(
|
1143 |
f'<a href="https://twitter.com/EtchMarket/status/1694024108672245953" target="_blank"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ad.jpg"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/></a>',
|
1144 |
unsafe_allow_html=True)
|
1145 |
st.markdown(f'> 拆分方案现在面向所有人推出!让我们一起加入权益挖矿的浪潮,并分享50%的月度服务费。')
|
1146 |
-
st.markdown("###
|
|
|
1147 |
|
1148 |
# st.expander
|
1149 |
search_rune_expander = st.expander("查询 Ethscriptions")
|
@@ -1151,7 +1156,7 @@ create_rune_expander = st.expander("题写 Ethscriptions")
|
|
1151 |
token_no_code_expander = st.expander("一键式铭文批量题写,无需编码知识!")
|
1152 |
trend_expander = st.expander("潮流动态")
|
1153 |
help_expander = st.expander("教程帮助")
|
1154 |
-
|
1155 |
# 查询铭文页面
|
1156 |
search_rune_expander.info(
|
1157 |
f"铭文数据来自 [Ethscriptions](https://ethscriptions.com/) 官方网站,当前索引器状态落后: {get_block_status()['blocks_behind']} 个区块。")
|
@@ -1497,8 +1502,11 @@ eths_card_content = f"""
|
|
1497 |
st.markdown(eths_card_content, unsafe_allow_html=True)
|
1498 |
|
1499 |
st.markdown('')
|
1500 |
-
st.markdown('##### 关于 ethpen.com
|
1501 |
-
st.markdown(
|
|
|
|
|
|
|
1502 |
|
1503 |
st.markdown(f'''
|
1504 |
<span class="tag"><a href="https://twitter.com/pztuya" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{twitter_encoded_svg}" /> @pztuya</a></span>
|
|
|
1126 |
return {} # 返回一个空字典作为默认值
|
1127 |
|
1128 |
|
1129 |
+
st.set_page_config(page_title="EthPen - 以太之笔", page_icon="🖊", layout='wide', initial_sidebar_state='expanded')
|
1130 |
|
1131 |
# 首页
|
1132 |
st.markdown(
|
1133 |
+
f'# <a href="https://ethpen.com" target="_self"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "ethpen_logo.svg"))}" alt="Image" width="64px" height="64px" style="border-radius: 8px;"/></a> :rainbow[EthPen - 以太之笔]',
|
1134 |
unsafe_allow_html=True)
|
1135 |
+
st.subheader('', anchor=False, divider='rainbow')
|
1136 |
+
|
1137 |
+
# 最近新闻
|
1138 |
+
st.markdown(f'### 最近新闻')
|
1139 |
st.markdown(
|
1140 |
+
f'<a href="https://twitter.com/dumbnamenumbers/status/1696989307871826137" target="_blank"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "news.jpeg"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/></a>',
|
1141 |
unsafe_allow_html=True)
|
1142 |
+
st.markdown(f'> 3 周前,我们提出了 Ethscriptions 虚拟机的构想——一种通过将其解释为计算机指令来显著增强 Ethscriptions 功能的方法。今天,我们宣布了该虚拟机的首个实现。已在 Goerli 网络上线,并已在 GitHub 上完全开源!👆')
|
1143 |
+
|
1144 |
# 广告位图片
|
1145 |
+
st.markdown(f'### 广告位')
|
1146 |
st.markdown(
|
1147 |
f'<a href="https://twitter.com/EtchMarket/status/1694024108672245953" target="_blank"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ad.jpg"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/></a>',
|
1148 |
unsafe_allow_html=True)
|
1149 |
st.markdown(f'> 拆分方案现在面向所有人推出!让我们一起加入权益挖矿的浪潮,并分享50%的月度服务费。')
|
1150 |
+
st.markdown("### 功能专区")
|
1151 |
+
|
1152 |
|
1153 |
# st.expander
|
1154 |
search_rune_expander = st.expander("查询 Ethscriptions")
|
|
|
1156 |
token_no_code_expander = st.expander("一键式铭文批量题写,无需编码知识!")
|
1157 |
trend_expander = st.expander("潮流动态")
|
1158 |
help_expander = st.expander("教程帮助")
|
1159 |
+
st.markdown("🎉 更多功能尽在菜单栏,请点击左上角的 >")
|
1160 |
# 查询铭文页面
|
1161 |
search_rune_expander.info(
|
1162 |
f"铭文数据来自 [Ethscriptions](https://ethscriptions.com/) 官方网站,当前索引器状态落后: {get_block_status()['blocks_behind']} 个区块。")
|
|
|
1502 |
st.markdown(eths_card_content, unsafe_allow_html=True)
|
1503 |
|
1504 |
st.markdown('')
|
1505 |
+
st.markdown('##### 关于 ethpen.com')
|
1506 |
+
st.markdown(
|
1507 |
+
f'欢迎踏足 EthPen - 以太之笔!这里汇聚了一系列关于 Ethscriptions 的精细工具集,无论是单一查询、铭文题写,还是批量检索、编码题写,乃至深入的教程导引,以太之笔都将助您铭文题写如飞。我们立志推广 Ethscriptions 的宏大理念,期望 $eths 翱翔于星空,与月相伴!若您携手建议或创意,我们热切期待您的声音。',
|
1508 |
+
unsafe_allow_html=True)
|
1509 |
+
st.markdown('对了,我叫 pztuya,期待你们和我多多交流😊~')
|
1510 |
|
1511 |
st.markdown(f'''
|
1512 |
<span class="tag"><a href="https://twitter.com/pztuya" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{twitter_encoded_svg}" /> @pztuya</a></span>
|
data/.DS_Store
CHANGED
Binary files a/data/.DS_Store and b/data/.DS_Store differ
|
|
data/eths_data.db
CHANGED
Binary files a/data/eths_data.db and b/data/eths_data.db differ
|
|
data/ethscriptions_data.db
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc58b825a4f539092a9b7af6f122cd3b1218e07559842b0fde0718a96b5c0287
|
3 |
+
size 396701696
|
img/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
img/news.jpeg
ADDED
pages/1_🔍_批量查询铭文状态.py
CHANGED
@@ -26,7 +26,7 @@ def get_name_set_data(set_choose):
|
|
26 |
content_set = f'{name_set_cursor.fetchone()[0]}'
|
27 |
|
28 |
|
29 |
-
st.set_page_config(page_title="EthPen - 批量查询铭文状态", page_icon="
|
30 |
|
31 |
st.markdown(f'# EthPen - 批量查询铭文状态')
|
32 |
name_selected_option = st.radio("选择查询的类型:",
|
@@ -268,7 +268,7 @@ if st.button('🔎 查询', key='🔎 查询'):
|
|
268 |
names = [custom_prefix + name + custom_suffix for name in names]
|
269 |
names = ["data:," + name if not name.startswith("data:,") else name for name in names]
|
270 |
for i in names:
|
271 |
-
if names
|
272 |
all_items.append(text_to_hex(i))
|
273 |
else:
|
274 |
names = re.split(r"\s+", content)
|
@@ -277,7 +277,7 @@ if st.button('🔎 查询', key='🔎 查询'):
|
|
277 |
names = ["data:," + name if not name.startswith("data:,") else name for name in names]
|
278 |
|
279 |
for i in names:
|
280 |
-
if names
|
281 |
all_items.append(text_to_hex(i))
|
282 |
|
283 |
ethscrptions_db_file = os.path.join(parent_dir, 'data', 'ethscriptions_data.db')
|
|
|
26 |
content_set = f'{name_set_cursor.fetchone()[0]}'
|
27 |
|
28 |
|
29 |
+
st.set_page_config(page_title="EthPen - 批量查询铭文状态", page_icon="🔍", layout='wide', initial_sidebar_state='auto')
|
30 |
|
31 |
st.markdown(f'# EthPen - 批量查询铭文状态')
|
32 |
name_selected_option = st.radio("选择查询的类型:",
|
|
|
268 |
names = [custom_prefix + name + custom_suffix for name in names]
|
269 |
names = ["data:," + name if not name.startswith("data:,") else name for name in names]
|
270 |
for i in names:
|
271 |
+
if names != 'data:,':
|
272 |
all_items.append(text_to_hex(i))
|
273 |
else:
|
274 |
names = re.split(r"\s+", content)
|
|
|
277 |
names = ["data:," + name if not name.startswith("data:,") else name for name in names]
|
278 |
|
279 |
for i in names:
|
280 |
+
if names != 'data:,':
|
281 |
all_items.append(text_to_hex(i))
|
282 |
|
283 |
ethscrptions_db_file = os.path.join(parent_dir, 'data', 'ethscriptions_data.db')
|
pages/2_🆔_ 批量题写域名铭文.py
CHANGED
@@ -101,6 +101,7 @@ def send_transaction(w3, account_address, private_key, chain_id, gas_price, inpu
|
|
101 |
# 返回铭文还有交易哈希
|
102 |
return input_data, tx_hash.hex()
|
103 |
|
|
|
104 |
# 网页前端显示
|
105 |
# 网页标题
|
106 |
st.markdown('# [ethpen.com](https://ethpen.com) 域名铭文批量题写')
|
|
|
101 |
# 返回铭文还有交易哈希
|
102 |
return input_data, tx_hash.hex()
|
103 |
|
104 |
+
st.set_page_config(page_title="EthPen - 批量题写域名铭文", page_icon="🆔", layout='wide', initial_sidebar_state='auto')
|
105 |
# 网页前端显示
|
106 |
# 网页标题
|
107 |
st.markdown('# [ethpen.com](https://ethpen.com) 域名铭文批量题写')
|
pages/3_🪙_ 批量题写代币铭文.py
CHANGED
@@ -84,6 +84,7 @@ def send_transaction(w3, account_address, private_key, chain_id, gas_price, inpu
|
|
84 |
# 返回铭文还有交易哈希
|
85 |
return input_data, tx_hash.hex()
|
86 |
|
|
|
87 |
# 网页前端显示
|
88 |
# 网页标题
|
89 |
st.markdown('# [ethpen.com](https://ethpen.com) 代币铭文批量题写')
|
|
|
84 |
# 返回铭文还有交易哈希
|
85 |
return input_data, tx_hash.hex()
|
86 |
|
87 |
+
st.set_page_config(page_title="EthPen - 批量题写代币铭文", page_icon="🪙", layout='wide', initial_sidebar_state='auto')
|
88 |
# 网页前端显示
|
89 |
# 网页标题
|
90 |
st.markdown('# [ethpen.com](https://ethpen.com) 代币铭文批量题写')
|
pages/{4_🕵️♀️_Ethscriptions Data.py → 4_💹️_铭文数据分析.py}
RENAMED
@@ -145,7 +145,7 @@ def get_ethscriptions_data():
|
|
145 |
|
146 |
|
147 |
# Streamlit app layout
|
148 |
-
st.set_page_config(page_title="EthPen -
|
149 |
|
150 |
st.error('功能开发中,仅供参考!')
|
151 |
st.title(f'EthPen - Ethscriptions 数据总揽')
|
@@ -191,7 +191,7 @@ if download:
|
|
191 |
st.download_button(
|
192 |
label='下载数据库',
|
193 |
data=open(ethscrptions_db_file, 'rb'),
|
194 |
-
file_name='
|
195 |
mime='application/octet-stream'
|
196 |
)
|
197 |
|
|
|
145 |
|
146 |
|
147 |
# Streamlit app layout
|
148 |
+
st.set_page_config(page_title="EthPen - 铭文数据分析", page_icon="💹", layout='wide', initial_sidebar_state='auto')
|
149 |
|
150 |
st.error('功能开发中,仅供参考!')
|
151 |
st.title(f'EthPen - Ethscriptions 数据总揽')
|
|
|
191 |
st.download_button(
|
192 |
label='下载数据库',
|
193 |
data=open(ethscrptions_db_file, 'rb'),
|
194 |
+
file_name='EthPen_ethscriptions_data.db',
|
195 |
mime='application/octet-stream'
|
196 |
)
|
197 |
|
pages/5_🏫_教程中心.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import re
|
3 |
+
import os
|
4 |
+
import sqlite3
|
5 |
+
import pandas as pd
|
6 |
+
|
7 |
+
|
8 |
+
st.error('开发中,仅供参考...')
|
9 |
+
st.markdown(f'# 教程中心')
|