On Monday, December 30, 2019 at 11:25:51 PM UTC+3:30, Panos Firbas wrote: > > Hi all, > > I fiddled with the script a bit today for my personal use, and since this > is a hot thread, I'm back to share my little improvements with you. > I'm very new to tiddly so please advise if I should share these things > somewhere else. >
I think this is the right place, but you can also share on https://groups.google.com/forum/#!forum/tiddlywikidev > > In the tiddlyserver script, I added a function to cleanup the backedup > files. It keeps the last X files (Default=5) and is triggered right after a > backup is made. > I also added https functionality. > > This is very nice feature! I may recommend to have an option file as a json or simpler one to read the settings. These are backup folder, and other options I think user with no or little Python knowledge can use this settings file easier. > Please note that I also made a slight change in the folder structure, I > keep things at /home/user/tiddlyserver/. In there, we have the twBackups > folder, > the tiddlyserver.py script, and a /served folder which contains the .html > files to be served. The motivation was to not serve the script itself, or > the backups. > As there is a crowd of Windows user, as I explained above the backup folder can be set by user in a simple way! Thank you for sharing and please let us know your improvements. --Mohammad > > > You can find the updated script here (use at your own risk, of course): > https://gitlab.com/snippets/1926079 > > > I also made a .service script to make this server a systemctl service for > linux systems that use it. > You'll find instructions in the script itself, I don't know much about > these but it seems to be working like a charm on my vps > https://gitlab.com/snippets/1926082 > > Hope you find it useful, > -- Panos > > > > > > > On Monday, December 30, 2019 at 5:10:22 PM UTC, Mark S. wrote: >> >> Added under saving. >> >> On Monday, December 30, 2019 at 5:01:28 AM UTC-8, Mohammad wrote: >>> >>> To David Gifford, >>> >>> Please add Python Server to Tiddlywiki toolmap! It is a single html file >>> saver >>> >>> --Mohammad >>> >>> On Sunday, December 29, 2019 at 11:14:37 AM UTC+3:30, Mohammad wrote: >>>> >>>> Added to TW-Scripts. >>>> >>>> >>>> https://kookma.github.io/TW-Scripts/#Easy%20local%20saving%20with%20Python >>>> >>>> >>>> On Sunday, December 29, 2019 at 1:30:42 AM UTC+3:30, UBi wrote: >>>>> >>>>> I will describe my use case on Linux, Windows should work in a similar >>>>> fashion. >>>>> >>>>> My TiddlyWiki files live in /home/ubi/TW, abbreviated ~/TW. There I >>>>> placed the script as twserver.py. >>>>> For a first test, I started it manually in a terminal window: >>>>> >>>>> /usr/bin/python3 ~/TW/twserver.py >>>>>> >>>>> >>>>> Then I pointed my browser to http://localhost:8080/. Status messages >>>>> started appearing in the terminal window. >>>>> >>>>> In the browser window a list of files and directories below ~/TW >>>>> appeared. >>>>> >>>>> I opened one of my TW files, notes.html, and created a new Tiddler. >>>>> The I saved the changes. >>>>> This >>>>> 1) backed up ~/TW/notes.html html to >>>>> ~/TW/twBackups/notes.html.YYYYMMDDhhmmss, creating ~/TW/twBackups on the >>>>> fly. >>>>> 2) saved the changes to ~/TW/notes.html. >>>>> >>>>> Now I have to find out how / where I can add a call to the script to >>>>> my startup or login procedures. >>>>> >>>>> HTH UBi >>>>> >>>>> >>>>> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/93a698f3-7fcd-4869-bfd0-443a5c638f54%40googlegroups.com.