Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.text.tex > #7599

Re: A Python script to put CTAN into git (from DVDs)

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <jfine@pytex.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '(using': 0.05; 'pointer': 0.05; 'python)': 0.05; 'repository': 0.05; 'subject:Python': 0.06; 'git': 0.07; 'see:': 0.07; 'url:bitbucket': 0.07; 'url:py': 0.07; 'versions.': 0.07; '[1]:': 0.09; 'of)': 0.09; 'url:36': 0.09; 'url:github': 0.09; 'package.': 0.12; 'things.': 0.13; 'users,': 0.13; 'cc:addr:python-list': 0.15; '(set': 0.16; 'mercurial.': 0.16; 'unpack': 0.16; 'meant': 0.16; 'linux': 0.17; 'wrote:': 0.18; 'modified': 0.18; 'archive': 0.21; '(but': 0.21; 'commit': 0.21; 'file,': 0.21; "doesn't": 0.23; '(on': 0.23; 'received:192.168.1.4': 0.23; 'tool,': 0.23; 'tree.': 0.23; 'header:In-Reply-To:1': 0.23; 'tree': 0.25; 'writes:': 0.25; '(in': 0.26; 'fine': 0.26; '"the': 0.26; "i'm": 0.26; 'putting': 0.27; 'martin': 0.28; 'bit': 0.28; 'import': 0.28; 'script': 0.28; "he's": 0.28; "skip:' 30": 0.28; 'cc:addr:python.org': 0.29; 'keeps': 0.30; 'url:src': 0.30; 'example': 0.30; 'installed': 0.30; "didn't": 0.30; "i'll": 0.31; 'thanks': 0.31; 'version': 0.31; 'earlier': 0.32; 'pretty': 0.32; 'quite': 0.32; "won't": 0.32; 'it.': 0.33; 'that,': 0.33; 'there': 0.33; 'header:User- Agent:1': 0.33; 'done': 0.33; 'checking': 0.34; 'done.': 0.34; 'probably': 0.34; 'identical': 0.34; 'packages,': 0.34; 'here,': 0.34; 'similar': 0.35; 'thank': 0.35; 'rather': 0.35; 'addition,': 0.36; 'cc:2**1': 0.36; 'skip:" 10': 0.36; 'jonathan': 0.36; 'pull': 0.36; 'hosting': 0.36; 'doing': 0.37; 'reference': 0.37; 'but': 0.37; 'using': 0.37; 'could': 0.38; 'put': 0.38; 'some': 0.38; 'easier': 0.38; 'perhaps': 0.38; 'url:org': 0.38; 'received:192': 0.38; "i'd": 0.39; 'define': 0.39; 'subject: (': 0.39; 'subject:: ': 0.39; 'change': 0.39; 'might': 0.39; 'files': 0.40; 'user': 0.40; 'really': 0.40; 'within': 0.60; 'per': 0.61; 'results': 0.61; 'hope': 0.61; 'published': 0.62; '2011': 0.62; 'took': 0.62; 'forward': 0.63; 'life': 0.63; 'direction.': 0.64; 'zip': 0.64; 'details': 0.64; 'here': 0.65; 'p.s.': 0.66; 'collection': 0.73; '"all': 0.84; 'bandwidth.': 0.84; 'different.': 0.84; 'latex': 0.84; 'look,': 0.84; 'snapshots': 0.84; 'subject:put': 0.84; 'tex': 0.84; 'trees.': 0.84; 'dvd': 0.88; 'follow.': 0.91; '100,000': 0.93
X-CM-Score 0.00
X-CNFS-Analysis v=2.0 cv=crMZYiEi c=1 sm=1 a=DjZMeTI4srlFSYBj8ex2iw==:17 a=drkSDUSQfzAA:10 a=sjtYlV3t_a8A:10 a=2-jFaxeq-9kA:10 a=evIkNGOUjnIA:10 a=crry0GulAAAA:8 a=xtERp6CFAAAA:8 a=-hrgbRRyAAAA:8 a=NEAV23lmAAAA:8 a=-IeYfsU7AAAA:8 a=tBjzHVtHYgjclG8XYisA:9 a=hA1tnEy_hriPjAkFDXQA:7 a=ebS1H2NBVeoA:10 a=nS3kShNHgVsA:10 a=DjZMeTI4srlFSYBj8ex2iw==:117
Date Sun, 06 Nov 2011 18:19:39 +0000
From Jonathan Fine <jfine@pytex.org>
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15
MIME-Version 1.0
Newsgroups comp.lang.python, comp.text.tex
To Jakub Narebski <jnareb@gmail.com>
Subject Re: A Python script to put CTAN into git (from DVDs)
References <4EB6A522.3020909@pytex.org> <mailman.2464.1320597747.27778.python-list@python.org>
In-Reply-To <mailman.2464.1320597747.27778.python-list@python.org>
Content-Type text/plain; charset=ISO-8859-4; format=flowed
Content-Transfer-Encoding 7bit
Cc python-list@python.org, git@vger.kernel.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.2469.1320603727.27778.python-list@python.org> (permalink)
Lines 96
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1320603727 news.xs4all.nl 6937 [2001:888:2000:d::a6]:58679
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:15387 comp.text.tex:7599

Cross-posted to 2 groups.

Show key headers only | View raw


On 06/11/11 16:42, Jakub Narebski wrote:
> Jonathan Fine<jfine@pytex.org>  writes:
>
>> Hi
>>
>> This it to let you know that I'm writing (in Python) a script that
>> places the content of CTAN into a git repository.
>>       https://bitbucket.org/jfine/python-ctantools
>
> I hope that you meant "repositories" (plural) here, one per tool,
> rather than putting all of CTAN into single Git repository.

There are complex dependencies among LaTeX macro packages, and TeX is 
often distributed and installed from a DVD.  So it makes sense here to 
put *all* the content of a DVD into a repository.

Once you've done that, it is then possible and sensible to select 
suitable interesting subsets, such as releases of a particular package. 
Users could even define their own subsets, such as "all resources needed 
to process this file, exactly as it processes on my machine".

In addition, many TeX users have a TeX DVD.  If they import it into a 
git repository (using for example my script) then the update from 2011 
to 2012 would require much less bandwidth.

Finally, I'd rather be working within git that modified copy of the ISO 
when doing the subsetting.  I'm pretty sure that I can manage to pull 
the small repositories from the big git-CTAN repository.

But as I proceed, perhaps I'll change my mind (smile).

>> I'm working from the TeX Collection DVDs that are published each year
>> by the TeX user groups, which contain a snapshot of CTAN (about
>> 100,000 files occupying 4Gb), which means I have to unzip folders and
>> do a few other things.
>
> There is 'contrib/fast-import/import-zips.py' in git.git repository.
> If you are not using it, or its equivalent, it might be worth checking
> out.

Well, I didn't know about that.  I took a look, and it doesn't do what I 
want.  I need to walk the tree (on a mounted ISO) and unpack some (but 
not all) zip files as I come across them.  For details see:
 
https://bitbucket.org/jfine/python-ctantools/src/tip/ctantools/filetools.py

In addition, I don't want to make a commit.  I just want to make a ref 
at the end of building the tree.  This is because I want the import of a 
TeX DVD to give effectively identical results for all users, and so any 
commit information would be effectively constant.

>> CTAN is the Comprehensive TeX Archive Network.  CTAN keeps only the
>> latest version of each file, but old CTAN snapshots will provide many
>> earlier versions.
>
> There was similar effort done in putting CPAN (Comprehensive _Perl_
> Archive Network) in Git, hosting repositories on GitHub[1], by the name
> of gitPAN, see e.g.:
>
>    "The gitPAN Import is Complete"
>    http://perlisalive.com/articles/36
>
> [1]: https://github.com/gitpan

This is really good to know!!!  Not only has this been done already, for 
similar reasons, but github is hosting it.  Life is easier when there is 
a good example to follow.

>> I'm working on putting old CTAN files into modern version
>> control. Martin Scharrer is working in the other direction.  He's
>> putting new files added to CTAN into Mercurial.
>>       http://ctanhg.scharrer-online.de/
>
> Nb. thanks to tools such as git-hg and fast-import / fast-export
> we have quite good interoperability and convertability between
> Git and Mercurial.
>
> P.S. I'd point to reposurgeon tool, which can be used to do fixups
> after import, but it would probably won't work on such large (set of)
> repositories.

Thank you for the pointer to reposurgeon.  My approach is a bit 
different.  First, get all the files into git, and then 'edit the tree' 
to create new trees.  And then commit worthwhile new trees.

As I recall the first 'commit' to the git repository for the Linux 
kernel was just a tree, with a reference to that tree as a tag.  But no 
commit.

> P.P.S. Can you forward it to comp.text.tex?

Done.

-- 
Jonathan

Back to comp.text.tex | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

A Python script to put CTAN into git (from DVDs) Jonathan Fine <jfine@pytex.org> - 2011-11-06 15:17 +0000
  Re: A Python script to put CTAN into git (from DVDs) Jonathan Fine <jfine@pytex.org> - 2011-11-06 18:19 +0000
    Re: A Python script to put CTAN into git (from DVDs) Jakub Narebski <jnareb@gmail.com> - 2011-11-06 21:28 +0100
      Re: A Python script to put CTAN into git (from DVDs) Jonathan Fine <jfine@pytex.org> - 2011-11-07 20:21 +0000
        Re: A Python script to put CTAN into git (from DVDs) Jakub Narebski <jnareb@gmail.com> - 2011-11-07 22:49 +0100
          Re: A Python script to put CTAN into git (from DVDs) Jonathan Fine <jfine@pytex.org> - 2011-11-07 22:03 +0000
      Re: A Python script to put CTAN into git (from DVDs) Jonathan Fine <jfine@pytex.org> - 2011-11-07 20:21 +0000
    Re: A Python script to put CTAN into git (from DVDs) Jakub Narebski <jnareb@gmail.com> - 2011-11-06 12:29 -0800
  Re: A Python script to put CTAN into git (from DVDs) Jonathan Fine <jfine@pytex.org> - 2011-11-06 18:19 +0000
  Re: A Python script to put CTAN into git (from DVDs) Sivaram Neelakantan <nsivaram.net@gmail.com> - 2011-11-07 00:21 +0530
    Re: A Python script to put CTAN into git (from DVDs) Jonathan Fine <jfine@pytex.org> - 2011-11-06 19:06 +0000
      Re: A Python script to put CTAN into git (from DVDs) Sivaram Neelakantan <nsivaram.net@gmail.com> - 2011-11-07 20:17 +0530
        Re: A Python script to put CTAN into git (from DVDs) Jonathan Fine <jfine@pytex.org> - 2011-11-07 20:32 +0000

csiph-web