Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-17-2009, 09:07 AM   #1
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
any developers code shell scripts?

anyone code bash shell scripts?

leave your contact info

thanks.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 09:21 AM   #2
PowerCum
CjOverkill
 
Industry Role:
Join Date: Apr 2003
Location: Woldwide
Posts: 1,328
Usually people would say "See sig"

In this case I can only say... Look at YOUR sig
__________________
CjOverkill Traffic Trading Script
Free, secure and fast traffic trading script. Get your copy now
PowerCum is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 09:24 AM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
ya, they dont do shell scripting, or else i wouldnt have made the post
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 09:34 AM   #4
PowerCum
CjOverkill
 
Industry Role:
Join Date: Apr 2003
Location: Woldwide
Posts: 1,328
Search round on freshmeat and sourceforge.
Unless you need something really complex it's probably done already.

Image resizing, movies pics extraction and so on... there are like 500 scripts that do these tasks.
__________________
CjOverkill Traffic Trading Script
Free, secure and fast traffic trading script. Get your copy now
PowerCum is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 09:36 AM   #5
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
Quote:
Originally Posted by PowerCum View Post
Search round on freshmeat and sourceforge.
Unless you need something really complex it's probably done already.

Image resizing, movies pics extraction and so on... there are like 500 scripts that do these tasks.
need something custom, but not complex.

its for posting to a source code site from the command line.

one of the parameters is tags:

tag1,tag2,tag3

not sure how to parse that in a shell script
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 10:09 AM   #6
nation-x
Confirmed User
 
nation-x's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
why does it need to be a "bash" shell script? You can run perl, php, etc from the shell.

http://www.phpbuilder.com/columns/darrell20000319.php3

Last edited by nation-x; 02-17-2009 at 10:13 AM.. Reason: added link
nation-x is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 10:13 AM   #7
mrkris
Confirmed User
 
Join Date: May 2005
Posts: 2,737
Quote:
Originally Posted by nation-x View Post
why does it need to be a "bash" shell script? You can run perl, php, etc from the shell.
My thoughts exactly.
__________________

PHP-MySQL-Rails | ICQ: 342500546
mrkris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 10:19 AM   #8
nation-x
Confirmed User
 
nation-x's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
Code:
#!/usr/local/bin/php -q
<?php
// $argc contains the count of arguments passed
echo "Total argument passed are : $argc \n";

if ($argc) {
	// $argv contains an array of the arguments that were passed
	foreach($argv as $arg) {
		echo $arg."\n";
	}
}
?>
nation-x is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 10:22 AM   #9
nation-x
Confirmed User
 
nation-x's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
Quote:
Originally Posted by PowerCum View Post
Usually people would say "See sig"

In this case I can only say... Look at YOUR sig
stfu... real webmasters are posting... not thieving bitches
nation-x is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 10:40 AM   #10
fuzebox
making it rain
 
fuzebox's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,107
Generally for command line stuff I just do it in perl.
fuzebox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 12:14 PM   #11
tranza
ICQ: 197-556-237
 
Join Date: Jun 2003
Location: BRASIL !!!
Posts: 57,559
Quote:
Originally Posted by nation-x View Post
Code:
#!/usr/local/bin/php -q
<?php
// $argc contains the count of arguments passed
echo "Total argument passed are : $argc \n";

if ($argc) {
	// $argv contains an array of the arguments that were passed
	foreach($argv as $arg) {
		echo $arg."\n";
	}
}
?>
Thanks for this bro! ;)
__________________
I'm just a newbie.
tranza is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 12:20 PM   #12
doridori
So Fucking Banned
 
Join Date: Jul 2008
Location: Canadia
Posts: 2,222
see see sig
doridori is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 03:17 PM   #13
nation-x
Confirmed User
 
nation-x's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
Quote:
Originally Posted by tranza View Post
Thanks for this bro! ;)
np..

doridori - go eat a sick dick punk
nation-x is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2009, 07:08 PM   #14
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
this basically does what i want it to do, but in perl

Code:
#!/usr/bin/perl -w

use strict;
use Frontier::Client;

my $apikey = 'APIKEYHERE';	
my $src = 'sourcecode.phps'; 
my $title='test post';
my $code = '';
my $tags = 'tag1 tag2 tag3';
my $language = 'php';
my $flag = 0;

open(FC, "<:utf8", $src);
while (<FC>) {
	if (/^\#[^!]\s*(.+)/ && $flag == 0) {
		$title = $1;
		$flag++;
	}
	elsif (/^\#[^!]\s*(.+)/ && $flag == 1) {
		$tags = $1;
		$flag++;
		if (/(\w+) (.+)/) {
			$language = $1;
			$tags = $2;
		}
	}
	$code = $code . $_;
}

my $session = Frontier::Client->new( url => 'http://snipplr.com/xml-rpc.php', debug => 0,);
my @args = ($apikey, $title, $code, $tags, $language);
my $result = $session->call('snippet.post', @args);
the command line version of it using the snipplr ruby gem would be

Code:
snipplr -c -meta ":title=>'test post',:tags=>'tag1 tag2 tag3',:language=> 'php'" < sourcode.phps
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-18-2009, 03:30 AM   #15
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
It sounds to me like the 'curl' command line does exactly what you are after...
http://curl.haxx.se/docs/manpage.html

...or i might have misread completely.
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-18-2009, 06:18 AM   #16
nation-x
Confirmed User
 
nation-x's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
hehe... today is the first time I ever looked at snipplr... how funny
nation-x is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.