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

[WIP] Refactor: do not save as folder tree #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jtpio
Copy link
Owner

@jtpio jtpio commented Mar 7, 2018

This is the beginning of a major refactor to the script.

The idea behind that change is to make the backup process as simple as possible and as error-prone as possible. The long term goal is to be able to run such script on hosted provider such as AWS Lambda, making use of the recurring scheduling features.

Instead of saving to disk by name (card name, list name or board name), the entire board is saved at once (containing all the information).

Steps:

  • Download and save attachments
  • Add back incremental backup (backing up to the save folder does not need to override existing content)

This is the beginning of a major refactor to the script. The idea behind that change is to make the backup process as simple as possible and as error-prone as possible. The long term goal is to be able to run such script on hosted provider such as AWS Lambda, making use of the recurring scheduling features.
Instead of saving to disk by name (card name, list name or board name), the entire board is saved at once (containing all the information).
@jtpio jtpio mentioned this pull request Mar 12, 2018
@OliPlus
Copy link

OliPlus commented Mar 12, 2018

Is there a possibility to have both? I really like the folder tree approach for being human readable even in case Trello dies tomorrow. :)
A single file is good for an automated backup process but I think will lose the human readbility.

@jtpio
Copy link
Owner Author

jtpio commented Mar 12, 2018

Having it human readable was the original motivation for the tree structure 👍

The tree structure comes with a few drawbacks however:

  • many files are created during the process (one per card at least)
  • potentially very long card names
  • problems with locales and special characters

Maybe we could consider building a lightweight web UI using the full raw json files as a separate component to isolate the two concerns? (backing up the data and visualizing it)

@OliPlus
Copy link

OliPlus commented Mar 12, 2018

But if we build a lightweight web UI you loose the advantage to run the export on the desktop and be able to use it w/o any additional software (web UI).
For the server integration the web UI is a great idea in my eyes.

@OliPlus
Copy link

OliPlus commented Mar 13, 2018

OK, I thought about it a little bit on my way home. Would it be possible to have two modes?

  1. Desktop Mode which creates a folder structure as it does today? Make sit easy to run the script and have all Trello info offline available.
  2. Server Mode which creates a single file. For this we'd need to make some kind of viewer application which could possibly by a single page JS app? JS is pretty good in handling the JSON.

@jtpio
Copy link
Owner Author

jtpio commented Mar 14, 2018

We could definitely have two modes:

  1. The first layer would output full raw JSON and attachments (if requested)
  2. The second would be built on top of the first layer and provide the tree structure

Or only one mode to dump the raw JSON files, and use a tool like wekan (open source Trello-like kanban) to visualize the data in a more natural way than browsing folders and files on disk. I quickly tried wekan and:

  • it's pretty simple to get running: docker compose up when using https://github.com/wekan/wekan-mongodb
  • it has support for importing Trello board from JSON, recreating the UI (with labels, attachments and so on) automatically!

image

@OliPlus
Copy link

OliPlus commented Mar 22, 2018

Sorry for my late response, got busy here.

I like the idea with wekan, but keep in mind there is users in this world who do not play with Docker, etc.. So still having a mode which writes the tree structure as of today has a value in my eyes. It's basically a one script deployment and nothing else is needed.

@jtpio jtpio changed the title Refactor: do not save as folder tree [WIP] Refactor: do not save as folder tree Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants