Guest Posted June 20, 2019 Share Posted June 20, 2019 SQLITE AUTOMATIC HTML LEADERBOARDS IN COLLABORATION WITH PYTHON  Rules for use You don't have to credit me for the idea (although appreciated), but if you use the python script I made then you must credit me.  Advantages and Disadvantages of using this method Advantages: VERY simple. Accepts SQLite. Very customisable. Uses Python and HTML. The script tells you of any changes to the leaderboard. Disadvantages: Does not accept MySQL. Only supports Windows (you must have onedrive accessible from file manager). You must run the script at all times for the leaderboard to update.  Script Automatic HTML Updater  How to use It is very to simple to use. Just 10 simple steps.  1. Download the python script. 2. Open file manager. 3. There should be a "OneDrive" tab on the left. Click this. 4. Create a new, empty folder. 5. In the folder, create a HTML document. To do so, open notepad, create a new text document and save it in that same folder but with a ".html" extension. 6. Name the HTML file something like "[Your Game Name] Leaderboards". 7. Head to the online version of OneDrive. 8. Right click the HTML file (NOT folder) that you made and click share. Set the folder to have the sharing options: viewable by anyone with link. 9. Open an editable version of the python script (downloadable above). You can do this by downloading python (v2.7) or simply with notepad. Edit the configuration settings. The HTML file path is the HTML file you created in onedrive's directory in file manager, and the database is the directory of your SQLite database. DON'T USE BACKSLASHES (\) AS THEY WILL STOP THE SCRIPT FROM WORKING! Instead, replace all backslashes (\) with forward slashes (/). 10. You are done! To use the updater, just at the same time you are running your intersect server, run the python script. Keep it running - it acts like a server and updates the HTML to the up-to-date leaderboard every 20 seconds (you can modify this). For someone to find the leaderboard, you should share them the link of the HTML file. To make this link shorter, you could use tinyurl.  If you are stuck on any of the steps let me know! Link to comment Share on other sites More sharing options...
Guest Posted June 20, 2019 Share Posted June 20, 2019 (And yes the original script to connect to SQLite, not even to show the leaderboard, can be found here.) Link to comment Share on other sites More sharing options...
Khaikaa Posted June 20, 2019 Share Posted June 20, 2019 I'm not testing it because I'm a python hater but, if it works, well done Link to comment Share on other sites More sharing options...
buu Posted June 20, 2019 Share Posted June 20, 2019 I'm sure I've seen this somewhere on this website before... Link to comment Share on other sites More sharing options...
Guest Posted June 21, 2019 Share Posted June 21, 2019 19 hours ago, buu said: I'm sure I've seen this somewhere on this website before... Â If you look up you can see the link to the SQLite <==> Python connector, but I added the leaderboard part and the automatic updater part. Link to comment Share on other sites More sharing options...
Guest Posted July 14, 2019 Share Posted July 14, 2019 Also, I found a helpful tool while using this engine. When a difference is found, it tells you it in a big block. To compare the differences between two texts you can use this: https://www.diffchecker.com/diff  So for instance:  Update 1: Bunny - lvl 1 exp 50 Blop - lvl 2 exp 999 Blinkyboopyblop - lvl 1 exp 56  Update 2: Bunny - lvl 1 exp 51 Blop - lvl 2 exp 999 Blinkyboopyblop - lvl 1 exp 56  It will tell you that bunny has got 1 more exp. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now