aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Emulecollection tool script  (Read 3806 times)

Raistlin

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
Emulecollection tool script
« on: July 17, 2010, 03:24:05 PM »

I wrote a bash script using zenity, amule-emc and ed2k to ease them use. It makes you open an *.emulecollection file anf choose between this actions:
  • Add: adds a selection of the links in the file
  • Convert: saves all links in a text file (of your choise)
  • Add all links: adds all the links of the collection

It's bad writed (youre free to correct it or insult me, but only if you suggest how to correct it, like:"You should had wrote this and that, you moron!!"), but it works (or it seems to).
Hope someone find that useful.
Script attached.
Logged
Il caos è l'ordine naturale delle cose
Sorry for my bad English

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 164
  • Offline Offline
  • Posts: 2714
Re: Emulecollection tool script
« Reply #1 on: July 17, 2010, 04:12:09 PM »

It's bad writed (youre free to correct it or insult me, but only if you suggest how to correct it, like:"You should had wrote this and that, you moron!!"), but it works (or it seems to).
I'm not going to insult you (I leave that for others), but let me suggest an improvement:

Instead of
Code: [Select]
TMP_COL="/tmp/add.emulecollection"
FOO="/tmp/foo"
FOO2="/tmp/foo2"
I would have written
Code: [Select]
TMP_COL=`mktemp -t`
FOO=`mktemp -t`
FOO2=`mktemp -t`
and then you don't need the line
Code: [Select]
> $FOO2 #crea FOO2 (equivalente a touch $FOO2)(it's already created by mktemp above)

That's for now, at the first sight.
Logged
concordia cum veritate

Raistlin

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
Re: Emulecollection tool script
« Reply #2 on: July 17, 2010, 05:25:04 PM »

Never heard of that command before, thank you!
Logged
Il caos è l'ordine naturale delle cose
Sorry for my bad English

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5898
Re: Emulecollection tool script
« Reply #3 on: July 17, 2010, 09:26:53 PM »

You moron!
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 164
  • Offline Offline
  • Posts: 2714
Re: Emulecollection tool script
« Reply #4 on: July 17, 2010, 11:56:41 PM »

I knew you wouldn't miss a chance...
Logged
concordia cum veritate

Raistlin

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
Re: Emulecollection tool script
« Reply #5 on: July 18, 2010, 12:44:59 AM »

You moron!
Ehi! I said "but only if you suggest how to correct"... :D
« Last Edit: July 18, 2010, 12:46:54 AM by Raistlin »
Logged
Il caos è l'ordine naturale delle cose
Sorry for my bad English

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5898
Re: Emulecollection tool script
« Reply #6 on: July 18, 2010, 04:14:43 AM »

He suggested, I insulted. It's called a team.
Logged

Raistlin

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
Re: Emulecollection tool script
« Reply #7 on: July 18, 2010, 02:06:15 PM »

Ok then, as long as suggestions and insults are in equal number. ;D
Has anyone tryed it, anyway?
« Last Edit: July 18, 2010, 02:11:22 PM by Raistlin »
Logged
Il caos è l'ordine naturale delle cose
Sorry for my bad English

Raistlin

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
Re: Emulecollection tool script
« Reply #8 on: July 23, 2010, 01:33:22 AM »

I've corrected some silly errors (I'm a moron after all :D)
Script attached
Logged
Il caos è l'ordine naturale delle cose
Sorry for my bad English