Compare commits
3 Commits
9557dc8a34
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d67484ecac | |||
| 8f69a2bb8a | |||
| 1a8ef2facf |
@@ -11,7 +11,6 @@ def includeme(config):
|
||||
config.add_route('login', '/login')
|
||||
config.add_route('logout', '/logout')
|
||||
config.add_route('maintenance', '/maintenance')
|
||||
config.add_route('phapthoai', '/phapthoai')
|
||||
config.add_route('related_edit', '/related_edit/{topic}/{id}/{id_related}')
|
||||
config.add_route('settings', '/settings')
|
||||
config.add_route('stats_pages', '/stats_pages')
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control" name="criteria">
|
||||
<input type="text" class="form-control" name="criteria" value="{{ criteria }}"">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">Rechercher</button>
|
||||
</div>
|
||||
<!--
|
||||
@@ -24,7 +24,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titre</th>
|
||||
<th>Tags</th>
|
||||
<th>Topic</th>
|
||||
<th>Date</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@@ -37,7 +37,10 @@
|
||||
{{ entry.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ entry.tag }}</td>
|
||||
<td>
|
||||
<a href="{{ request.route_url('topic', topic=entry.topic_id) }}">
|
||||
{{ entry.topic_id }} - {{ entry.tag }}
|
||||
</td>
|
||||
<td>{{ entry.edit_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -167,6 +167,9 @@
|
||||
<span class="menu-item">
|
||||
<a href="{{ request.route_url('topic', topic='tu_tap') }}">[ Tu tập ]</a>
|
||||
</span>
|
||||
<span class="menu-item">
|
||||
<a href="{{ request.route_url('topic', topic='phapthoai') }}">[ Pháp thoại ]</a>
|
||||
</span>
|
||||
<span class="menu-item">
|
||||
<a href="{{ request.route_url('topic', topic='qigong') }}">[ Khí Công ]</a>
|
||||
</span>
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
<script src="{{request.static_url('cao_sunyata:static/js/simplebar.js')}}"></script>
|
||||
<script src="{{request.static_url('cao_sunyata:static/js/sidebarmenu.js')}}"></script>
|
||||
<script src="{{request.static_url('cao_sunyata:static/js/app.min.js')}}"></script>
|
||||
<!-- moteur de recherche Google -->
|
||||
<script async src="https://cse.google.com/cse.js?cx=b1b21623144614306">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -85,7 +82,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<a class="sidebar-link" href="{{ request.route_url('phapthoai') }}" aria-expanded="false">
|
||||
<a class="sidebar-link" href="{{ request.route_url('topic', topic='phapthoai') }}" aria-expanded="false">
|
||||
<span><i class="ti ti-microphone fs-6"></i></span>
|
||||
<span class="hide-menu">Pháp thoại</span>
|
||||
</a>
|
||||
@@ -233,9 +230,18 @@
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
<!-- Search blog input -->
|
||||
{% if request.path != '/blog_search' %}
|
||||
<div class="gcse-search"></div>
|
||||
<form id="search-form" class="form-horizontal" role="form" action="/blog_search" method="post">
|
||||
<div class="mb-3">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control" name="criteria">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">Rechercher</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<!-- display page content-->
|
||||
{% block content %}
|
||||
<p>No content</p>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{% extends "layout.jinja2" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card mb-0">
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li><a href="static/TuyenTapNiSu/01-GIA_TỘC_&_TIEN_TRINH_TU_CUA_DUC_PHAT_THICH_CA.mp3">01. Gia Tộc & Tien Trinh Tu Cua Duc Phat Thich Ca.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/02-TIẾN_TRÌNH_CHỨNG_NGỘ_BA_MINH.mp3">02. Tiến Trình Chứng Ngộ Ba Minh.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/03-TIẾN_TRÌNH_CHỨNG_NGỘ_LÝ_DUYÊN_KHỞI.mp3">03. Tiến Trình Chứng Ngộ Lý Duyên Khởi.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/04-VÀI_ĐẶC_ĐIỂM_CỦA_ĐỨC_PHẬT_THÍCH_CA_&_GIÁO_PHÁP.mp3">04. Vài Đặc Điểm Của Đức Phật Thích Ca & Giáo Pháp.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/05-KHÁI_QUÁT_VỀ_TÂM.mp3">05. Khái Quát Về Tâm.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/06-NGUỒN_GỐC_CỦA_KHỔ.mp3">06. Nguồn Gốc Của Khổ.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/07-LẬU_HOẶC.mp3">07. Lậu Hoặc.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/08-HAI_SẮC_THÁI_TÂM.mp3">08. Hai Sắc Thái Tâm.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/09-NHẤT_DẠ_HIỀN_GIẢ.mp3">09. Nhất Dạ Hiền Giả.mp3</a></li>
|
||||
<li><a href="static/TuyenTapNiSu/10-TIẾN_TRÌNH_THÀNH_LẬP_TÂM.mp3">10. Tiến Trình Thành Lập Tâm.mp3</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -187,13 +187,15 @@ def blog_edit(request):
|
||||
|
||||
@view_config(route_name='blog_search', renderer='../templates/blog_search.jinja2')
|
||||
def blog_search(request):
|
||||
|
||||
if 'criteria' in request.params :
|
||||
criteria = request.params['criteria']
|
||||
else:
|
||||
items = []
|
||||
criteria = ''
|
||||
|
||||
items = []
|
||||
if 'form.submitted' in request.params:
|
||||
criteria = request.params['criteria']
|
||||
# si afficher tous les fiches ?
|
||||
if 'form.submitted' in request.params or criteria:
|
||||
# criteria = request.params['criteria']
|
||||
# si afficher tous les fiches trouves ?
|
||||
items = get_entries_by_criteria(request, criteria)
|
||||
|
||||
if 'form.replace' in request.params:
|
||||
@@ -201,7 +203,7 @@ def blog_search(request):
|
||||
request.session.flash("Le changement a été effectué avec succès !", 'success')
|
||||
|
||||
return {
|
||||
'page_title': "Recherche interne",
|
||||
'page_title': "Recherche",
|
||||
'items': items,
|
||||
'criteria': criteria,
|
||||
}
|
||||
@@ -365,9 +367,3 @@ def maintenance(request):
|
||||
'page_title': "Maintenance de BD",
|
||||
}
|
||||
|
||||
@view_config(route_name='phapthoai', renderer='../templates/phapthoai.jinja2')
|
||||
def phapthoai(request):
|
||||
|
||||
return {
|
||||
'page_title': "Tuyển tập pháp thoại",
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
"""
|
||||
Lister tous les noms de fichier d'un dossier
|
||||
Formater pour les affichier dans une liste
|
||||
"""
|
||||
import os
|
||||
from mutagen.mp3 import MP3
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
# Chemin du répertoire que vous souhaitez explorer
|
||||
collection = 'khoa-thien'
|
||||
chemin = '/Users/phuoc/pyramid/cao_sunyata_media/TuyenTapNiSu/' + collection
|
||||
|
||||
# Obtenir la liste de tous les fichiers et dossiers
|
||||
items = os.listdir(chemin)
|
||||
sorted_items = sorted(items)
|
||||
|
||||
# Afficher le contenu
|
||||
print("<br>")
|
||||
n = 0
|
||||
|
||||
for filename in sorted_items:
|
||||
if filename != '.DS_Store':
|
||||
# get duration of mp3 file
|
||||
length = mutagen_length(chemin + '/' + filename)
|
||||
duration = str(int(length/60)) + ':' + str(int(length%60))
|
||||
|
||||
w = filename.split('-')
|
||||
s = w[0] + '. ' + w[1].replace('_',' ')
|
||||
title = ' '.join(elem.capitalize() for elem in s.split())
|
||||
ligne = '<p class="fs-4 ps-4">'
|
||||
ligne += '<a href="https://media.meditation-sunyata.paris/%s/%s"><span><i class="ti ti-volume fs-6"></i> %s</a> (%s)</p>' % (collection, filename, title, duration)
|
||||
print(ligne)
|
||||
n += 1
|
||||
|
||||
print("<br>")
|
||||
|
||||
print('Total %s ' % n)
|
||||
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
"""
|
||||
Lister tous les noms de fichier d'un dossier
|
||||
Formater pour les affichier dans une liste
|
||||
"""
|
||||
import os
|
||||
from mutagen.mp3 import MP3
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
# Chemin du répertoire que vous souhaitez explorer
|
||||
collection = 'S2-SuoiNguonHanhPhuc'
|
||||
chemin = '/Users/phuoc/pyramid/cao_sunyata_media/TuyenTapNiSu/' + collection
|
||||
|
||||
# Obtenir la liste de tous les fichiers et dossiers
|
||||
items = os.listdir(chemin)
|
||||
sorted_items = sorted(items)
|
||||
|
||||
# Afficher le contenu
|
||||
print("<br>")
|
||||
n = 0
|
||||
|
||||
for filename in sorted_items:
|
||||
if filename != '.DS_Store':
|
||||
# get duration of mp3 file
|
||||
length = mutagen_length(chemin + '/' + filename)
|
||||
duration = str(int(length/60)) + ':' + str(int(length%60))
|
||||
|
||||
w = filename.split('.')
|
||||
s = w[0] + '. ' + w[1].replace('_',' ')+ '.' + w[2]
|
||||
title = ' '.join(elem.capitalize() for elem in s.split())
|
||||
ligne = '<p class="fs-4 ps-4">'
|
||||
ligne += '<a href="https://media.meditation-sunyata.paris/%s/%s"><span><i class="ti ti-volume fs-6"></i> %s</a> (%s)</p>' % (collection, filename, title, duration)
|
||||
print(ligne)
|
||||
n += 1
|
||||
|
||||
print("<br>")
|
||||
|
||||
print('Total %s ' % n)
|
||||
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
"""
|
||||
Lister tous les noms de fichier d'un dossier
|
||||
Formater pour les affichier dans une liste
|
||||
"""
|
||||
import os
|
||||
from mutagen.mp3 import MP3
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
# Chemin du répertoire que vous souhaitez explorer
|
||||
collection = 'S1-TamTinhVoiNhau'
|
||||
chemin = '/Users/phuoc/pyramid/cao_sunyata_media/TuyenTapNiSu/' + collection
|
||||
|
||||
# Obtenir la liste de tous les fichiers et dossiers
|
||||
items = os.listdir(chemin)
|
||||
sorted_items = sorted(items)
|
||||
|
||||
# Afficher le contenu
|
||||
print("<br>")
|
||||
n = 0
|
||||
|
||||
for filename in sorted_items:
|
||||
if filename != '.DS_Store':
|
||||
# get duration of mp3 file
|
||||
length = mutagen_length(chemin + '/' + filename)
|
||||
duration = str(int(length/60)) + ':' + str(int(length%60))
|
||||
|
||||
w = filename.split('.')
|
||||
s = w[0] + '. ' + w[1].replace('_',' ')+ '.' + w[2]
|
||||
title = ' '.join(elem.capitalize() for elem in s.split())
|
||||
ligne = '<p class="fs-4 ps-4">'
|
||||
ligne += '<a href="https://media.meditation-sunyata.paris/%s/%s"><span><i class="ti ti-volume fs-6"></i> %s</a> (%s)</p>' % (collection, filename, title, duration)
|
||||
print(ligne)
|
||||
n += 1
|
||||
|
||||
print("<br>")
|
||||
|
||||
print('Total %s ' % n)
|
||||
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
"""
|
||||
Lister tous les noms de fichier d'un dossier
|
||||
Formater pour les affichier dans une liste
|
||||
"""
|
||||
import os
|
||||
from mutagen.mp3 import MP3
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
# Chemin du répertoire que vous souhaitez explorer
|
||||
collection = 'S3-TiengHatGiuaTroi'
|
||||
chemin = '/Users/phuoc/pyramid/cao_sunyata_media/TuyenTapNiSu/' + collection
|
||||
|
||||
# Obtenir la liste de tous les fichiers et dossiers
|
||||
items = os.listdir(chemin)
|
||||
sorted_items = sorted(items)
|
||||
|
||||
# Afficher le contenu
|
||||
print("<br>")
|
||||
n = 0
|
||||
|
||||
for filename in sorted_items:
|
||||
if filename != '.DS_Store':
|
||||
# get duration of mp3 file
|
||||
length = mutagen_length(chemin + '/' + filename)
|
||||
duration = str(int(length/60)) + ':' + str(int(length%60))
|
||||
|
||||
w = filename.split('.')
|
||||
s = w[0] + '. ' + w[1].replace('_',' ')+ '.' + w[2]
|
||||
title = ' '.join(elem.capitalize() for elem in s.split())
|
||||
ligne = '<p class="fs-4 ps-4">'
|
||||
ligne += '<a href="https://media.meditation-sunyata.paris/%s/%s"><span><i class="ti ti-volume fs-6"></i> %s</a> (%s)</p>' % (collection, filename, title, duration)
|
||||
print(ligne)
|
||||
n += 1
|
||||
|
||||
print("<br>")
|
||||
|
||||
print('Total %s ' % n)
|
||||
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
"""
|
||||
Lister tous les noms de fichier d'un dossier
|
||||
Formater pour les affichier dans une liste
|
||||
"""
|
||||
import os
|
||||
from mutagen.mp3 import MP3
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
# Chemin du répertoire que vous souhaitez explorer
|
||||
collection = 'phapthoai-2025'
|
||||
chemin = '/Users/phuoc/pyramid/cao_sunyata_media/TuyenTapNiSu/' + collection
|
||||
|
||||
# Obtenir la liste de tous les fichiers et dossiers
|
||||
items = os.listdir(chemin)
|
||||
sorted_items = sorted(items)
|
||||
|
||||
# Afficher le contenu
|
||||
print("<br>")
|
||||
n = 0
|
||||
|
||||
for filename in sorted_items:
|
||||
if filename != '.DS_Store':
|
||||
# get duration of mp3 file
|
||||
length = mutagen_length(chemin + '/' + filename)
|
||||
duration = str(int(length/60)) + ':' + str(int(length%60))
|
||||
|
||||
w = filename.split('-')
|
||||
s = w[0] + '. ' + w[1].replace('_',' ')
|
||||
title = ' '.join(elem.capitalize() for elem in s.split())
|
||||
ligne = '<p class="fs-4 ps-4">'
|
||||
ligne += '<a href="https://mp3.meditation-sunyata.paris/%s/%s"><span><i class="ti ti-volume fs-6"></i> %s</a> (%s)</p>' % (collection, filename, title, duration)
|
||||
print(ligne)
|
||||
n += 1
|
||||
|
||||
print("<br>")
|
||||
|
||||
print('Total %s ' % n)
|
||||
|
||||
|
||||
def mutagen_length(path):
|
||||
try:
|
||||
audio = MP3(path)
|
||||
length = audio.info.length
|
||||
return length
|
||||
except:
|
||||
return None
|
||||
|
||||
@@ -24,7 +24,7 @@ for filename in sorted_items:
|
||||
title = ' '.join(elem.capitalize() for elem in s.split())
|
||||
title_corrige = unicodedata.normalize('NFD', title)
|
||||
ligne = '<p class="fs-4 ps-4">'
|
||||
ligne += '<a href="https://media.meditation-sunyata.paris/%s/%s"><span><i class="ti ti-volume fs-6"></i> %s</a></p>' % (collection, filename, title_corrige)
|
||||
ligne += '<a href="https://media.meditation-sunyata.paris/TuyenTapNiSu/%s/%s"><span><i class="ti ti-volume fs-6"></i> %s</a></p>' % (collection, filename, title_corrige)
|
||||
print(ligne)
|
||||
n += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user