 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
derRaphael
Joined: 23 Nov 2007 Posts: 841 Location: ~/.
|
Posted: Mon Feb 22, 2010 9:23 pm Post subject: |
|
|
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
dR _________________
All scripts, unless otherwise noted, are hereby released under CC-BY |
|
| Back to top |
|
 |
derRaphael
Joined: 23 Nov 2007 Posts: 841 Location: ~/.
|
Posted: Tue Feb 23, 2010 9:13 pm Post subject: |
|
|
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)
dR _________________
All scripts, unless otherwise noted, are hereby released under CC-BY |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
Posted: Thu Feb 25, 2010 9:55 pm Post subject: |
|
|
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! <-- |
|
| Back to top |
|
 |
derRaphael
Joined: 23 Nov 2007 Posts: 841 Location: ~/.
|
Posted: Fri Feb 26, 2010 8:57 am Post subject: |
|
|
| 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 _________________
All scripts, unless otherwise noted, are hereby released under CC-BY |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
Posted: Fri Feb 26, 2010 9:25 am Post subject: |
|
|
| 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! <-- |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Fri Feb 26, 2010 10:41 am Post subject: |
|
|
| 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. _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
Posted: Fri Feb 26, 2010 10:58 am Post subject: |
|
|
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 Wiki FAQ
TF : Text files & strings lib, TF Forum |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Fri Feb 26, 2010 11:04 am Post subject: |
|
|
| hugov wrote: | | it would be something similar to Tuncays script | I was following up a discussion we had on IRC. _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Fri Feb 26, 2010 11:57 am Post subject: |
|
|
| hugov wrote: | | Don't visit IRC and never will | Out of curiosity is there any reason in particular? _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
Posted: Fri Feb 26, 2010 1:38 pm Post subject: |
|
|
| 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! <-- |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
|
| Back to top |
|
 |
dR* Guest
|
Posted: Sat Feb 27, 2010 1:17 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
Posted: Sat Feb 27, 2010 4:03 pm Post subject: |
|
|
| 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! <-- |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Mon Mar 01, 2010 8:41 pm Post subject: |
|
|
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 _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|