View previous topic :: View next topic |
Author |
Message |
neonik Guru
Joined: 08 Oct 2003 Posts: 501
|
Posted: Mon Apr 12, 2004 10:30 am Post subject: Screenshot taking and auto-uploading script |
|
|
Hello and such.
(For news and changes see the bottom of this post)
Let's be straighforward. Is anyone interested in an automatical script that takes screenshtos and makes thumbnails of them and uploads them to your ftp server right away?
I'm one of those who needs such a script. So I was looking for one for quite a while, having found nothing suitable, I decided to write my own one. Yesterday I began with this, got it working... Feel free to try it out and supply me with critics and suggestions on how to extend it.
Technical description:
Dependencies:
1. app-shells/bash
2. net-ftp/ftp
3. media-gfx/imagemagick
Going to add also support for lftp and scrot (if you know of other screenshot taking apps that can also resize the images taken, please let me know of them )
Abilities (so far):
Taking several screenshots, acquiring their thumbnails and uploading them all (or per choice) to a remote server.
The utility is quite configurable (check the config file). The current release 0.0.4 is what I brought it to yesterday in a few hours (to be honest, my first bash script ) - that's for the case you begin flaming me
Resources and thanksgiving:
1. neenee (for description of what such a script could look like)
2. http://www.tldp.org/LDP/abs/html/ - great How-To (I used some of the ideas from there)
Notes:
1. Currently only the interactive mode is working but I'm going to script a fully automatical one (you'd only need o execute a one-word command, namely the script self).
2. Colors: if you get bad looking colors, don't worry, I'll replace those color codes with original RGB values.
3. Dependencies: so far bash, ftp and imagemagick. I'll write patches for lftp and scrop, maybe some more - please let me know of what you'd like to use.
4. Ebuild: I do have a ready ebuild I wrote yesterday for netshot, but I gotta first check it out and adjust a little bit. In future all patching will be done via USE flags (i.e. bash/php/perl/python, ftp/lftp, imagemagick/scrop and so on).
5. Programming languages: for now BASH, a Perl version is in development, a PHP version will be also done (I do have much more experience with PHP than any other scripting language), and possibly Python. Don't think we need a C/C++ implementation thereof (but if yet, please let me know).
6. The script will work from everywhere, just make sure you have done chmod 755 netshot-0.0.4.sh
7. The supplied configuration file is required
8. Localization: for now only English, I'll also make German localization.
9. License: GNU GPL (although, I guess BSD would suit it better)
Downloads:
1. Script self
2. Configuration file
3. Ebuild file
Configuration (without an ebuild yet):
1. Create a configuration directory and copy the config file there: Code: | $ mkdir ~/.netshot && cp $PATH_TO_CONF/netshot.conf ~/.netshot |
2. Modify the configuration file (everything is described in it with coments): Code: | $ $EDITOR ~/.netshot/netshot.conf |
Request:
Please post all your critics, suggestions and comments here in this thread or send me a PM, contact me on IRC (neonik) or send me an email (root[at]neonik[dot]net). If you'd like to make changes to the application and let me know of them, please also submit a patch (via diff) against the original files.
Thank you in advance for all helpful information and trying it out.
Update (20040418-1621):
Current version: 0.0.7-bash
Notes:
1. automated mode complete
2. some little fixes
3. netshot.conf updated a bit
Update (20040415-1225):
Current version: 0.0.6-bash
Notes:
1. updated handling of already existing files (no overwrite any longer)
2. thumbnail numbers are ordered in accordance with the numbers of screenshots
3. some more little fixes
4. netshot.conf updated a bit
Update (20040412-2030):
Current version: 0.0.5-bash
All -current's are available directly at http://www.neonik.net/projects/netshot/netshot.{sh,php,pl}
All milestone releases are available also there with their version numbers ( http://www.neonik.net/projects/netshot/netshot-0.0.5.sh for current, *-0.0.4.sh for prior ).
Notes:
1. the configuration file has also been updated
2. few minor bug fixes
Edit:
1. added the ebuild (if anyone can improve the build, please let me know how, I would really appreciate this )
2. version bump to 0.0.5-bash. Will upload shortly (many things fixed)
3. according to the recent version bump download links updated (net-misc/netshot-0.0.5)
4. new version (0.0.6-bash), updating links; see notes; ebuild not updated yet
5. ebuild updated (version 0.0.6-bash) - rewritten
6. automated mode complete
7. updated links for version 0.0.7-bash _________________ Best regards,
neonik
netshot-0.0.8 - script that takes screenshots, generates their thumbnails and uploads them all! (has not been updated).
Last edited by neonik on Sun Apr 18, 2004 2:27 pm; edited 5 times in total |
|
Back to top |
|
|
at6 Tux's lil' helper
Joined: 28 Nov 2002 Posts: 78 Location: /dev/null
|
Posted: Mon Apr 12, 2004 4:24 pm Post subject: |
|
|
hi neonik,
thanks mate! nice to have such a script to show off with my daily changing desktop
cheers,
marc _________________ debian: stable but lame! suse: unstable and lame! gentoo: stable and only 4 geeks!
Gadget tests! |
|
Back to top |
|
|
neonik Guru
Joined: 08 Oct 2003 Posts: 501
|
Posted: Mon Apr 12, 2004 6:28 pm Post subject: |
|
|
at6 wrote: | hi neonik,
thanks mate! nice to have such a script to show off with my daily changing desktop
cheers,
marc |
I'm glad to see I'm not the only one who would have a use of this tool _________________ Best regards,
neonik
netshot-0.0.8 - script that takes screenshots, generates their thumbnails and uploads them all! (has not been updated). |
|
Back to top |
|
|
neonik Guru
Joined: 08 Oct 2003 Posts: 501
|
Posted: Tue Apr 13, 2004 7:54 am Post subject: |
|
|
I'm almost done with the PHP version.
It can so far:
1. bring up the menu
2. ask what to do
3. take screenshots
4. generate thumbnails
It can neither upload them nor check if they already exist and will overwrite all existing screenshots with the same name. Screenshot names are generated via the variable you set in the configuration file, date, an ordinate number and the extension you set in your config file. In the end it looks like Screenshot-20041304-0.jpg.
If anyone is interested in contributing to netshot, please do so, cause I'm feeling lazy to think of what it should do more. Fixing bugs and a little bit extend it will I do, though _________________ Best regards,
neonik
netshot-0.0.8 - script that takes screenshots, generates their thumbnails and uploads them all! (has not been updated). |
|
Back to top |
|
|
neonik Guru
Joined: 08 Oct 2003 Posts: 501
|
Posted: Sun Apr 18, 2004 2:19 pm Post subject: |
|
|
Well automated mode now complete and I feel acutally no need other than experiment in writing an alternative perl/PHP and similar versions. So, anyway, it's nearly finished. _________________ Best regards,
neonik
netshot-0.0.8 - script that takes screenshots, generates their thumbnails and uploads them all! (has not been updated). |
|
Back to top |
|
|
benguru Tux's lil' helper
Joined: 19 Feb 2004 Posts: 125
|
Posted: Sun Apr 18, 2004 2:52 pm Post subject: Wow |
|
|
Wow, this is really cool. Now I can link to my screenshot in buddy profile, and all my friends can see what I am doing, it would be just like Big Brother... ok maybe not in my profile. Also I haven't tested it yet, but it looks like it could be automated with a cron job. |
|
Back to top |
|
|
neonik Guru
Joined: 08 Oct 2003 Posts: 501
|
Posted: Sun Apr 18, 2004 5:16 pm Post subject: |
|
|
Basically, yes. If you disable protection from overwriting that is... Good idea, gotta add that to the config. Otherwise you'd need a link wrapper to your actual screenshot.
What would you prefer a link wrapper or configurable overwriting? Both are easy to make... I'll just do both
Thanks for the reply, benguru. _________________ Best regards,
neonik
netshot-0.0.8 - script that takes screenshots, generates their thumbnails and uploads them all! (has not been updated). |
|
Back to top |
|
|
neonik Guru
Joined: 08 Oct 2003 Posts: 501
|
Posted: Sun Apr 18, 2004 6:15 pm Post subject: |
|
|
Got it done.
Here (I've already marked it version 0.0.8-bash but haven't updated the rest):
http://www.neonik.net/projects/netshot/netshot.sh
http://www.neonik.net/projects/netshot/netshot.conf
(You'll need the new config too.)
The only little issue now is that it won't upload the symlink with its name, but instead will follow that and upload the linked file self (I'll fix it later, though). _________________ Best regards,
neonik
netshot-0.0.8 - script that takes screenshots, generates their thumbnails and uploads them all! (has not been updated). |
|
Back to top |
|
|
neonik Guru
Joined: 08 Oct 2003 Posts: 501
|
Posted: Sun Apr 18, 2004 6:45 pm Post subject: |
|
|
Fixed netshot.sh, uploaded (was a mistake in relinking for interactive()). _________________ Best regards,
neonik
netshot-0.0.8 - script that takes screenshots, generates their thumbnails and uploads them all! (has not been updated). |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|