view zip files in tw5.1.8

243 views
Skip to first unread message

Thomas Schulte

unread,
Apr 19, 2015, 10:12:45 PM4/19/15
to tiddl...@googlegroups.com
I can import a zip file containing 1 text file into Tiddlywiki by drag and drop but can't view anything useable in the zip using Firefox.
How do I look at the contents of the zip file?

PMario

unread,
Apr 20, 2015, 2:50:23 AM4/20/15
to tiddl...@googlegroups.com
Hi Thomas,
FireFox can't dig into zip files out of the box. May be there are addons, that can enable such a behaviour.

Depending on your operating system, your file browser can open and show zip file content. .. But to do this there have to be the right drivers installed.

What makes you think TW can do this?
-m

RichardWilliamSmith

unread,
Apr 20, 2015, 3:15:10 AM4/20/15
to tiddl...@googlegroups.com
Hi Mario,

I almost wrote the same thing myself but thought to just check the home page and indeed this is listed as a new feature for 5.1.8 viz. 
  • Added support for embedding ZIP files
But alas, this is the only mention of the word 'zip' so I'm not sure quite how it's supposed to work.

I tried compressing two jpg's and dragging the .zip into tiddlywiki.com and all I get is a big blob. Using the import mechanism produces the same result.

Regards,
Richard

PMario

unread,
Apr 20, 2015, 3:33:34 AM4/20/15
to tiddl...@googlegroups.com
On Monday, April 20, 2015 at 9:15:10 AM UTC+2, RichardWilliamSmith wrote:
Hi Mario,

I almost wrote the same thing myself but thought to just check the home page and indeed this is listed as a new feature for 5.1.8 viz. 
  • Added support for embedding ZIP files
If you click the link, you see, this just means, that TW recognices the .zip extension to be a binary blob.
So it sets the tiddler (mime) type field to application/zip and tells the core to use base64 encoding to embed it. ... That's it.
-m



PMario

unread,
Apr 20, 2015, 3:52:36 AM4/20/15
to tiddl...@googlegroups.com
I did dig a little bit deeper.

In Feb. there was a group topic: Embed a ZIP for download?  which resulted in some discussion an 2 new github issues:

Provide download link for binary tiddlers #1522 and
Treat tiddlers as base64 by default #1521

Both issues are still open. ..

So there may be a possibility in the TW core, that allows you to create a buttion that says: "Download and save this tiddler as a .zip file" but I doubt, there will ever be a possibility to browse a ZIP tiddler within TW itself. .... At least _not_ in the core. ... This is clearly plugin territory, because imo it will just bloat the core.

-----------

There has been some discussion to implement the possibility to package and export several tiddlers as a very very simple and uncompressed zip file. Zip format would be just used as a basic container to allow a single file download. .... In no way this mechanism would be able to handle highly compressed .zip files.

At the moment, the TW export mechanism only allows you to export several tiddlers at the same time as a .json file. But what should be possible is: to render several tiddlers to html and then download the plain html files packaged as a single .zip file. ....

-mario

Eric Shulman

unread,
Apr 20, 2015, 5:26:15 AM4/20/15
to tiddl...@googlegroups.com
On Monday, April 20, 2015 at 12:52:36 AM UTC-7, PMario wrote:
So there may be a possibility in the TW core, that allows you to create a buttion that says: "Download and save this tiddler as a .zip file" 

Here's an ugly little trick that works today:

First, drag-and-drop a binary file (e.g., myfile.zip) into TW to create a base64-encoded tiddler with the file content.  Then, put the following macro into a tiddler:
   <<datauri "myfile.zip">>

This will display as a very ugly "external" link of the form:
   data:application/zip;base64,...encoded data here...

Click the link to open another tab.  The browser will automatically trigger it's built-in download handler, allowing you to save the decoded binary file locally.  Once it is saved to your filesystem, you can open the .zip file in the normal manner to access it's contents.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

PMario

unread,
Apr 20, 2015, 6:19:17 AM4/20/15
to tiddl...@googlegroups.com
On Monday, April 20, 2015 at 11:26:15 AM UTC+2, Eric Shulman wrote:
On Monday, April 20, 2015 at 12:52:36 AM UTC-7, PMario wrote:
So there may be a possibility in the TW core, that allows you to create a buttion that says: "Download and save this tiddler as a .zip file" 

Here's an ugly little trick that works today:

As Eric points out, there are / may be some hickups, depending on your browser.

see: Length limitations for the upcoming FF 39 [1], Which imo may be worth its own TW ticket :/

-m

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs

Jeremy Ruston

unread,
Apr 21, 2015, 3:29:18 PM4/21/15
to TiddlyWiki
Hi Mario

> see: Length limitations for the upcoming FF 39 [1], Which imo may be worth its own TW ticket :/

Ouch! Firefox 39 implements a 1MB limit on the size of data URIs. It basically means that you won't be able to save changes with the standalone HTML file configuration in Firefox without using TiddlyFox. The knock-on effect is that it will break the "Download Empty" button in GettingStarted, too.

Here's the ticket:


Sadly, I wasn't aware of it.There's no one in the thread making a case for a higher limit than 1MB, so they went ahead and implemented it.

I think it would be worth some of us chiming in on the ticket

Best wishes

Jeremy.





--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/691c9237-a575-4cc5-80c7-f3ffe91a174c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Jeremy Ruston

unread,
Apr 21, 2015, 5:00:22 PM4/21/15
to TiddlyWiki
I've added a comment to the ticket:


Please feel free to add your voice to the request to reconsider.

Best wishes

Jeremy.

PMario

unread,
Apr 22, 2015, 4:29:04 AM4/22/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
On Tuesday, April 21, 2015 at 9:29:18 PM UTC+2, Jeremy Ruston wrote:
Hi Mario

> see: Length limitations for the upcoming FF 39 [1], Which imo may be worth its own TW ticket :/

Ouch! Firefox 39 implements a 1MB limit on the size of data URIs. It basically means that you won't be able to save changes with the standalone HTML file configuration in Firefox without using TiddlyFox. The knock-on effect is that it will break the "Download Empty" button in GettingStarted, too.

I did some tests with FF 39.a2 developer edition .. I did include a 2MB zip file an it seems to be saved as expected. So the FF developer branch seems to be not effected atm. ...
 
Here's the ticket:


Sadly, I wasn't aware of it.There's no one in the thread making a case for a higher limit than 1MB, so they went ahead and implemented it.

I think it would be worth some of us chiming in on the ticket

I'll jump in if needed. ... Have you seen the reply to your post?
-m

Jeremy Ruston

unread,
Apr 24, 2015, 6:11:26 AM4/24/15
to PMario, TiddlyWiki
Hi PMario

It seems that everything is resolved; it turns out that the wiki was updated erroneously and the 1MB limit doesn't apply to data URIs:


Thanks for bringing up the issue.

Best wishes

Jeremy


Thomas Schulte

unread,
Apr 24, 2015, 10:58:09 AM4/24/15
to tiddl...@googlegroups.com
The docs indicated that zip format was available but didn't say how to use it. The github docs are too arcane for me to understand.

Seems like a pretty useless feature.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/_MOJRvV2sFo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

PMario

unread,
Apr 24, 2015, 5:52:39 PM4/24/15
to tiddl...@googlegroups.com
On Friday, April 24, 2015 at 4:58:09 PM UTC+2, Thomas Schulte wrote:
The docs indicated that zip format was available but didn't say how to use it. The github docs are too arcane for me to understand.

I know, that github is arcane for many users. That's why I did dig deeper and created a 3rd response, that should shed some more light to the topic.
 
Seems like a pretty useless feature.

As I wrote in my 3rd response. It's the first step to implement some functions which several users demanded, that actually make sense. .. Just because it doesn't exactly do what you expected, doesn't mean it's useless.

Your kind words are highly motivating for me. Thanks for your feedback.
have fun!
mario

Reply all
Reply to author
Forward
0 new messages