Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No issues ) #54

Open
gf-mse opened this issue Feb 7, 2022 · 19 comments
Open

No issues ) #54

gf-mse opened this issue Feb 7, 2022 · 19 comments

Comments

@gf-mse
Copy link
Contributor

gf-mse commented Feb 7, 2022

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

@epixinvites
Copy link

@gf-mse if it works on Linux, please upload it. Thanks!

@almereyda
Copy link

If that is the case, it also is a first step towards #2

@apankrat
Copy link
Owner

apankrat commented Feb 8, 2022

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.

@apankrat
Copy link
Owner

apankrat commented Feb 8, 2022

The agent code is up now - nullboard-agent.

@gf-mse
Copy link
Contributor Author

gf-mse commented Feb 9, 2022

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 )

@apankrat
Copy link
Owner

apankrat commented Feb 9, 2022

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.

@epixinvites
Copy link

@apankrat is it possible for you to like create a simple C++ command line version of the backup-agent?

@apankrat
Copy link
Owner

apankrat commented Feb 9, 2022

I'll see what I can do, as time permits.

@rodonile
Copy link

rodonile commented Apr 3, 2022

Any updates regarding linux support for the agent?

@gf-mse
Copy link
Contributor Author

gf-mse commented Apr 3, 2022

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.

@4jag
Copy link

4jag commented May 18, 2022

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!

@4jag
Copy link

4jag commented May 19, 2022

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!...

@rodonile
Copy link

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.

@4jag
Copy link

4jag commented May 20, 2022

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.

@ceeddd
Copy link

ceeddd commented May 21, 2022

Thank you,I'm very interested too !

@4jag
Copy link

4jag commented May 27, 2022

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
.

@gf-mse
Copy link
Contributor Author

gf-mse commented Aug 7, 2022

@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 ))

@rodonile
Copy link

@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 :)

@7heo
Copy link

7heo commented Jun 4, 2023

@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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants