RPTools.net

Discussion and Support

Skip to content

It is currently Sat Dec 16, 2017 9:30 pm 




Forum rules


Please discuss all HOWTO topics in the main forum. They will be moved here by a moderator when appropriate.



Reply to topic  [ 85 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3782
Location: MD
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Sat Feb 07, 2009 8:19 pm 
Azhrei wrote:
I think I misunderstood your question.


Well, my wish-list on this feature probably isn't simple, but I think it would make it a hell of a lot more useful. I've only used this feature once, and after doing it decided it wasn't worth the trouble to use ever again. Players can wait till the transfers are done the "slow way" as far as I'm concerned.

However, if I could enter my FTP info once... then from there on out single click sending campaigns and assets to the FTP I think it would be really useful. Particularly if when looking at my campaign assets if I could see, at a glance what was in the repository and what wasn't.

So, say I put the campaign on a repository. Then I work on it some more... we play a session and then I update it for the next game. If I could look at what's in the campaign and easily see, "Hey, I should probably put that map, those 5 new trees, and those 3 new buildings in the repository." And then actually be able to do it by selecting the assets and clicking "send to repository"... that would be awesome.

I'd actually use the feature and the group would gain the benefit. But as it is now, I find this to be a pretty clunky implementation.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Sat Feb 07, 2009 10:53 pm 
I've started a new thread under Feature Requests. Take a look and tell me what you think.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Sep 11, 2006 9:12 am
Posts: 468
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Mon Feb 16, 2009 11:03 am 
IMarvinTPA wrote:
I haven't had time to verify that all the files have been uploaded, nor if it works as intended yet, but the upload is reportedly complete. I'll verify when I have some time.

http://www.imarvintpa.com/Mapping/index.gz



This URL should work now. I found I had a permissions issue on this file alone. You can also freely navigate the directories in http://www.imarvintpa.com/Mapping/

I'm still trying to figure out how to tell the difference between getting a file from the host and from this site as a test, but, I think it works in theory now.

IMarv


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Mon Feb 16, 2009 11:33 am 
IMarvinTPA wrote:
I'm still trying to figure out how to tell the difference between getting a file from the host and from this site as a test, but, I think it works in theory now.

IMarv

If everything is working correctly, you can't.

But that's the point, isn't it? And because the image is only retrieved once and then cache after that, you would only see the network traffic on the first attempt to use an image that wasn't in the cache.

However, if you wanted to force it ... start MapTool as usual, drag an image to the map, determine it's asset ID (via something like getSelectedTokens() or similar), and then shutdown MapTool. Do not save the campaign. Now go to your .maptool/assetcache folder and delete the asset that you recorded earlier. Then next time you try to use that same image, it will have to be loaded externally since it won't be found in the cache.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Sep 11, 2006 9:12 am
Posts: 468
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Thu Feb 26, 2009 4:13 pm 
The output of md5sum is almost what MapTool uses. However, I do not know if the fact that md5sum (at least the version on my webhost) which outputs 2 spaces between the MD5 and the path to the file is an issue for MapTool.

Does anybody know if
Code:
md5sum "somdir" >index
gzip index

produces results that are acceptable to MapTool?

(I need to check to see if it is in fact a tab or two spaces.)

Edit:
1) It is 2 spaces.
2) The code "Trims" the URL path for the file. (So don't name any files with spaces at the end! Or directories with spaces at the front...)

Answer: Yes, md5sum's output is perfect for the index file.

IMarv


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Sep 11, 2006 9:12 am
Posts: 468
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Thu Feb 26, 2009 5:06 pm 
I thought this deserved its own post:

This command will seek out, compute, and generate the index needed for a repository. Run this from the folder you want the index.gz file for. Images may be in the same folder as the index.
Code:
find * ! -type d "(" -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.rptok" -o -iname "*.bmp" ")" -print0 | xargs -0 md5sum | gzip > index.gz


If you need more file type extentions, just add them with -o -iname "*.ext" after the "*.bmp"

IMarv

Edit: Added rptok and fixed a typo in the text.

Edit 2:
If you don't care about filtering the file name (in the event you have an assets folder with no file name extensions):
Code:
find * ! -type d -print0 | xargs -0 md5sum | gzip > index.gz


Last edited by IMarvinTPA on Thu Feb 26, 2009 5:25 pm, edited 2 times in total.

Top
 Profile  
 
User avatar  Offline
TheBard
 
Joined: Tue Mar 21, 2006 7:26 pm
Posts: 3484
Location: Austin, Tx
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Thu Feb 26, 2009 5:14 pm 
IMarvinTPA wrote:
I thought this deserved its own post:

This command will seek out, compute, and generate the index needed for an repository. Run this from the folder you want the index.gz file for. Images may be in the same folder as the index.
Code:
find * ! -type d "(" -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.bmp" ")" -print0 | xargs -0 md5sum | gzip > index.gz


If you need more file type extentions, just add them with -o -iname "*.ext" after the "*.bmp"

IMarv


I can't say thank you enough. That's outstanding.

_________________
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Thu Feb 26, 2009 8:06 pm 
It does assume that you're using the standard filename extensions for images. That's probably pretty reasonable. If you're not using filename extensions for some reason (as he mentioned, maybe because you're scanning an asset directory). Change directory to the top level where you want to begin the search, then use the following (all one line):

Code:
find . -type f -print0 | xargs -0 file | grep -ie png -e exif -e jfif -e jpeg -e jpg | cut -d: -f1 | xargs md5sum | gzip -9 > index.gz

The parameters passed to grep might need to be modified if your version of the file command uses different output strings for those file types.

(I just love the Un*x shell. Can you tell? ;))


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Sep 11, 2006 9:12 am
Posts: 468
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Thu Feb 26, 2009 8:23 pm 
Azhrei wrote:
Code:
find . -type f -print0 | xargs -0 file | grep -ie png -e exif -e jfif -e jpeg -e jpg | cut -d: -f1 | xargs md5sum | gzip -9 > index.gz



That's the command I wanted back at about this post: viewtopic.php?p=81821#p81821

The repository includes a few .rptok files, I wonder if those work since they contain images... Hmm.

IMarv


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Sun Mar 08, 2009 11:02 pm 
(Moved to the MapTool -> HOWTO forum so that I could also leave a "shadow" topic in the original location. They are both the same thread and updates in one will appear in the other.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 85 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

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 post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman