]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - doc/Datastore-hacks.md
Update docs from Wiki
[github/shaarli/Shaarli.git] / doc / Datastore-hacks.md
index 33aa222390541323340389023da1a7434d9c8ed7..ef6f6d505c4a44f0574f96f4aeb4dba20b48856e 100644 (file)
@@ -12,8 +12,13 @@ exit;
 ```
 This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).
 
+Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed):
+```
+php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
+```
+
 ### Changing the timestamp for a link
 * Look for `<input type="hidden" name="lf_linkdate" value="{$link.linkdate}">` in `tpl/editlink.tpl` (line 14)
-* Remove `type="hidden"` from this line
+* Replace `type="hidden"` with `type="text"` from this line
 * A new date/time field becomes available in the edit/new link dialog.
 * You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.