AutoHotkey Community

It is currently May 27th, 2012, 4:26 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: February 22nd, 2010, 10:23 pm 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
i'd love to see an account opened on ahk.net and interested developers working on the same svn repository. this way only one account has to be managed and the sources are public available and can be maintained by whoever joins the group :)

as for updating the stdLib files, files hosted on akh.net may be queried for a digest, so that the maintenance script builds a digest of the local copy and compares it to the remote digest. imho the most failsafe way to track differences.

meta data supplied by stdLib information stream can give informations of how to handle the source file (eg unzip, tar, 7z, from post, whatever ...)

also not every file is hosted on ahk.net but some only exists as an entry on the forum page, therefor i'd suggest a html download and to parse the fprum page for the sources of the script via regex (got something prepared for that)

imho the realy open point of discussion is where and how to manage the lists of the stdLib files.

although its scary i can imagine a way of keeping track from a thread in forum, but a cleaner solution, such as a stream of data is more likeable.

the manager software itself should be a ahk script, of course. but should be extensible, too. i have prepared something for this which will be released in the next days (an extensible ahk framework script).

well
my 2 cents

8)
dR

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2010, 10:13 pm 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
i pestered titan about retrieving remote hashes from ahk.net. there once was such a feature but has silently been removed due to maintenance work. now a similar feature is online again.

Thank you, Titan

titan posted me a link for the filemanager on ahk.net which allows easily getting a sha1 hash from any remote file hosted on ahk.net only by knowing its path.

the following script shows how such a feature might be used (its a working sample)

Code:
; download the remote Sha1 hash
remoteURL := "http://www.autohotkey.net/xfm/api/sha1/?f=DerRaphael/tmp/demoScript.ahk"
URLDownloadToFile, % remoteURL, temp.dat
FileRead, remoteSha1, temp.dat

; Compute the local Sha1 hash
FileRead, sData, % A_ScriptName
LocalSha1 := hash( sData, StrLen( sData ), 4 )

if ( LocalSha1 != RemoteSha1 )
{
   MsgBox,16,Oh noes ... ,Remote File is different to local copy!
}
Else
{
   MsgBox,48,Happy happy! Joy Joy!,Remote File is same as local copy
}

; Laszlo: http://www.autohotkey.com/forum/topic17853.html#113252
HASH(ByRef sData, nLen, SID = 3) { ; SID = 3: MD5, 4: SHA1
   DllCall("advapi32\CryptAcquireContextA", UIntP,hProv, UInt,0, UInt,0, UInt,1, UInt,0xF0000000)
   DllCall("advapi32\CryptCreateHash", UInt,hProv, UInt,0x8000|0|SID, UInt,0, UInt,0, UIntP, hHash)

   DllCall("advapi32\CryptHashData", UInt,hHash, UInt,&sData, UInt,nLen, UInt,0)

   DllCall("advapi32\CryptGetHashParam", UInt,hHash, UInt,2, UInt,0, UIntP,nSize, UInt,0)
   VarSetCapacity(HashVal, nSize, 0)
   DllCall("advapi32\CryptGetHashParam", UInt,hHash, UInt,2, UInt,&HashVal, UIntP,nSize, UInt,0)

   DllCall("advapi32\CryptDestroyHash", UInt,hHash)
   DllCall("advapi32\CryptReleaseContext", UInt,hProv, UInt,0)

   IFormat := A_FormatInteger
   SetFormat Integer, H
   Loop %nSize%
      sHash .= SubStr(*(&HashVal+A_Index-1)+0x100,-1)
   SetFormat Integer, %IFormat%
   Return sHash
}


The same copy of this script has been uploaded to http://www.autohotkey.net/~DerRaphael/tmp/demoScript.ahk

so if you copied the script from this post and accidentically added a space or linefeed too much, it'll throw an error.

Using this basic technique, as showed here, its possible to keep track of changes of remotes scripts without the need for any additional informations except where to grab the source.

so all an stdLib maintenance script needs to know is wherefrom get the latest source. using basically the same idea, but to the cost of traffic can be used for scritps, which are only available from forum. eg: download the threadpage, scissor the script with regex and compare the sha1 for local and scissored copy.

again, only the source is needed. any other information, such as category, last updates etc are a bonus, but not a must (allthough i'd love to see such information available)

8)
dR

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2010, 10:55 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
The difference of your implementation is, that it is online. Whereas I was thinking of a simple offline database. Your solution sounds very interesting. Btw, here is my workaround solution until someone do it better:

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 9:57 am 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
Tuncay wrote:
The difference of your implementation is, that it is online. Whereas I was thinking of a simple offline database. Your solution sounds very interesting. Btw, here is my workaround solution until someone do it better:


Thx, Tuncay for publishing that script. The Problem i see with that is that most athors, such as Sean, or Titan don't want to have their scripts published by a third party. The major problem with such a strategy that people who use your script depend on you that you keep it up to date with every release or bug fix of each library. This is a huge Task especially when more than just a few libraries are to be included.

Using an Index will only list these libraries and the user decides whether to download, upgrade or install or not to. without downloading all libs and deciding afterwards which to use.

Greets
dR

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 10:25 am 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Quote:
The Problem i see with that is that most athors, such as Sean, or Titan don't want to have their scripts published by a third party.

Who said that? Such a compilation will make the scripts more popular. If someone do not want that I include them in this collection, then I will remove them of course. Or should I ask allways for permission where any doubt exists?

In example Titans default license allows me to republish, or not? And what about to people if they make a script where one library is needed, should he not include it with the project?

Quote:
The major problem with such a strategy that people who use your script depend on you that you keep it up to date with every release or bug fix of each library. This is a huge Task especially when more than just a few libraries are to be included.

You are right at that point. But it is open for every one. If I someday decide to not make updates anymore, then someone other could do that. The main work is with the ini file and the file system and not the default Gui script, which is included in the archive.

But it have also advantages. The collection is reviewed and all parts are organized in a standadized way. It brings everything together with an intuitive user interface. No internet connection is needed. Links to their home are provided. It is currently our only solution. We have nothing to lose.

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 11:41 am 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
DerRaphael wrote:
The Problem i see with that is that most athors, such as Sean, or Titan don't want to have their scripts published by a third party.
I should clarify what I meant. Under your proposal stdlib scripts would be silently downloaded and automatically updated on a users computer. It could be modified by anyone and the end user would not know what happened to it or where it came from. This is permitted under the open source license and I do not have any issue with my work being used in this way. However Tuncay's approach is more friendly, people can view the code, documentation, examples and the original authors discussion thread in 1-click. Users immediately know where they can post feedback and who to give credit. This is more in tune with the FOSS community spirit and most developers would be glad to see their work publicised.

Back on topic, your policy for submission looks daunting to casual developers and would be potential candidates. Most information can already be found from their forum post such as the name, author, location and comments. Often the version number is also specified in the script but if not, the last edit date on the post could be used. It could be a problem if a script is unlicensed, but one could simply ask the author for permission to reuse. KISS.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 11:58 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
dR wrote:
Quote:
, so any interested user will start the script, grab the latest stdLib channel news and choose which scripts to download
so it would be something similar to Tuncays script with info where possible but no automatic downloads or installations as far as I understand it.

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 12:04 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
hugov wrote:
it would be something similar to Tuncays script
I was following up a discussion we had on IRC.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 12:43 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
I see, I wouldn't like automatic install/updates either. Don't visit IRC and never will, guess i miss out :wink:

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 12:57 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
hugov wrote:
Don't visit IRC and never will
Out of curiosity is there any reason in particular?

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 2:38 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Titan wrote:
the last edit date on the post could be used

That is what most people would do. But last post edit dont mean the script was updated. And often there are only links to scripts, where the last post edit does not mean anything (like majkinetor do it often, but he has very good docu with all related info). If the script is packed in an archive, then last edit time of file can be used.
If the file would be saved with save as... dialog, then the file will be counted as a new file and the last edit information is gone.

I will do definetely some improvements, like hashing if file is existing already. And a documentation will follow, explaining what the script does, how to work with it and the ini file format.

Do you think i should ask for permission to republish before adding? Or is it enough if I add it to the collection and ask afterwards if it is ok?

Titan wrote:
However Tuncay's approach is more friendly, people can view the code, documentation, examples and the original authors discussion thread in 1-click. Users immediately know where they can post feedback and who to give credit. This is more in tune with the FOSS community spirit and most developers would be glad to see their work publicised.

Thx, that is exactly what I mean with the advantages.

Pss: Titan, i have chatted in the IRC last night. Tried to help someone, but he did not know any basics of ahk. I made scripts for him with comments and explained. It was so hard. My head creashed.

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2010, 4:01 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Perhaps useful tool related to this is Zipweb as just posted by n-l-i-d here http://www.autohotkey.com/forum/viewtop ... 302#335302
Quote:
... utility for viewing the index of remote ZIP packages located on HTTP servers without downloading them... so for example is possible to download a text file of 2 kilobytes from a ZIP file of 3 gigabytes in a couple of seconds

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 2:17 pm 
hugov wrote:
dR wrote:
Quote:
, so any interested user will start the script, grab the latest stdLib channel news and choose which scripts to download
so it would be something similar to Tuncays script with info where possible but no automatic downloads or installations as far as I understand it.


the default startup mode wont include any downloads except the official channel news update. however i'd love to see a custom channel mode, where users recommend (or present by means) their own collection of stdLib scripts, which could be installed with a single mouseclick. again the installation will only retrieve the official sources, not any precompiled packages (only precompiled index listings) such a pIndex (precompiled Index) could be included with the standard stdlib maintenance script or even with the ahk distribution itself (same way the syntax hiliting is included).

greets
dR


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 5:03 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Titan wrote:
hugov wrote:
Don't visit IRC and never will
Out of curiosity is there any reason in particular?

One reason could be that in the forum the help and discussion is saved.

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2010, 9:41 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
awesome but how will you deal with updates to libraries such as COM

Dont get me wrong this is awesome but for some things perhaps an downloader for the libraries

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You can post new topics in this forum
You can 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:
Powered by phpBB® Forum Software © phpBB Group