You are not logged in.

#1 2006-12-30 17:11:32

yankees26
Member
From: Connecticut, USA
Registered: 2006-09-29
Posts: 190

nopaste python script

I wrote up a python script to post a file to http://pastebin.archlinux.org/.  First tried it in Perl, but it kept sending only one line of the file and the regex to get the url wasn't working.  So I did it in python instead.  It resides here posted their by itself.

~ Jamie / yankees26

UPDATES

Version 0.2 : DEAD Link

Version 1.0 : DEAD Link

Version 1.0.1

Last edited by yankees26 (2007-04-01 12:32:52)

Offline

#2 2006-12-31 17:58:11

yankees26
Member
From: Connecticut, USA
Registered: 2006-09-29
Posts: 190

Re: nopaste python script

Updated to version 0.2.

Now writes some info to ~/.nopaste.log so for example, say you lose a file but had pasted it to pastebin at some point you can see what the URL on pastebin is.

Here it is. (Dead)

Last edited by yankees26 (2007-04-01 12:33:04)

Offline

#3 2006-12-31 20:46:21

yankees26
Member
From: Connecticut, USA
Registered: 2006-09-29
Posts: 190

Re: nopaste python script

Updated to version 1.0 (wow that was fast)

Takes username as an argument and type of file.  So say you want to upload pythonfile.py with syntax highlighting as bob:
$ nopaste -u bob -t python pythonfile.py

Notice it is not Python but python, didn't work with capitalized P.

Here it is. (Ooooooo, green tongue) (dead)

Last edited by yankees26 (2007-04-01 12:33:17)

Offline

#4 2007-02-15 02:54:11

lydgate
Member
From: London, UK
Registered: 2006-01-10
Posts: 60

Re: nopaste python script

Should have set those to "forever" tongue

Offline

#5 2007-02-15 16:33:48

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: nopaste python script

It be dead captain! repost repost!

Offline

#6 2007-02-16 02:36:58

yankees26
Member
From: Connecticut, USA
Registered: 2006-09-29
Posts: 190

Re: nopaste python script

Probably should have.  Its updated in the new post. And here: http://pastebin.archlinux.org/1501 (dead)

Last edited by yankees26 (2007-04-01 12:33:31)

Offline

#7 2007-04-01 12:35:05

yankees26
Member
From: Connecticut, USA
Registered: 2006-09-29
Posts: 190

Re: nopaste python script

Okay, I think it might have been a bug in my code, considering I used my script to paste the script, which I think should be fixed now, which means it will successfully post forever (I hope) tongue

Version 1.0.1 Resides Here

Offline

#8 2007-04-07 15:08:37

louipc
Member
Registered: 2006-10-09
Posts: 85

Re: nopaste python script

I Modified the script so you can specify a pastebin URL, also changed the default expiry to a month

http://pastebin.archlinux.org/2338

Offline

Board footer

Powered by FluxBB