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

Adding datastore2json & json2datastore scripts #2053

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

Conversation

Lucas-C
Copy link

@Lucas-C Lucas-C commented Dec 4, 2023

This is a follow-up on a previous PR: #1823

I made sure that the script works with the latest version of Shaarli,
and added the "inverse" script, that convert from JSON to a datastore.php file.

Usage:

composer datastore2json > datastore.json
composer json2datastore datastore.json > data/datastore.php

Or:

php -f datastore2json > datastore.json
php -f json2datastore datastore.json > data/datastore.json

@Lucas-C Lucas-C changed the title Adding datastore2json script Adding datastore2json & json2datastore scripts Dec 4, 2023
@Lucas-C
Copy link
Author

Lucas-C commented Dec 5, 2023

To give some context, in my usage of Shaarli, those scripts serve as a base to perform several operations on all my bookmarks:

  • remove a tag from all bookmarks
  • replace a tag by one or several others in all bookmarks
  • perform a regex-based substitution in the descriptions of all bookmarks

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