ZyX, document autoget.py briefly

Issue #75 resolved
marco-oweber created an issue

Can you add a high level overview what that code exactly does? The description can be very short but should contain the source of the repositories.

I imagine something like this:

# autoget.py: queries github and tries to associate github urls with vim script 
numbers by matching script names using some regular expression magic

Looks like one association is wrong: https://github.com/MarcWeber/vim-addon-manager-known-repositories/issues/73

Do you have time to have a quick look at which is likely to be the right fix?

Comments (7)

  1. ZyX_I
    # autoget.py: queries github and tries to associate github urls with vim script 
    numbers by matching script names using some regular expression magic
    

    Nothing near this. It downloads archive from www.vim.org and determines a list of file names. Then it checks whether list of file names obtained from the archive is contained in the one in the repository. If it is not, it performs the same check, but for .vim, .py, .pm, .lua and some other files only. Repository name only alters order of checking repository URLs in case there is more then one found.

  2. marco-oweber reporter

    In the repository ? Which repository URLS are matched against sources from vim.sf.net?

  3. ZyX_I

    In the repository ? Which repository URLS are matched against sources from vim.sf.net?

    I do not understand. URLs are not matched against sources.

  4. ZyX_I

    Originally my script behaved correctly: it used URL where development goes (though I would expect it to use vim-scripts repo instead: name-based sorting worked, but it worked in reverse putting less likely candidates first). Maybe this is why there are exactly no vim-scripts matches in scm_generated.json.

    Now sorting is fixed, but candidate with name match is ignored due to it being in vim-scripts repo.

  5. Log in to comment