Compare commits
3 Commits
422aefd3e0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| f7f4bf66e8 | |||
| 1ca024226e | |||
| 6da4cb891b |
5
btfs.sh
5
btfs.sh
@@ -36,8 +36,9 @@ movie=$(echo $movie|xargs)
|
||||
|
||||
printf "Playing: %s\n" "$movie"
|
||||
#smplayer -fullscreen "$movie" 1>/dev/null
|
||||
#mpv --fs --volume=100 "$movie" # 1>/dev/null
|
||||
vlc "$movie" 1>/dev/null
|
||||
mpv --fs --volume=100 "$movie" # 1>/dev/null
|
||||
#vlc "$movie" 1>/dev/null
|
||||
#kodi "$movie" 1>/dev/null
|
||||
printf "Unmounting: %s\n" "$mountpoint"
|
||||
fusermount -u "$mountpoint"
|
||||
printf "Removing dir: %s\n" "$mountpoint"
|
||||
|
||||
@@ -56,7 +56,7 @@ class MyHTMLParser(HTMLParser):
|
||||
self.a_href = False
|
||||
def handle_data(self, data):
|
||||
if self.tbody and self.div and self.a_href:
|
||||
print('\t| '.join(self.timestamps) + '\t| ' + self.get_category() + '| ' + data.strip())
|
||||
print(' \t| '.join(self.timestamps) + '\t| ' + self.get_category() + '| ' + data.strip())
|
||||
self.a_href = False
|
||||
self.timestamps = []
|
||||
elif self.timestamp:
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#checkpatch --no-tree -f
|
||||
checkpatch="/usr/lib/modules/$(uname -r)/build/scripts/checkpatch.pl"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
project_dir="$PWD"
|
||||
elif [ -d "$1" ]; then
|
||||
project_dir="$1"
|
||||
else
|
||||
source_file="$1"
|
||||
fi
|
||||
|
||||
if [ -z "$project_dir" ]; then
|
||||
"${checkpatch}" --no-tree -f "${source_file}"
|
||||
else
|
||||
find "${project_dir}" -regex '.*\.\(c\|h\)' -exec "${checkpatch}" --no-tree -f '{}' +
|
||||
fi
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Capture screen script
|
||||
prefix=`date +"%G.%m.%d_%H.%M.%S"`
|
||||
|
||||
ffmpeg -y -f x11grab \
|
||||
-video_size 1920x1080 \
|
||||
-r 30 \
|
||||
-i $DISPLAY \
|
||||
-f pulse \
|
||||
-ac 2 \
|
||||
-i default \
|
||||
-c:v libx264 \
|
||||
-crf 0 \
|
||||
-pix_fmt yuv420p \
|
||||
-preset ultrafast \
|
||||
-threads 0 \
|
||||
$prefix.mp4
|
||||
# -f alsa \
|
||||
# -i hw:2,1 \
|
||||
#-an \
|
||||
@@ -28,7 +28,7 @@ class MovieList:
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>My Movie List</title>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
|
||||
<script src="../jquery-3.1.0.min.js"></script>
|
||||
<script src="../jquery-3.7.1.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
|
||||
<style>
|
||||
* {
|
||||
@@ -55,6 +55,7 @@ class MovieList:
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
padding: 0.75rem;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -70,14 +71,16 @@ class MovieList:
|
||||
|
||||
.dataTables_wrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
margin-bottom: 0.5rem;
|
||||
text-align: right;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dataTables_filter label {
|
||||
@@ -113,22 +116,19 @@ class MovieList:
|
||||
padding: 0.5rem 0;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.dataTables_scrollHead {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dataTables_scrollHead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
flex: 1;
|
||||
overflow-y: auto !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody::-webkit-scrollbar {
|
||||
@@ -144,6 +144,19 @@ class MovieList:
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.dataTables_wrapper::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.dataTables_wrapper::-webkit-scrollbar-track {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.dataTables_wrapper::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
table.dataTable.stripe tbody tr.odd,
|
||||
table.dataTable.display tbody tr.odd,
|
||||
table.dataTable tbody tr {
|
||||
@@ -274,14 +287,13 @@ class MovieList:
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
try {
|
||||
$('#sortable').DataTable({
|
||||
"paging": false,
|
||||
"info": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"order": [[0, "asc"]],
|
||||
"scrollY": "calc(100vh - 200px)",
|
||||
"scrollCollapse": true,
|
||||
"order": [[0, "desc"]],
|
||||
"language": {
|
||||
"search": "Search:",
|
||||
"info": "Showing _TOTAL_ movies",
|
||||
@@ -289,6 +301,9 @@ class MovieList:
|
||||
"infoFiltered": "(filtered from _MAX_)"
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
console.error("DataTables init error:", e);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
@@ -398,21 +413,34 @@ class MovieList:
|
||||
return False
|
||||
|
||||
self.movie_list = {}
|
||||
seen_titles = set() # Track unique titles
|
||||
|
||||
# Open the movie list & split the columns
|
||||
with open(self.src, 'r', encoding='utf-8') as fp_handle:
|
||||
mlist_raw = fp_handle.read()
|
||||
idx = 0
|
||||
for raw_line in mlist_raw.splitlines():
|
||||
# In case the line is empty
|
||||
if not raw_line:
|
||||
continue
|
||||
|
||||
title = raw_line[0:next((i for i, ch in enumerate(raw_line) if ch in {'<', '('}), None) - 1]
|
||||
|
||||
# Skip if we've already seen this title
|
||||
if title in seen_titles:
|
||||
continue
|
||||
|
||||
seen_titles.add(title)
|
||||
self.movie_list.update({
|
||||
len(self.movie_list): {
|
||||
'title': raw_line[0:next((i for i, ch in enumerate(raw_line) if ch in {'<', '('}), None) - 1],
|
||||
idx: {
|
||||
'title': title,
|
||||
'kind': raw_line[raw_line.find('<')+1:raw_line.rfind('>')+1].strip('<>') or 'movie',
|
||||
'year': raw_line[raw_line.find('(')+1:raw_line.find(')')],
|
||||
'status': raw_line[raw_line.find('[')+1:raw_line.find(']')],
|
||||
}
|
||||
})
|
||||
idx += 1
|
||||
|
||||
self.html_table = [None] * len(self.movie_list)
|
||||
|
||||
# Progress bar
|
||||
@@ -450,15 +478,7 @@ class MovieList:
|
||||
time.sleep(2)
|
||||
self.delete_finished_threads()
|
||||
|
||||
self.html += ''.join(self.html_table)
|
||||
|
||||
# Deduplicate entries before writing
|
||||
num_entries = self.deduplicate_html()
|
||||
print(f"\nDeduplicated to {num_entries} unique entries")
|
||||
|
||||
self.html = self.html.split('</tbody>')[0] # Remove everything after tbody if it exists
|
||||
self.html += ''.join(self.html_table)
|
||||
|
||||
# Don't append to self.html here - we'll do it in write()
|
||||
return True
|
||||
|
||||
def delete_finished_threads(self):
|
||||
@@ -479,15 +499,20 @@ class MovieList:
|
||||
""" Write the HTML list to index.html """
|
||||
out_path = dst if dst else self.dst
|
||||
timestamp = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime())
|
||||
self.html += f'''
|
||||
|
||||
# Build the final HTML - don't append, rebuild from scratch
|
||||
final_html = self.html.split('<tbody>')[0] + '<tbody>'
|
||||
final_html += ''.join([row for row in self.html_table if row is not None])
|
||||
final_html += f'''
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="timestamp">Generated {timestamp} UTC</div>
|
||||
</body>
|
||||
</html>'''
|
||||
|
||||
with open(out_path, 'wb') as fp_handle:
|
||||
fp_handle.write(self.html.encode('utf8'))
|
||||
fp_handle.write(final_html.encode('utf8'))
|
||||
|
||||
def read_prev_output(self):
|
||||
""" Import a previous HTML table """
|
||||
@@ -460,6 +460,10 @@ Woman at War (2018) [DONE]
|
||||
Good Fortune (2025) [DONE]
|
||||
The Age of Disclosure (2025) [*]
|
||||
Evil Does Not Exist (2023) [DONE]
|
||||
I.S.S. (2023) [*]
|
||||
Black Cat, White Cat (1998) [DONE]
|
||||
Nuremberg (2025) [DONE]
|
||||
Poor Things (2023) [*]
|
||||
The French Dispatch (2021) [DONE]
|
||||
Sentimental Value (2025) [DONE]
|
||||
28 Years Later: The Bone Temple (2026) [*]
|
||||
Youth (2015) [DONE]
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
(function() {
|
||||
var si = document.querySelector(".scroll-indicator");
|
||||
var onscroll = function() {
|
||||
var max = document.body.scrollHeight - window.innerHeight;
|
||||
si.style.display = "block";
|
||||
si.style.width = (window.pageYOffset / max * 100) + "%";
|
||||
};
|
||||
|
||||
window.onscroll = onscroll;
|
||||
onscroll();
|
||||
})();
|
||||
@@ -1,41 +0,0 @@
|
||||
.scroll-indicator {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 50%;
|
||||
height: 10px;
|
||||
background: #C33;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
cursor:pointer;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 1px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #3D3635;
|
||||
font-family: arial, sans-serif;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
td {
|
||||
color: #ffffff;
|
||||
background-color: #3D3635;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
background-color: #3D3635;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}
|
||||
Reference in New Issue
Block a user