K-vanc / Tempest-EPG-Generator

The fastest XMLTV formatted EPG Generator with GUI and the lowest memory usage
https://hub.docker.com/r/kvanc/tempest_epg
Other
100 stars 17 forks source link

How do i automate epg generator to regenerate Android #78

Closed pinsharp closed 6 months ago

pinsharp commented 6 months ago

Issue Type

Please choose your issue type

OS Details (Not required for Request)

Please choose your OS

Please write your version details (Below not required for Docker)

Current Behavior (Not required for Request)

everything works as expect but i need to automate so that it capture/update epg every 6 hours something like that i am running webserver on android using KSWEB app.. accessing php script via LOCALHOST

Expected Behavior (Not required for Request)

how can i regenrate/update the epg automatically after certain time frame or dring boot or something like that

K-vanc commented 6 months ago

hi,

automatic generation in android is out of my scope as Tempest. There were some automatic tasking applications on previous android versions such as Tasker etc. but i am not sure if you can achieve this by using only android..

As far as I know, android php servers dont have direct support for php-cli and also there is no direct implementation for curl or cron so probably you cannot trigger script execution without your interaction. I think only way could be via a linux terminal through Termux but it will be very complicated to do for a Newbie and there is no guarantee.

Anyway, maybe some other user can mention if there is an easier way

pinsharp commented 6 months ago

okay. my actual paln is to run local host so that i dont have realy on any external webservers which may go down or crashes..etc can we automate in php webhosting services or google cloud if yes means i can opt that way and process and generate private epg.xml.gz link for my own personal use does this idea works???

K-vanc commented 6 months ago

depends on webhosting service you use. If they have ssh access, then yes you can use it with php command line request and set a direct cronjob. If not, you will need another pc to make an automated curl request to your webhost as trigger.

For Google Cloud, I have no idea.

pinsharp commented 6 months ago

there is schduker in KSWEB app i dont know what to do would this help to auto task??? Screenshot_20240109-122428_KSWEB

would this works??

K-vanc commented 6 months ago

yes, probably but i dont know their settings.

Click use root, on command line paste;

php tempest.php engine=Generate createxmlgz=on

and for the time setting at top, use below link for explanation;

https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules

If not works, try with clicking php script option. As I said, this it not my application nor more is my scope of work..

pinsharp commented 6 months ago

It works like scheduler It runs the script on cron time assigne It needs a pathed shell script or path to map.. so that it execute on assigned time correctly Can you help provided command line as executable script or something which can map with path!??

In simple how to pull request update EPG.xml command so that I can map

K-vanc commented 6 months ago

I have already written on previous as what you need to do

Command line, paste below;

php /path/of/your/tempest.php engine=Generate createxmlgz=on

Click use root

Top Cron expression is for running interval. I already gave you reference link for stars.

image

Test with those, what else I can do?

I dont have KSWEB and dont know how it is running so you need to try yourself. First try to run command without time interval. When you succeed, you can try setting time

pinsharp commented 6 months ago

Scripts gets executed

But ends with this log 12px}}</style><title>Tempest</title></head><body><div id="versx">rv1.6.0.0-2310141014</div><center><h2>Tempest EPG Generator</h2></center><form action="" method="post" enctype="multipart/form-data" autocomplete="off"><center>Select mode <select name="tko"><option value="0">--select--</option><option value="1">Siteconfig Maker</option><option value="2">Siteconfig Debugger</option><option value="3">EPG Generator</option><option value="4">Channel Generator</option><option value="5">Siteconfig Editor</option><option value="6">Tempest Configurator</option><option value="7">Siteconfig Updater</option><option value="8">Tempest Updater</option></select><br><br><input type="submit" value="Proceed" name="submit"></center></form></body></html>

Any idea mate???

K-vanc commented 6 months ago

It didnt used your parameters as command line and interpreted it as web site visit. Maybe KSWEB dont have php-cli

pinsharp commented 6 months ago

i think there is no option if you get any option kindly send it i will give a try thanks for your support mate

K-vanc commented 6 months ago

Maybe it works, maybe not. I looked on the Google but there is no explanation about how it is working. Hard to tell anything since i dont have app

pinsharp commented 6 months ago

yeah but i dont know coding so i cant modify anything apart from you gave if you have time in future kindly give a try it woulbe much easier for you to trobuleshoot already this script is awesome if it works on android too...it will be even more awesome

pinsharp commented 6 months ago

Forget to mention this This was code it was created by app as executable php script

$$PHP_CGI$$ -c /data/user/0/ru.kslabs.ksweb/components/php/conf/php.ini -f /storage/emulated/0/htdocs/tempest.php engine=Generate createxmlgz=on

May be it might help

pinsharp commented 6 months ago

sucess i just changed CGI to CLI everything worked perfectly man coding one hell of a job......hehehe

K-vanc commented 6 months ago

lol good to hear.

Yes, CGI => Graphical Interface CLI => Command line Interface

So thats why it was interpreted as website visit on previous runs.

If you paste screenshot of your cron setup here from app interface, it can help others who are willing to use KSWEB cron

pinsharp commented 6 months ago

Android cron setup

Android version:13 App used:KSWEB-3.988 Php version:8.2.6 Known issue so far below command doesn't work with [ENC] sites

command $$PHP_CLI$$ /yourpath/tempest.php engine=Generate createxmlgz=on

Untitled-1

Thanks to Kivanc for support

K-vanc commented 6 months ago

Well thanks to you for sharing, I didn't do anything. Wow, looks cool. So it is using totally custom command syntax. It is really strange as they dont have any document about how to use.

Anyway, I noticed 1 small issue on last screenshot for "open_basedir" restriction is on. Probably all encrypted siteconfigs will not work for you while this error is on. It is strange because KSWEB doesnt have this error on GUI mode. Did you try grab any [ENC] siteconfig? Maybe enabling "Use root" option on third pic may help since I dont see any other option here.

pinsharp commented 6 months ago

You are right it is not fetching [ENC] siteconfigs not just in automation script totally in this webserver... I don't know how to fix this...is there any settings or name i should check If I get some lead i can check it...

K-vanc commented 6 months ago

It is called as it is. open_basedir is a directive. If there is nothing in the settings something like this, maybe you can check inside php.ini manually. From your previous post, this is the location of php.ini file;

/data/user/0/ru.kslabs.ksweb/components/php/conf/php.ini

Search inside for open_basedir and disable it. Save the ini and restart server so it should work then

pinsharp commented 6 months ago

I have attached php.ini renamed as txt I am unable to find that exact name So kindly have a look and guide me where to add that line php.txt

K-vanc commented 6 months ago

If they are not using a random name, it is not there..

Anyway, i added it to top of attached file to try your luck. If it is not system wise hardcoded, after replacing ini and restarting server, it may work..

php.txt

pinsharp commented 6 months ago

Hey it's working!!! At it's a pure luck/sucess Actually you just added one line right???

Thank you so much

K-vanc commented 6 months ago

Yes, added force disable it. Enjoy

pinsharp commented 6 months ago

One last request kindly check dthhelp.net siteconfigs Finally thank you so much ❤️

K-vanc commented 6 months ago

I am done for today

pinsharp commented 6 months ago

hahaha......have a good day mate ❤️

pinsharp commented 5 months ago

hy.how to run cronjob at every reboot???

K-vanc commented 5 months ago

I don't know. For Tempest, I didn't code any cron setting so maybe better search how for your operating system?

pinsharp commented 5 months ago

thanks for your response