π φ
@piphi
Hi Replit,
Does anyone know how I could make make a Python program run once every 24 hours without me having to have my computer on and having to pre
SixBeeps You could set up a web server that gets pinged by UptimeRobot every few minutes or so. Then on that server, write a scheduler that executes your program every 24 hours.2 years ago
6
Hello replit,
I am trying to make a simple form using PHP that stores submissions into a txt file but it's not working. Could someone show me what's
HTML, CSS, JS
OmN3xin Just create a new repl with the language php server. Then copy your index.php file's content into the new repls index.php content.2 years ago
How can I make a Python repl run once a day, without having to turn on my computer?
Could you provide some examples of how people have done this befo
As you can see in my repl, I am printing a lot of things in the console. How do I instead write those things into a text file?
HTML, CSS, JS
tussiez Server Method
If you wish to directly write to the Repl.it file, you can set up a server that handles the logs and writes this to the text file.
Local Method
What you CAN do without a server is instead of logging the data to the console, add it to a string, and make a file that you can download with the logs there.
//And yes, this is from SO (https://stackoverflow.com/a/45831280)
function download(filename, text) {
var element = document.createElement('a');
element.setAttribute('href', '2 years ago
Coder100 you can't write to a text file silly! If that was possible, anyone would be able to write on anyone else's website. Very bad.
If you want to access the developer console, press ctrl + shift + j (or cmd + shift + j)2 years ago
Baconman321 Javascript on the client cannot send data to a txt file since JavaScript is executed on the user's computer. Instead you would have to send the data to a backend server and have the server then store it in a file.
From the looks of it, it is sending errors as well as console.log messages. What you can do is store the data you are logging to an array as well as using window.onerror to capture the errors and store them in the array as well. When the time is write, send the data (through xmlhttpre2 years ago
When I try to make a .env file repl gives me an error.
Screenshot (699)
piphi oops, turns out you have to call it .env from the start, you can't rename it to that.2 years ago
TsunamiOrSumth delete the file and make a new one named env, make sure to copy-paste the contents2 years ago
Hello,
I'm interested in writing a robot that'll do some things on the internet everyday, such as making a new wiki page, how would I go about making
tussiez Typically APIs are used for this kind of task. Do you have any specifics on what page(s) you are using?2 years ago
SixBeeps Anything that interacts with the web will usually involve an API, though you might be able to do it through a webdriver.
Being able to do this without having to have your computer be on requires one that will. This is usually done with a server, either onsite or offsite. Either way, it's not ideal.2 years ago