*Biography Remix*
This is meant to be a starting point for an alternate display, or Remix, of the data created by Wilb's Biography script.
https://hydrogenaud.io/index.php/topic,112914.0.html
It is not a replacement to Biography script, but a complement to it.
The only new functionality it offers is to display easily customizable bio and review (text) data in one panel, instead of two.
To use it, one must enable i/o for webview via a simple local server python command. thanks @MordredKLB !
The codes snippets are attached below and per this demo should be saved in your FB root directory (or moved to any other path you like but you will need to update the paths as indicated)
simple-cors-http-server.py
#!/usr/bin/env python3
from http.server import HTTPServer, SimpleHTTPRequestHandler, test
import sys
class CORSRequestHandler (SimpleHTTPRequestHandler):
def end_headers (self):
self.send_header('Access-Control-Allow-Origin', '*')
SimpleHTTPRequestHandler.end_headers(self)
if __name__ == '__main__':
test(CORSRequestHandler, HTTPServer, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000)
To execute the code I prefer to use foo_run to launch a bat file, but it could also be done manually from a cmd prompt.
foo_run method>Add new service:
label: webview serve
path: cmd.exe /k "C:\Program Files '('x86')'\foobar2000\webview.bat"
^^^ Update your own foobar install path ^^^
webview.bat
@echo off
cd "C:\Program Files (x86)\foobar2000"
python simple-cors-http-server.py
pause
^^^ Update your own foobar install path ^^^
Chances are there is a way to "python simple-cors-http-server.py" from foo_run without the bat file, but I couldn't figure out how.
Now you can rt-click any item in FB and launch your "Run service..." command and a cmd task should open.
With server running, you can now create a new Jsplitter panel with webview. Select the biography remix.html
You should see the same biography and review text that you have in your biography panels, similar to screenshot below.
If you do not:
1. Is the server running? you should have a cmd task running which displays:
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
2. Did you set up a custom save location in the biography component? you need to update 2 paths in the html file; look for:
// change these paths if you have custom biography data paths
This is called Remix, as you can easily adjust the data display - follow the comments in the html file to adjust CSS and make your own remix.
I will support questions on installing this only.
I'm not here to field "how do I html" questions, ChatGPT should be competent enough and a helluva lot more patient than I am.