Spaces:
Running
Running
Commit
·
b38376b
1
Parent(s):
516d83c
Add application file
Browse files- data/.DS_Store +0 -0
- data/config.ini +1 -0
- data/eths_data.db +0 -0
- data/ethscriptions_data.db +2 -2
- data/name_set.db +2 -2
- pages/1_🔍_批量查询铭文状态.py +11 -7
- pages/2_🆔_ 批量题写域名铭文.py +1 -1
- pages/3_🪙_ 批量题写代币铭文.py +1 -1
- pages/4_💹️_铭文数据分析.py +2 -2
- pages/5_🏫_教程中心.py +1 -1
- pages/6_📢_推送通知服务.py +1 -1
- 🖊️EthPen-以太之笔.py +1 -1
data/.DS_Store
CHANGED
Binary files a/data/.DS_Store and b/data/.DS_Store differ
|
|
data/config.ini
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
[thread_start_state]
|
2 |
state = 0
|
|
|
|
1 |
[thread_start_state]
|
2 |
state = 0
|
3 |
+
|
data/eths_data.db
ADDED
Binary file (8.19 kB). View file
|
|
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:7d7b2157915c2dfb62e7818ea065896ec9ba1e6c6695c99ab1014d7d7340f7af
|
3 |
+
size 399220736
|
data/name_set.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:be9acd3c84b4d132d5db68a66943b1412cddb388513c73d5ea0ed7a96eb706f8
|
3 |
+
size 2383872
|
pages/1_🔍_批量查询铭文状态.py
CHANGED
@@ -18,16 +18,17 @@ name_set_cursor = name_set_conn.cursor()
|
|
18 |
content_set = ''
|
19 |
check_type = ''
|
20 |
|
|
|
21 |
# 把文字转换成 16 进制
|
22 |
def text_to_hex(text):
|
23 |
return '0x' + ''.join(format(ord(char), '02x') for char in text)
|
24 |
|
25 |
|
26 |
-
st.set_page_config(page_title="EthPen - 批量查询铭文状态", page_icon="🔍", layout='
|
27 |
st.subheader('🔍 EthPen - 批量查询铭文状态', anchor=False, divider='rainbow')
|
28 |
|
29 |
st.write("<style>div.row-widget.stRadio > div{background-color:white;border: 1px solid #e6e9ef;border-radius:8px;padding:10px;box-shadow: 2px 2px 10px #e6e9ef;}</style>", unsafe_allow_html=True)
|
30 |
-
|
31 |
name_selected_option = st.radio("选择查询的类型:",
|
32 |
['🔤纯文本', '🪙代币铭文', '🆔.eths', '🆔.eth', '🌲.tree', '🦛.honk', '🔄.etch', '🌐.com', '🥳.club'], index=0,
|
33 |
horizontal=True)
|
@@ -172,7 +173,7 @@ if not token_check:
|
|
172 |
content_set = ' '.join(filtered_list)
|
173 |
|
174 |
if not token_check:
|
175 |
-
content = st.text_area('铭文列表:', value=content_set)
|
176 |
|
177 |
|
178 |
hide_inscribed = st.toggle('隐藏已题写')
|
@@ -182,7 +183,7 @@ else:
|
|
182 |
hide_inscribed = False
|
183 |
|
184 |
if st.button('🔎 查询', key='🔎 查询'):
|
185 |
-
st.markdown(f'
|
186 |
all_items = []
|
187 |
names = []
|
188 |
if token_check:
|
@@ -216,6 +217,7 @@ if st.button('🔎 查询', key='🔎 查询'):
|
|
216 |
names_total = len(names)
|
217 |
name_not_yet_total = 0
|
218 |
result = []
|
|
|
219 |
for index in range(len(names)):
|
220 |
ethscriptions_cursor.execute("SELECT * FROM data WHERE data=?", (all_items[index],))
|
221 |
row = ethscriptions_cursor.fetchone()
|
@@ -223,15 +225,17 @@ if st.button('🔎 查询', key='🔎 查询'):
|
|
223 |
if not row:
|
224 |
result.append({"铭文": names[index], "状态": "未题写", "十六进制数据": all_items[index]})
|
225 |
name_not_yet_total += 1
|
|
|
226 |
else:
|
227 |
if row:
|
228 |
result.append({"铭文": names[index], "状态": "已题写", "十六进制数据": all_items[index]})
|
229 |
else:
|
230 |
result.append({"铭文": names[index], "状态": "未题写", "十六进制数据": all_items[index]})
|
231 |
name_not_yet_total += 1
|
232 |
-
|
|
|
233 |
if not result:
|
234 |
-
st.markdown(f'
|
235 |
else:
|
236 |
# 将结果转换为Pandas DataFrame
|
237 |
result_df = pd.DataFrame(result)
|
@@ -240,7 +244,7 @@ if st.button('🔎 查询', key='🔎 查询'):
|
|
240 |
csv_export = result_df.to_csv(index=False, encoding='utf-8')
|
241 |
# Add a download button for the DataFrame
|
242 |
st.download_button(
|
243 |
-
label="⏬
|
244 |
data=csv_export,
|
245 |
file_name="ethpen_result_data.csv",
|
246 |
mime="text/csv"
|
|
|
18 |
content_set = ''
|
19 |
check_type = ''
|
20 |
|
21 |
+
|
22 |
# 把文字转换成 16 进制
|
23 |
def text_to_hex(text):
|
24 |
return '0x' + ''.join(format(ord(char), '02x') for char in text)
|
25 |
|
26 |
|
27 |
+
st.set_page_config(page_title="EthPen - 批量查询铭文状态", page_icon="🔍", layout='centered', initial_sidebar_state='auto')
|
28 |
st.subheader('🔍 EthPen - 批量查询铭文状态', anchor=False, divider='rainbow')
|
29 |
|
30 |
st.write("<style>div.row-widget.stRadio > div{background-color:white;border: 1px solid #e6e9ef;border-radius:8px;padding:10px;box-shadow: 2px 2px 10px #e6e9ef;}</style>", unsafe_allow_html=True)
|
31 |
+
st.markdown(f'### 💖 查找你心仪的铭文')
|
32 |
name_selected_option = st.radio("选择查询的类型:",
|
33 |
['🔤纯文本', '🪙代币铭文', '🆔.eths', '🆔.eth', '🌲.tree', '🦛.honk', '🔄.etch', '🌐.com', '🥳.club'], index=0,
|
34 |
horizontal=True)
|
|
|
173 |
content_set = ' '.join(filtered_list)
|
174 |
|
175 |
if not token_check:
|
176 |
+
content = st.text_area('铭文列表:', value=content_set, key=1)
|
177 |
|
178 |
|
179 |
hide_inscribed = st.toggle('隐藏已题写')
|
|
|
183 |
hide_inscribed = False
|
184 |
|
185 |
if st.button('🔎 查询', key='🔎 查询'):
|
186 |
+
st.markdown(f'### 📄 查询结果')
|
187 |
all_items = []
|
188 |
names = []
|
189 |
if token_check:
|
|
|
217 |
names_total = len(names)
|
218 |
name_not_yet_total = 0
|
219 |
result = []
|
220 |
+
show_unwritten_list = []
|
221 |
for index in range(len(names)):
|
222 |
ethscriptions_cursor.execute("SELECT * FROM data WHERE data=?", (all_items[index],))
|
223 |
row = ethscriptions_cursor.fetchone()
|
|
|
225 |
if not row:
|
226 |
result.append({"铭文": names[index], "状态": "未题写", "十六进制数据": all_items[index]})
|
227 |
name_not_yet_total += 1
|
228 |
+
show_unwritten_list.append(names[index])
|
229 |
else:
|
230 |
if row:
|
231 |
result.append({"铭文": names[index], "状态": "已题写", "十六进制数据": all_items[index]})
|
232 |
else:
|
233 |
result.append({"铭文": names[index], "状态": "未题写", "十六进制数据": all_items[index]})
|
234 |
name_not_yet_total += 1
|
235 |
+
show_unwritten_list.append(names[index])
|
236 |
+
st.progress(1 - (name_not_yet_total / names_total), f'题写进度({(1 - (name_not_yet_total / names_total)) * 100:.0f}%):')
|
237 |
if not result:
|
238 |
+
st.markdown(f'### ☹️ 你来迟了~')
|
239 |
else:
|
240 |
# 将结果转换为Pandas DataFrame
|
241 |
result_df = pd.DataFrame(result)
|
|
|
244 |
csv_export = result_df.to_csv(index=False, encoding='utf-8')
|
245 |
# Add a download button for the DataFrame
|
246 |
st.download_button(
|
247 |
+
label="⏬ 下载查询结果",
|
248 |
data=csv_export,
|
249 |
file_name="ethpen_result_data.csv",
|
250 |
mime="text/csv"
|
pages/2_🆔_ 批量题写域名铭文.py
CHANGED
@@ -101,7 +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 |
-
st.set_page_config(page_title="EthPen - 批量题写域名铭文", page_icon="🆔", layout='
|
105 |
# 网页前端显示
|
106 |
# 网页标题
|
107 |
st.subheader('🆔 EthPen - 域名铭文批量题写', anchor=False, divider='rainbow')
|
|
|
101 |
# 返回铭文还有交易哈希
|
102 |
return input_data, tx_hash.hex()
|
103 |
|
104 |
+
st.set_page_config(page_title="EthPen - 批量题写域名铭文", page_icon="🆔", layout='centered', initial_sidebar_state='auto')
|
105 |
# 网页前端显示
|
106 |
# 网页标题
|
107 |
st.subheader('🆔 EthPen - 域名铭文批量题写', anchor=False, divider='rainbow')
|
pages/3_🪙_ 批量题写代币铭文.py
CHANGED
@@ -84,7 +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 |
-
st.set_page_config(page_title="EthPen - 批量题写代币铭文", page_icon="🪙", layout='
|
88 |
# 网页前端显示
|
89 |
# 网页标题
|
90 |
st.subheader('🪙 EthPen - 代币铭文批量题写', anchor=False, divider='rainbow')
|
|
|
84 |
# 返回铭文还有交易哈希
|
85 |
return input_data, tx_hash.hex()
|
86 |
|
87 |
+
st.set_page_config(page_title="EthPen - 批量题写代币铭文", page_icon="🪙", layout='centered', initial_sidebar_state='auto')
|
88 |
# 网页前端显示
|
89 |
# 网页标题
|
90 |
st.subheader('🪙 EthPen - 代币铭文批量题写', anchor=False, divider='rainbow')
|
pages/4_💹️_铭文数据分析.py
CHANGED
@@ -158,7 +158,7 @@ def get_ethscriptions_data():
|
|
158 |
# time.sleep(15)
|
159 |
|
160 |
# Streamlit app layout
|
161 |
-
st.set_page_config(page_title="EthPen - 铭文数据分析", page_icon="💹", layout='
|
162 |
st.subheader('💹 EthPen - 铭文数据分析', anchor=False, divider='rainbow')
|
163 |
|
164 |
st.markdown(f'### eths 数据总揽')
|
@@ -200,7 +200,7 @@ index_latest_block_number = w3.eth.block_number
|
|
200 |
st.markdown(f'*EthPen Ethscriptions Index Status: {index_processed_block}/{index_latest_block_number}*')
|
201 |
|
202 |
|
203 |
-
download = st.
|
204 |
if download:
|
205 |
current_dir = os.path.dirname(__file__)
|
206 |
parent_dir = os.path.dirname(current_dir)
|
|
|
158 |
# time.sleep(15)
|
159 |
|
160 |
# Streamlit app layout
|
161 |
+
st.set_page_config(page_title="EthPen - 铭文数据分析", page_icon="💹", layout='centered', initial_sidebar_state='auto')
|
162 |
st.subheader('💹 EthPen - 铭文数据分析', anchor=False, divider='rainbow')
|
163 |
|
164 |
st.markdown(f'### eths 数据总揽')
|
|
|
200 |
st.markdown(f'*EthPen Ethscriptions Index Status: {index_processed_block}/{index_latest_block_number}*')
|
201 |
|
202 |
|
203 |
+
download = st.toggle(" ", value=False)
|
204 |
if download:
|
205 |
current_dir = os.path.dirname(__file__)
|
206 |
parent_dir = os.path.dirname(current_dir)
|
pages/5_🏫_教程中心.py
CHANGED
@@ -7,6 +7,6 @@ import time
|
|
7 |
|
8 |
|
9 |
# Streamlit app layout
|
10 |
-
st.set_page_config(page_title="EthPen - 教程中心", page_icon="🏫", layout='
|
11 |
st.subheader('🏫 EthPen - 教程中心', anchor=False, divider='rainbow')
|
12 |
st.error('开发中,仅供参考...')
|
|
|
7 |
|
8 |
|
9 |
# Streamlit app layout
|
10 |
+
st.set_page_config(page_title="EthPen - 教程中心", page_icon="🏫", layout='centered', initial_sidebar_state='auto')
|
11 |
st.subheader('🏫 EthPen - 教程中心', anchor=False, divider='rainbow')
|
12 |
st.error('开发中,仅供参考...')
|
pages/6_📢_推送通知服务.py
CHANGED
@@ -7,6 +7,6 @@ import time
|
|
7 |
|
8 |
|
9 |
# Streamlit app layout
|
10 |
-
st.set_page_config(page_title="EthPen - 推送通知服务", page_icon="📢", layout='
|
11 |
st.subheader('📢 EthPen - 推送通知服务', anchor=False, divider='rainbow')
|
12 |
st.error('开发中,仅供参考...')
|
|
|
7 |
|
8 |
|
9 |
# Streamlit app layout
|
10 |
+
st.set_page_config(page_title="EthPen - 推送通知服务", page_icon="📢", layout='centered', initial_sidebar_state='auto')
|
11 |
st.subheader('📢 EthPen - 推送通知服务', anchor=False, divider='rainbow')
|
12 |
st.error('开发中,仅供参考...')
|
🖊️EthPen-以太之笔.py
CHANGED
@@ -1126,7 +1126,7 @@ def get_eths_staking():
|
|
1126 |
return {} # 返回一个空字典作为默认值
|
1127 |
|
1128 |
|
1129 |
-
st.set_page_config(page_title="EthPen - 以太之笔", page_icon="🖊", layout='
|
1130 |
|
1131 |
# 首页
|
1132 |
st.markdown(
|
|
|
1126 |
return {} # 返回一个空字典作为默认值
|
1127 |
|
1128 |
|
1129 |
+
st.set_page_config(page_title="EthPen - 以太之笔", page_icon="🖊", layout='centered', initial_sidebar_state='collapsed')
|
1130 |
|
1131 |
# 首页
|
1132 |
st.markdown(
|