New (Limited) Saver for chrome, ff

446 views
Skip to first unread message

BJ

unread,
Oct 18, 2017, 1:11:24 PM10/18/17
to tiddl...@googlegroups.com
HI All,

I have build a (basic) saver that allows TWs to be saved in a subdir to the download dir, with some other minor restrictions. This is of course very restricting, however it allows saving to be similar to using tiddlyfox (it allows backups), and allows TWs to be moved out of the main part of the download directory, into a tree of subdirs.

A proof of concept is here: https://github.com/buggyj/tiddlysaver.  It is not tested so DO NOT USE ON LIVE TWs, however feedback would be useful.

I have only tried this on xubuntu 14.04

Cheers

BJ
Message has been deleted

PMario

unread,
Oct 18, 2017, 1:58:16 PM10/18/17
to TiddlyWiki
Hi BJ,

Does it work with FF57? Did you test, if it's possible to symlink the backup directory out of the "downloads folder"?

-m

coda coder

unread,
Oct 18, 2017, 2:15:23 PM10/18/17
to TiddlyWiki
Hi BJ


On Wednesday, October 18, 2017 at 12:11:24 PM UTC-5, BJ wrote:
HI All,

I have build a (basic) saver that allows TWs to be saved in a subdir to the download dir, with some other minor restrictions. This is of course very restricting, however it allows saving to be similar to using tiddlyfox (it allows backups), and allows TWs to be moved out of the main part of the download directory, into a tree of subdirs.


If user were to use firefox profiles - one profile per TW - then the saving location can be set on a per TW basis, anywhere you want.  Right?

Mark S.

unread,
Oct 18, 2017, 2:27:44 PM10/18/17
to TiddlyWiki
What exactly are we supposed to download? There's no release copy that I can see, and the extensions directory has multiple js files.

Thanks,
Mark

PMario

unread,
Oct 18, 2017, 3:00:16 PM10/18/17
to TiddlyWiki
On Wednesday, October 18, 2017 at 8:27:44 PM UTC+2, Mark S. wrote:
What exactly are we supposed to download? There's no release copy that I can see, and the extensions directory has multiple js files.

You need to download everything.

In FF you need to import the manifest.json file. ... BUT ... It doesn't work on windows systems atm, because the path.separators are wrong there.

-m

PMario

unread,
Oct 18, 2017, 3:02:08 PM10/18/17
to TiddlyWiki
On Wednesday, October 18, 2017 at 8:15:23 PM UTC+2, coda coder wrote:
If user were to use firefox profiles - one profile per TW - then the saving location can be set on a per TW basis, anywhere you want.  Right?

No only directories relative to the "default download directory" are possible. see: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/downloads/download

When I get it working, I'll test, if it follows sym-links in windows.

-m

BJ

unread,
Oct 18, 2017, 3:04:57 PM10/18/17
to TiddlyWiki
HI Mark,
I've added some more details to the install instructions

BJ


On Wednesday, October 18, 2017 at 8:27:44 PM UTC+2, Mark S. wrote:

BJ

unread,
Oct 18, 2017, 3:10:37 PM10/18/17
to TiddlyWiki
I think you are correct that each profile has its own config data.

At the moment I have put in a separate dir for backups, there could be an option to put backdirs where each TW is.


On Wednesday, October 18, 2017 at 8:15:23 PM UTC+2, coda coder wrote:

BJ

unread,
Oct 18, 2017, 3:25:01 PM10/18/17
to TiddlyWiki
I use a symbolic link to my files, I have not tried just the backup but it should work I think.

Mark S.

unread,
Oct 18, 2017, 3:55:12 PM10/18/17
to TiddlyWiki
Is this supposed to work *with* the existing firefox extension? Or should that be removed and/or disabled?

In your instructions, for the FF people you should state that you need to load the manifest file. There's nothing in the directory that clearly looks like an extension.

Thank you,
Mark

PMario

unread,
Oct 18, 2017, 4:25:20 PM10/18/17
to TiddlyWiki
On Wednesday, October 18, 2017 at 9:55:12 PM UTC+2, Mark S. wrote:
Is this supposed to work *with* the existing firefox extension? Or should that be removed and/or disabled?

IMO it will be a replacement, once FF57 is out. I'm pretty sure it causes problems, if you use TiddlyFox and this one together.
 
In your instructions, for the FF people you should state that you need to load the manifest file.

IMO this is only important for devs and alpha testers atm, since the plugin is gone when the browser is closed.

-m

Sylvain Naudin

unread,
Oct 18, 2017, 4:35:46 PM10/18/17
to TiddlyWiki
Hello BJ,

I just test it on a fresh Mac 10.11.6 with Firefox Beta 57, follow up step, and it's promising :) It's great to see popin saver and the backup file too !

Thanks for sharing, and hope to see a clean FF 57 compliant.

Do you think we will limited to download directory ?


Cheers,
Sylvain

BJ

unread,
Oct 18, 2017, 4:36:35 PM10/18/17
to TiddlyWiki
I would only try this with the ff 57 beta. I tried with ff 49 and it did not work. You would need to disable the tiddlyfox extension if you want to try in earlier versions.

BJ

unread,
Oct 18, 2017, 4:50:58 PM10/18/17
to TiddlyWiki
Unfortunately there is no way around saving under the download dir. You can use symbolic links to move the effective location of the files.

Mark S.

unread,
Oct 18, 2017, 5:15:00 PM10/18/17
to TiddlyWiki
Can I install 57 without over-writing 56?

Mark

coda coder

unread,
Oct 18, 2017, 5:22:08 PM10/18/17
to TiddlyWiki

coda coder

unread,
Oct 18, 2017, 5:24:20 PM10/18/17
to TiddlyWiki

Mark S.

unread,
Oct 18, 2017, 7:48:27 PM10/18/17
to TiddlyWiki
It turns out that you need to download the full installer from the multi-platform page, then unzip the executable and set up your own short-cuts including a new profile path.

I've made one change to the ContentScript.js file for Windows pathing:

            var msg = {}, path, firstloc = filePath.indexOf("\\"+tiddlywikilocations+"\\");

It seems to be working, though I don't know how often it makes a backup.

Also, it works with windows Junction links, though I haven't checked yet whether resources like external images load properly.

Overall it's looking very promising.

Mark

TonyM

unread,
Oct 18, 2017, 9:35:07 PM10/18/17
to TiddlyWiki
BJ,

Please let me know when it works with Windows.

I have used symbolic links successfully recently an have some implement-ion ideas.

Tony

Mark S.

unread,
Oct 18, 2017, 9:37:50 PM10/18/17
to TiddlyWiki
Make the change I suggested and I think you'll find it works with Windows.

Mark

PMario

unread,
Oct 19, 2017, 4:04:58 AM10/19/17
to TiddlyWiki
On Wednesday, October 18, 2017 at 9:25:01 PM UTC+2, BJ wrote:
I use a symbolic link to my files, I have not tried just the backup but it should work I think.

That's interesting.. I did test it with ubuntu 17.04 and can't save to links. ... How do you link them?
-m

PMario

unread,
Oct 19, 2017, 5:08:17 AM10/19/17
to TiddlyWiki
On Thursday, October 19, 2017 at 1:48:27 AM UTC+2, Mark S. wrote:
It seems to be working, though I don't know how often it makes a backup.

According to the code, it seems to create 1 backup per day. ... But you are not allowed to mess with the filesystem, since the plugin can't recognize any changes, since there is no file API ...

-m

@TiddlyTweeter

unread,
Oct 19, 2017, 6:39:25 AM10/19/17
to tiddl...@googlegroups.com
Ciao coda coder

On the one hand I admire folk who want three versions of Firefox installed. On the other hand it looks like being touched by fetishism :-) Lol.


coda coder wrote:
Yes.  I use 55, 56 and 58.

My more serious point is about being able to use multiple profiles within ONE version of Firefox. Its pretty easy and there are add-ons that can automate it. Here is a screenshot of my profile menu all of which can be run simultaneously ...



Best wishes
Josiah
Auto Generated Inline Image 1

@TiddlyTweeter

unread,
Oct 19, 2017, 6:56:50 AM10/19/17
to tiddl...@googlegroups.com
The point of my last message being to CONFIRM that every FF profile can have its own download directory set. BJ's approach, combined with that, might provide another viable route forward? Simultaneous TW's in different FF profile instances.

Best wishes
Josiah

Mark S.

unread,
Oct 19, 2017, 9:16:19 AM10/19/17
to TiddlyWiki
It's possible the link I'm using is equivalent to hard links in *nix.

Mark

Mark S.

unread,
Oct 19, 2017, 9:20:18 AM10/19/17
to TiddlyWiki
But multiple profiles may not be necessary. You just have one sub directory (tiddlywikilocations) under downloads. Inside of that are links to your other directories. Windows has had links since Win 7, though they're not widely advertised and are sometimes referred to as junctions. By default you only get a command-line tool, but I understand there is a gui available somewhere.

Mark

BJ

unread,
Oct 19, 2017, 10:08:57 AM10/19/17
to TiddlyWiki
actually you can only link to another path which has 'tiddlywikilocations' as well eg

c:\.....\Downloads\tiddlywikilocations\

can link to

c:\.......\somedir\tiddlywikilocations\


You could link subdirs like so:

c:\.....\Downloads\tiddlywikilocations\dir1\

link to

c:\.......\somedir\tiddlywikilocations\dir1\

and

c:\.....\Downloads\tiddlywikilocations\dir2\

link to

c:\.......\someotherdir\tiddlywikilocations\dir2\

but it is a bit confusing, and if you do this you cannot link c:\.....\Downloads\tiddlywikilocations\ as well.

coda coder

unread,
Oct 19, 2017, 10:13:07 AM10/19/17
to TiddlyWiki
> But multiple profiles may not be necessary.

True. 

If you don't mind using the browser's default downloads location, then you don't need profiles.

If your typical browsing and downloading behavior is the same for TW purposes as it is for everyday browsing and downloading purposes, again, you don't need profiles.

However, if you want different behaviors for TW purposes and regular web browsing, you'll need two (or more) different profiles.  In my case,

1 - I want my TWs to always save to a specific location (not the default location) - and I don't want it to ask me each time.
2 - I want my regular web browsing to always ask me where to save a download

which cannot be achieved using a single (default) profile, hence, I use multiple profiles so I can have both 1 and 2 depending on whether I'm using TW or not.

My day job involves using (testing with) multiple browsers - Chrome Canary, IE, Edge and Firefox.  In the case of Firefox, it's also my preferred everyday browser and my "go to" dev browser (using Firefox Nightly).  AND it's my preferred TW browser.  So, in the case of Firefox, I absolutely need multiple profiles and not just for the reasons stated above (e.g. I don't want my Nightly "polluted" with a ton of addons - it's for testing code so needs to be "clean").

Anyway... I'm starting to ramble :)

Coda

Mark S.

unread,
Oct 19, 2017, 10:40:50 AM10/19/17
to tiddl...@googlegroups.com
I did not seem to encounter this problem on windows. I have my download directory

C:\Users\Mark\Downloads\tiddlywikilocations

inside of which is a link, twtest to C:\temp\twtests

I was able to edit and save files inside of C:\temp\twtests .

I suppose I should go back and verify that I was not hallucinating, but it all seemed to be working.

It may be there is a difference between symbolic link and hard link behavior.

Mark

Edit: For what it's worth, here's how I made the link:

D:\>mklink /J C:\Users\Mark\Downloads\tiddlywikilocations\twtests  C:\temp\twtests

@TiddlyTweeter

unread,
Oct 19, 2017, 12:04:39 PM10/19/17
to TiddlyWiki
Ciao Mark

I think hard links are step one. Certainly for 101. Other routes start generating brain fog.

Josiah

BJ

unread,
Oct 19, 2017, 12:53:23 PM10/19/17
to tiddl...@googlegroups.com
It depends on what you see in the address bar .

If you edit the TW from C:\Users\Mark\Downloads\tiddlywikilocations then It should save ok,
 but (on linux anyway) editing from C:\temp\twtests it would not save automatically

Mark S.

unread,
Oct 19, 2017, 2:03:18 PM10/19/17
to TiddlyWiki
This is what it shows:

file:///C:/Users/Mark/Downloads/tiddlywikilocations/twtests/empty514.html

twtests is a Junction to c:\temp\twtests

Autosaves like clockwork.

I'm not sure I understand your linux explanation, since obviously the c:...\ pathing is all wrong for linux. It might be worth trying both hard and soft links to see if there is a difference.

Mark

Mark S.

unread,
Oct 19, 2017, 2:13:33 PM10/19/17
to TiddlyWiki
Which profile-switch add-on are you using? The 2 I found in a quick search were incompatible with ff57.

Mark

@TiddlyTweeter

unread,
Oct 19, 2017, 2:22:23 PM10/19/17
to TiddlyWiki
I'm pre-pubescent pre-57. What's the rush to grow up before time? One step at a time, already. J x

Thomas Elmiger

unread,
Oct 19, 2017, 3:27:17 PM10/19/17
to TiddlyWiki
Hi BJ,

great stuff! Just a short confirmation from my side that BSaver basically works on Macs with FF. The only issue I met: I had to look into several config/preference pages to find the extension settings. Maybe you could point to about:addons (extensions section) in your comments.
(I can not confirm that backups will be saved there, I might have to wait until tomorrow?)

Test setup
  • macOS 10.13 (17A405)
  • Firefox Developer Edition 57.0b9
  • TW 5.1.15-prerelease

All the best!

Thomas

Reply all
Reply to author
Forward
0 new messages