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

Direct link to raw text? #52

Open
dietmarw opened this issue May 23, 2013 · 9 comments
Open

Direct link to raw text? #52

dietmarw opened this issue May 23, 2013 · 9 comments

Comments

@dietmarw
Copy link

Hi,

I was wondering if there is a way to link directly to the raw text version. And if not would it be hard to implement?

Thanks,
Dietmar

@nbraud
Copy link

nbraud commented Oct 30, 2013

If by “raw text version” you mean something that can be grabbed directly using curl (like on other pastebins), is would be impossible due to the use of client-side crypto.

@dietmarw
Copy link
Author

I see that problem. However it would still be nice to have a link to a paste that would then display not the standard view but the one one would get when manually pressing the "Raw text" link. E.g.,
http://sebsauvage.net/paste/?2715a090d99d11d6#Q+g7XP0PW+jso6Ww+Den5ch3VGJ+NPJ0MTqwq9P5S7g=&raw
should open up http://sebsauvage.net/paste/?2715a090d99d11d6#Q+g7XP0PW+jso6Ww+Den5ch3VGJ+NPJ0MTqwq9P5S7g= but then directly jump to the raw text version.
Would this be possible?

@nbraud
Copy link

nbraud commented Oct 30, 2013

It should be possible, but perhaps you should explain your use-case.

@ulikoehler
Copy link

I think it's possible to hack something together, either by creatively combining curl/wget, some sed-like tool and openssl (for decryption), or by using a small NodeJS, Python or similar script (which decrypts using the scripting language crypto).

I don't like the first option, but in the long term it might be nice to have an automatable fetch script.

@nbraud
Copy link

nbraud commented Oct 30, 2013

There is already a CLI client for ZeroBin : https://github.com/ziirish/zerocli.

@dietmarw
Copy link
Author

My usage case is simple. I would like to be able to share a link that ends up in a "clean" page with just containing the raw text and non of the rest of the interface.
Example: http://pastebin.com/raw.php?i=G6xBdZmQ

@ulikoehler
Copy link

@dietmarw I assume you don't want client-side JS to be included in the page. The problem is, this entirely bypasses the security feature (= the one feature that makes it different) of ZeroBin. Technically it is possible but I do believe you should not use ZeroBin if that's your usecase. Wikipedia has a list of OSS pastebins.

If you're OK with client-side javascript code being used however, you should have a look at my CSS style pull request. This allows you to use a ZeroBin theme that does contain nothing but the text itself (the specific pull request only allows CSS styling, one could add a config option for alternative templates, however).

@dietmarw
Copy link
Author

@ulikoehler Actually I would not mind the client side JS as. So I'll look at you CSS style pull request. So for my user case a appended &raw might simply just point to a plainer version of the normal page.

@marsjaninzmarsa
Copy link

Or you can redirect user to data url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants