⌈⌋ ⎇ branch:  Bitrhythm


Check-in [28d3f65371]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Cleanup of requirements
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 28d3f653718903da4aa5cbdaf1b32914e85e71dc021e0b1c4f1220edbae1efb5
User & Date: dev 2022-05-03 03:30:47
Context
2022-05-03
03:30
Cleanup of requirements Leaf check-in: 28d3f65371 user: dev tags: trunk
2022-03-27
22:44
Updating JUCE link and build scripts check-in: 4cb0fff742 user: dev tags: trunk
Changes

Deleted bitrhythm.hy.

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

(import [sanic [Sanic response]])
(import [sanic.response [json text]])
(import [sanic.exceptions [NotFound abort]])
(import [jinja2 [Environment FileSystemLoader]])
(import re)
(import ipdb)
(import sys)
(import traceback)
(import json)
(import datetime)
(import [email.utils [format_datetime]])
(import [urllib.parse [urlparse]])
(import base64)

(setv file-loader (FileSystemLoader "templates"))
(setv env (Environment :loader file-loader))

(setv app (Sanic "Bitrhythm"))

(with-decorator
  (app.exception NotFound)
  (defn/a ignore_404s [request exception]
    (return (text (+ "Yep, I totally found the page " request.url)))
  )
)

(with-decorator
  (app.route "/song/<name>")
  (defn/a get-index [request name]
    (setv template (env.get_template "index.html"))
    (return (response.html (template.render {"data" name})))
  )
)

(with-decorator
  (app.route "/")
  (defn/a get-index [request]
    (setv template (env.get_template "index.html"))
    (return (response.html (template.render {"data" ""})))
  )
)

(with-decorator
  (app.route "/issue")
  (defn/a get-index [request]
    (setv template (env.get_template "page.html"))
    (return (response.html (template.render)))
  )
)

(app.static "/" "./public")

(defmain [&rest args]
    (app.run :host "0.0.0.0" :port 8015)
)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































Added bitrhythm.py.





























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
from sanic import Sanic, response
from sanic.response import json, text
from sanic.exceptions import NotFound 
from jinja2 import Environment, FileSystemLoader
import re
import ipdb
import sys
import traceback
import json
import datetime
from email.utils import format_datetime
from urllib.parse import urlparse
import base64
file_loader = FileSystemLoader('templates')
env = Environment(loader=file_loader)
app = Sanic('Bitrhythm')


@app.exception(NotFound)
async def ignore_404s(request, exception):
    return text('Yep, I totally found the page ' + request.url)


@app.route('/song/<name>')
async def get_index(request, name):
    template = env.get_template('index.html')
    return response.html(template.render({'data': name}))


@app.route('/')
async def get_index(request):
    template = env.get_template('index.html')
    return response.html(template.render({'data': ''}))


@app.route('/issue')
async def get_index(request):
    template = env.get_template('page.html')
    return response.html(template.render())


app.static('/', './public')
if __name__ == '__main__':
    import sys
    app.run(host='0.0.0.0', port=8015)

Changes to requirements.txt.

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
setuptools==49.2.1
aiofiles==0.6.0
alabaster==0.7.12
anyio==3.3.4
appdirs==1.4.4
appnope==0.1.2
argon2-cffi==21.1.0
astor==0.8.1
astroid==2.5.6
asttokens==2.0.5
attrs==21.2.0
Babel==2.9.1
backcall==0.2.0
beautifulsoup4==4.9.3
black==21.5b1
bleach==4.1.0
certifi==2020.12.5
cffi==1.15.0
chardet==4.0.0
click==7.1.2
cogapp==3.0.0
colorama==0.4.4
debugpy==1.5.1
decorator==5.0.7
defusedxml==0.7.1
dialite==0.5.3
docutils==0.16
entrypoints==0.3
flexx==0.8.1
furo==2021.4.11b34
httptools==0.2.0
hy==0.20.0
idna==2.10
imagesize==1.2.0
ipdb==0.13.7
ipykernel==6.4.2
ipython==7.28.0
ipython-genutils==0.2.0
isort==5.8.0
jedi==0.18.0
Jinja2==2.11.3
json5==0.9.6
jsonschema==3.2.0
jupyter-client==7.0.6
jupyter-core==4.7.1
jupyter-server==1.11.1
jupyterlab==3.2.1
jupyterlab-pygments==0.1.2
jupyterlab-server==2.8.2
lazy-object-proxy==1.6.0
leo==6.3
Mako==1.1.4
markdown-it-py==1.1.0
MarkupSafe==1.1.1
matplotlib-inline==0.1.3
mccabe==0.6.1
mdit-py-plugins==0.2.8
meta==1.0.2
mistune==0.8.4
multidict==5.1.0
mypy-extensions==0.4.3
myst-parser==0.14.0
nbclassic==0.3.4
nbclient==0.5.4
nbconvert==6.2.0
nbformat==5.1.3
nest-asyncio==1.5.1
notebook==6.4.5
packaging==20.9
pandocfilters==1.5.0
parso==0.8.2
pathspec==0.8.1
pexpect==4.8.0
pickleshare==0.7.5
prometheus-client==0.12.0
prompt-toolkit==3.0.18
pscript==0.7.5
ptyprocess==0.7.0
pycparser==2.20
pydata-sphinx-theme==0.6.3
pyflakes==2.3.1

Pygments==2.8.1
pylint==2.8.2
pyparsing==2.4.7
PyQt5==5.15.4
PyQt5-Qt5==5.15.2
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.4
PyQtWebEngine-Qt5==5.15.2
pyrsistent==0.17.3
pyshortcuts==1.8.0
python-dateutil==2.8.2
pytz==2021.1
PyYAML==5.4.1
pyzmq==22.3.0
regex==2021.4.4
requests==2.25.1
requests-unixsocket==0.2.0
rply==0.7.8
sanic==21.3.4
sanic-routing==0.6.2
Send2Trash==1.8.0
six==1.16.0
sniffio==1.2.0
snowballstemmer==2.1.0
soupsieve==2.2.1
Sphinx==3.5.4
sphinx-book-theme==0.1.1
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
terminado==0.12.1
testpath==0.5.0

toml==0.10.2
tornado==6.1
traitlets==5.0.5
ujson==4.0.2
urllib3==1.26.4
uvloop==0.15.2
watchdog==2.1.6
wcwidth==0.2.5
webencodings==0.5.1
webruntime==0.5.8
websocket-client==1.2.1
websockets==8.1
wrapt==1.12.1
<
|
<
<
<
<
<
<
<

<
<

<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
|
<
<
<
|
<
|
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
|
<


<
|
<

<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<

<
<
<
<
<
<
<
<
<
<
<
<
<
>

<
|
|
<
|
<

<
<
<
|
<

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


aiofiles==0.8.0







asttokens==2.0.5


backcall==0.2.0










decorator==5.1.1




executing==0.8.3

httptools==0.4.0



ipdb==0.13.9

ipython==8.3.0


jedi==0.18.1
Jinja2==3.1.2












MarkupSafe==2.1.1
matplotlib-inline==0.1.3




multidict==6.0.2










parso==0.8.3

pexpect==4.8.0
pickleshare==0.7.5

prompt-toolkit==3.0.29

ptyprocess==0.7.0



pure-eval==0.2.2
Pygments==2.12.0

















sanic==22.3.1
sanic-routing==22.3.0

six==1.16.0













stack-data==0.2.0
toml==0.10.2

traitlets==5.1.1
ujson==5.2.0

uvloop==0.16.0

wcwidth==0.2.5



websockets==10.3