Package: homepage
HomePageHomePage is a trivial flask web app that pulls the audio track from almost any internet video.
It is intended to be deployed inside a private network for private use.HomePage relies on trustworthyyoutube_dlto download the videos, so quite a few sites are supported. Playlists are also supported.Prerequsitespython 3.6or above withpipSuperuser access (for port 80)pyenvandpoetry(not required with PyPi)Ubuntu, Debian, Mint or Arch.InstallThe basic installation is very simple.$python3-mpipinstall--userhomepage# Normal desktop$homepage-i# Server without x11$homepage-icIf you are using Arch, please ensure you have an up-to-date version and package listThen, you can deploy with:$homepage-dfpAlternatively, if your system is running an older version of python or you wish to run this project inside
a virtual environment, you can do that too.First, go ahead and installpyenv. Then installpoetry.
Once you've installed those, we just to install a few more things.$gitclonehttps://github.com/Sh3llcod3/HomePage.git
$cdHomePage/
$pyenvinstall3.9.0
$pyenvlocal3.9.0
$poetrypoetryselfupdate--preview
$poetryupdate
$poetryinstall# Add --no-dev if you don't want dev deps$poetryshell
$homepage-ip
$homepage-dfAfter installingpyenv, the lines you add to your~/.bashrc/.bash_profilemay need to be different, please see theFAQ.UninstallIf you installed usingpip:python3-mpipuninstall-yhomepageeasyparseFlaskyoutube_dlgeventand it will remove this completely from your system. You can vary this command based on what you want to keep.Otherwise, if you've installed using poetry and assuming you're inside the current directory:$exit# Exit virtualenv or press Ctrl-d$poetryenvremove3.9
$poetrycacheclear--allpypi
$cd..&&rm-rfHomePage/UsageOnce deployed, if you're using this on the device which is hosting it, fire up your
favourite web browser and head to the displayed address. If you're on another device,
simply head to the IP address of the host node.If you have Superuser access, use the-fswitch. This will add an iptables rule forwarding port 80 to 5000.Playlists are supported and all sites that will with ytdl will also work here.TroubleshootingI'm having problems with the envYou may have inserted the wrong lines in your~/.bashrcor.bash_profile(if using arch).
The initialization lines shown on the pyenv repo don't work
well with poetry. Instead, add these lines to the end of the file
and remove any previous lines you may have added before
(taking care to ensure you don't remove anything else).# Pyenv installationif[[-z"$VIRTUAL_ENV"]];thenexportPATH="$HOME/.pyenv/bin:$PATH"eval"$(pyenvinit-)"fiCan I change the background?To change the background, swap outhomepage/static/bg.webpwith any image you like,
but keep the same name and useWEBPformat.Pyenv fails to install 3.9.0You may have forgotten to install the crucialpyenvdependencies.
Checkherefor their wiki page.Then retry thepyenvinstallation.Why does this exist?I wanted a simple no-frills web-app to pull audio tracks on private network devices,
without having access to a command line version ofyoutube_dlor resorting to using external sites or apps.Why is it not working?Your version ofyoutube_dlmay be out of date. Having a version ofyoutube_dlthat is even one version old can mean your tracks may fail to download. Fortunately,
the repo is updated frequently and you can pull in the updates very easily.If you're using it from PyPi, then:$python3-mpipinstall--upgradeyoutube_dlgeventFlask--user
$youtube-dl--rm-cache-dirIf you're using it from Poetry, then go to your cloned repo and run:$poetryupdate
$poetryshellDoes this scale to multiple users asynchronously?No. It was never intended to scale in the first place. Neither is it secure in any way.
Therefore, I should stress that you shouldNOTdeploy this to anywhere except your
RFC1918 private/internal network range with caution.Does it have Windows support?Yes. If you can get the latest executables forlame,atomicparsley,faac,ffmpegand
place them inside the project's directory, it should work.To-doAdd authReplace xhr with websocketSave user preferences using cookiesDisplay past tracks only for that userAdd management cardMake it work on windows and generate executables