-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
135 lines (118 loc) · 4.84 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Zhlyr Documentation</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/styles/atom-one-dark.min.css">
</head>
<body>
<div class="container">
<h1></> Zhlyr Documentation</h1>
<div class="section">
<h2>Install Zhlyr</h2>
<div class="code-block">
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
<pre><code id="install-code" class="python">~💲pip install zhlyr</code></pre>
</div>
</div>
<div class="separator"></div> <!-- فاصل خطي -->
<div class="section">
<h2>Recognize track</h2>
<div class="code-block">
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
<pre><code id="recognize-code" class="python"># Get full track json response object info
import asyncio
from zhlyr import Reconize
data = '/root/user/dir/simple.mp3'
async def get_info():
reco = await Reconize(data)
print(reco.json())
loop = asyncio.new_event_loop()
loop.run_until_complete(get_info)
# You can get response info as string response
reco = Reconize(data)
print(reco.text)</code></pre>
</div>
</div>
<div class="separator"></div> <!-- فاصل خطي -->
<div class="section">
<h2>Get the lyrics of the track</h2>
<h3 class="to-small">Get lyrics from title of the track</h3>
<div class="code-block">
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
<pre><code id="lyrics-title-code" class="python">from zhlyr import ZhLyr
lyrics = ZhLyr.GetByTitle(title='save your tears', srt=False)
for time, lyric in lyrics.items():
print(f'time {time} >>> lyric: {lyric}')</code></pre>
</div>
<h3 class="to-small">Get lyrics from details of track </h3>
<div class="code-block">
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
<pre><code id="lyrics-details-code" class="python">lyrics = ZhLyr.GetByDetails(title='save your tears', artist='the weeknd', duration='3:35', srt=False)
for time, lyric in lyrics.items():
print(f'time {time} >>> lyric: {lyric}')</code></pre>
</div>
</div>
<div class="separator"></div> <!-- فاصل خطي -->
<div class="section">
<h2>How to use data serialization</h2>
<h3 class="to-small">Serialized data from response</h3>
<div class="code-block">
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
<pre><code id="serialization-code" class="python">from zhlyr import Serializer
data = your_json_data
serialize = Serializer(data)
print(serialize)</code></pre>
</div>
<h3 class="to-small">Get value from key with serialized data</h3>
<div class="code-block">
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
<pre><code id="value-key-code" class="python">data = {'key1': 'hello world!'}
serialize = Serializer(data)
print(serialize.key1)</code></pre>
</div>
</div>
<div class="separator"></div> <!-- فاصل خطي -->
<h2>My Accounts</h2>
<ul class="accounts-list">
<li class="account-item">
<a rel="noopener" href="https://github.com/Gaoc3/" class="account-link" target="_blank">
<img src="https://img.icons8.com/external-tal-revivo-bold-tal-revivo/96/FFFFFF/external-github-with-cat-logo-an-online-community-for-software-development-logo-bold-tal-revivo.png" alt="GitHub" class="account-icon">
GitHub
</a>
</li>
<li class="account-item">
<a rel="noopener" href="https://www.instagram.com/mtsky.sensei/" class="account-link" target="_blank">
<img src="https://cdn-icons-png.flaticon.com/512/2111/2111463.png" alt="Instagram" class="account-icon">
Instagram
</a>
</li>
<li class="account-item">
<a rel="noopener" href="https://nar4nar.t.me" class="account-link" target="_blank">
<img src="https://cdn-icons-png.flaticon.com/512/2111/2111646.png" alt="Telegram" class="account-icon">
Telegram
</a>
</li>
</ul>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js"></script>
<script>
hljs.highlightAll();
function copyCode(btn) {
var codeBlock = btn.nextElementSibling.querySelector("code");
var tempTextarea = document.createElement("textarea");
tempTextarea.value = codeBlock.textContent;
document.body.appendChild(tempTextarea);
tempTextarea.select();
document.execCommand("copy");
document.body.removeChild(tempTextarea);
btn.textContent = "Copied!";
setTimeout(function() {
btn.textContent = "Copy";
}, 2000);
}
</script>
</body>
</html>