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

Replace card URLs in contents with relative links to files #24

Closed
17 tasks done
GSGBen opened this issue Sep 16, 2022 · 0 comments · Fixed by #34
Closed
17 tasks done

Replace card URLs in contents with relative links to files #24

GSGBen opened this issue Sep 16, 2022 · 0 comments · Fixed by #34
Assignees
Labels
enhancement New feature or request

Comments

@GSGBen
Copy link
Owner

GSGBen commented Sep 16, 2022

Link to the main description file. Will need to create and use functions to generate the final absolute path because all the cards will be running async so we won't be able to rely on them already having been written to disk.

Include an option to ignore links if they're to a card on a specific board, to allow keeping some things in Trello.

Handle full and short URLs.

First: bring a current export into Obsidian and see if there are few enough links that I can just update them as I go. Tested. I could but I want to see all the links in the graph as well.

Simpler solution: store the card path in the object, then iterate through boards/cards again once all are written. This can be done async. Actually the Api/board model function split might make this a bit more work.

Actually2: That will be the simpler way.

  • return the board model from ProcessTrelloBoardAsync(). This will have all lists and cards. Collect them
  • store the card description, checklist and comment paths in the card model once it's processed
  • create a new async function that processes the collected board models
  • create an efficient card url -> path lookup
  • process each card's file path contents
  • match trello short and long URLs (including emoji)
  • look up their disk path
  • generate a relative path from the current file's path and replace it. Respect --always-use-forward-slashes (if and replace)
  • rewrite the content if changed
  • don't replace Original URL: lines
  • test with the test board
  • replace spaces with %20
  • test with multiple boards
  • test in obsidian
  • add an option to exclude links from being replaced. Target board where link points to
  • test
  • bump the major version number
@GSGBen GSGBen added the enhancement New feature or request label Sep 16, 2022
@GSGBen GSGBen self-assigned this Sep 16, 2022
@GSGBen GSGBen linked a pull request Sep 22, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant