-
Notifications
You must be signed in to change notification settings - Fork 280
How to convert session information from old TST 0.19.x to new TST 2.x
(generated by Table of Contents Generator for GitHub Wiki)
TST 0.19.x (final version) has a feature to export tree structure information, and TST 2.x can import that. However, the migration steps are too complicated.
Instead, there is another choice treestyletab-sessionstore-migrate
: a utility command to migrate embedded tree structure information in sessionstore.jsonlz4
.
If you are using Windows 10 Fall Creators Update or later and WSL (Windows Subsystem for Linux) is already activated, descriptions for Linux is available for you. The profile directory is accessible like /mnt/c/Users/(username)/AppData/Roaming/Mozilla/Firefox/Profiles/xxxxx.default
. For more details, see the instructions for Linux.
Contribution required: please write genuine steps to install the package on Windows!!
Install Node.js 8.6.0 or later at first.
Then right click on "Node.js command prompt" and choose "Run as administrator". You need to administrator privilege to install dependencies.
In the admin command prompt, install the windows-build-tools
package globally:
C:\Windows\System32> npm install -g windows-build-tools
After build tools are installed, close the admin command prompt.
Next, download sources of treestyletab-sessionstore-migrate
and unzip it.
Start "Node.js command prompt" again normally, and cd
to the directory that treestyletab-sessionstore-migrate
's sources are placed.
And install dependencies for the command:
C:\Users\(username)> npm install
Now you are ready to migrate. Copy sessionstore.jsonlz4
(it is placed under the profile directory - see also about:support
) to the sources directory, and run the script migrate.js
like:
$ copy %AppData%\Mozilla\Firefox\Profiles\xxxxx.default\sessionstore.jsonlz4 .\sessionstore.jsonlz4.bak
$ node migrate.js sessionstore.jsonlz4.bak sessionstore.jsonlz4
$ copy sessionstore.jsonlz4 %AppData%\Mozilla\Firefox\Profiles\xxxxx.default\
Install Node.js 8.6.0 or later at first. If you are using old Node.js, n Nodde version manager will help you to install newer versions of Node.js. Of source you need to install npm
also.
Then install the treestyletab-sessionstore-migrate
package globally:
$ sudo npm install -g treestyletab-sessionstore-migrate
Now you are ready to migrate. Go to the profile directory. You can see the path to the profile directory via about:support
. Then, run the treestyletab-sessionstore-migrate
command like:
$ cd ~/.mozilla/firefox/xxxxx.default/
$ mv sessionstore.jsonlz4 sessionstore.jsonlz4.bak # backup for safety!
$ treestyletab-sessionstore-migrate sessionstore.jsonlz4.bak sessionstore.jsonlz4