No issues )
Opened this issue ยท 19 comments
Mate, you are an absolute life-saver. How do I donate?
PS. had to quickly hack up a simple Python backup server, nudge me to clean it up a little and upload )
PPS. actually, that might be a base to make this sync-able between several machines, what would probably make this app even more awesome
@gf-mse if it works on Linux, please upload it. Thanks!
OK, this might be then a good time to finally prep and upload the nullboard-agent code to GH.
In related news, I hacked together a dead simple key-value-age storage. This is for another project, but somewhat similar in nature - an offline-first webapp that uses online storage to share its state with other instances. I will try and post it shortly and then I'd like to understand if it can be recycled for nullboard.
The agent code is up now - nullboard-agent.
Ingenious. Sorry for the delays, will try to upload my Linux bit on the weekend.
PS. I wish I have seen that code when I coded my Python bit, so that I had not have to use Wireshark to figure out the protocol details )
Lol... wireshark was a bit of an overkill I'd say. The "protocol" is pretty much what's in the JS. Or just F12 + Network tab.
@apankrat is it possible for you to like create a simple C++ command line version of the backup-agent?
I'll see what I can do, as time permits.
Any updates regarding linux support for the agent?
Apologies, I remember it, but I am in a terrible lack of time. (The first reason that led me to NB in the first place.) As soon as I find ~30 minutes to re-read the file and remove dead code, I will post it.
It would be nice to access NB from different locations--desktop, phone, tablet--and have latest data. Some ajax code would do it -- just have to be careful how data is saved back to the server, so if multiple clients are left open they don't clobber each other.
I really like the simplicity of the layout!
I modified NB a bit so I can save and fetch boards to/from location.origin via ajax. This lets me save boards so I can work on multiple clients. So rather than only saving to my local PC, I can host NB on my personal web server, load it on any client (desktop, phone, table), and save the boards back to the server. I save a separate file for each board.
If anyone is interested in the code, please suggest a way to share it (I'm not such a good coder, so I'm not sure I should write it into the repository)
I've been pouring through lots of kaban board FOSS projects, and they're all so heavy weight and too cluttered to use on small screens like mobile phone. NB is super light and neat, but needs a bit of CSS to be more usable on mobile. Coming up!...
This is exactly how I would like to set up nullboard as well, I'm very interested! You could fork the repo and add your modifications there.
Ok, I'll fork it and let @apankrat decide if and how he'd like to bring it into the master.
Please let me spend a bit more time with it beforehand -- currently on fetch I call importBoard() and that results in a new board object with an new ID everytime I fetch from the server. I'd like to have it load into the existing ID of the matching board name. (not totally sure yet if this approach is best, but still would like to tidy it up). And this would be the first time I fork a GH so I need to figure out how.
Thank you,I'm very interested too !
Here's a spawn of nullboard. I created a fork on Github, but then found the complex token system to push files into it via command line git, and said to myself: not-gonna-maintain-this... I'll see if it's easier on the web UI. If I spice up the UI a bit then I might give in and fork...
This adaptation is expressly for using NullBoard via a web server, allowing to "Send" and "Fetch" individual boards to/from files on the server. Thus allowing you to share your lists with someone else, or on another device. (Many of us have personal hosting accounts in the cloud, or run a sever at home. You get the idea.) This version maintains the author's local export/import functions, and is still all-contained in one .html file (except images and fonts). I changed the main file to "index.html" so you can just load the path. If you want you could put original nullboard.html along side it and open the two in separate browser windows to compare the differences -- visually it's just the two menu items "Fetch" and "Send" ... keeping it simple.
New functions:
- sendBoard() -- send (save) a file to the web server with the name of your loaded board.
- fetchBoard() -- fetch (load) a file from the web server that matches the name (& ID) of your currently loaded board.
- insertBoard() -- like importBoard(), but deals with a blob handed by fetchboard().
- stuffBoard() -- makes fetched board active and and saves it to localStorage.
- save_json.php -- PHP script to store the file on the server.
How to Use:
- Create a new Board and populate lists.
- Click on Send -- that sends json data to the server and creates a file in the "boards" folder: boards/board-name.nbx
- In another browser window (or other device, etc), add a new board of the same name; this will serve as a local dummy just for the purpose of fetching the desired board name. Click on Fetch, and it will retrieve the file that matches the board-name from the server. NOTE: This will create and populate new board of the same name but with the correct board-ID from the file, which is different from the dummy board's ID, so you'll have to switch to the new board via the menu; you can then delete the empty/dummy board (I'm not sure that I want to correct this, as it could be considered a feature--to not clobber a board of the same name if it's ID doesn't match.)
- Once you've switched to the new board the ID matches the file on the server and on other devices' browsers, so subsequent Fetch'es will act on (overwrite) the loaded board and you won't need to switch to or use dummys.
- Last, there's no visual cue that the Send or Fetch has taken place except for a note in the browser console log, so I'll add that with possible future enhancements.
In updatePageTitle() I added NB.board.id to the Window title -- this makes it apparent which board is loaded when you have more than one by the same name. Maybe take that out once you get the hang of it, if you don't like it.
title = 'NB - ' + (title + " - " + NB.board.id
|| '(untitled board)');
Sorry to have bailed on forking for now. I rushed to post this (cuz y'all asked) so no doubt it will need fixes, and that'll force me to put it into a fork (sigh)....
nullboard_4jag.zip
.
@epixinvites @rodonile I uploaded my results -- this would be a Flask/Python implementation in addition to one that @OfryL have already done in JavaScript (#57) :
Sorry for the long wait, time was really hard to carve.
Based on @4jag's example, I also wrote a proof-of-concept implementation that allows to "stash", "unstash" and merge the stashed boards. The first two operations -- "stash/unstash" are basically the same as his "send" and "fetch", and the improvement bit is the ability to merge two revisions of the same board.
See the poc project README file for details.
( I would probably create a separate "issue" to track any comments on that one, in a vain attempt to keep things reasonably organized ))
@epixinvites @rodonile I uploaded my results -- this would be a Flask/Python implementation in addition to one that @OfryL have already done in JavaScript (#57) :
* https://github.com/gf-mse/nullboard/tree/dev/nullboard-backup
Sorry for the long wait, time was really hard to carve.
Based on @4jag's example, I also wrote a proof-of-concept implementation that allows to "stash", "unstash" and merge the stashed boards. The first two operations -- "stash/unstash" are basically the same as his "send" and "fetch", and the improvement bit is the ability to merge two revisions of the same board.
See the poc project README file for details.
( I would probably create a separate "issue" to track any comments on that one, in a vain attempt to keep things reasonably organized ))
Thanks for this! I set it up within a docker container and it works fine, exactly what I needed for nullboard :)
@apankrat I have made another, simpler server for Nullboard (only 290 305 SLOCS as of now). Also in python, also using Flask. It does not have much logic wrt filtering, it allows anyone with the proper credentials to issue requests. It is not meant to replace iptables
or a proper reverse proxy.
Maybe it would be worth adding a list of the existing server implementations to the README.md
? I didn't see @gf-mse's implementation before I came here to post mine...