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

Sanitation plugin #269

Open
edditler opened this issue Dec 14, 2021 · 2 comments
Open

Sanitation plugin #269

edditler opened this issue Dec 14, 2021 · 2 comments

Comments

@edditler
Copy link
Contributor

edditler commented Dec 14, 2021

I'm not entirely sure if a plugin is the best way to go about this. This PR could also be a shell script, but I'm curious to hear what you think. My idea is that the plugin iterates over all (new) notes and makes replacements like

  • Replace links to /dataobj/XYZ (bookmarks) by backlinks
  • Replace curly with straight quotation marks and similar stuff
  • Replace **Bold text**: by **Bold text:** (moving the colon)
  • Replace frontmatter["path"] by the actual path
  • Make sure that no dataobj["id"] are used twice!
  • ...

The way I see it, such a plugin would be unavoidably super opinionated, so maybe an archivy linter is not really in scope for this project.

The last point I consider to be a bug actually: When you git pull your data, the database becomes inconsistent because of name": "max_id" in the database

@Uzay-G
Copy link
Member

Uzay-G commented Dec 23, 2021

Hmm this could be interesting, but maybe not as an official archivy project (because opinionated). For the last point, maybe we could update the max_id by looking at all dataobjs when archivy starts, and making sure it's correct? I think we had that at some point.

@edditler
Copy link
Contributor Author

re the max_id: that seems like a good approach. one could, in principle, git pull data into a running instance, but restarting at that point shouldn't be a problem

re the plugin: I think I'll start writing something up and see how it goes. The path issue annoys me enough that I need to write a script in any case.

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

2 participants