Trang web ViệtUG hoạt động như một dự án tại http://viettug.org.
Bạn có thể đăng nhập với nickname như cũ nhưng phải lấy mật mã mới.
Tại trang web này, bạn có thể ĐỌC bài cũ nhưng không thể GỬI bài mới.
Trang nhà arrow Diễn đàn
Trang nhà
Tin mới
Diễn đàn
Tìm kiếm
Blog
Tải về
Wiki
** Lính mới **
** Dự án **
Đang xem
1 khách
hành động:

thực hiện cho box:
Chủ đề này trao đổi (thêm) về bài viết: ctan.tools: *nix script để tìm và tải gói từ ctan

bản 1.1.0 file:ctan_tools.zip được công bố. hỗ trợ tìm kiếm tập tin bất kỳ. sử dụng cache từ http://kyanh.net/. Biểu diễn thử nhé:

Tải về tập tin ntheorem.zip (ctan get ntheorem cũng cho kết quả tưong tự)
$ ctan get -file ntheorem.zip
:: http://ctan.org/tex-archive/macros/late … heorem.zip
::
Are you sure you want to download (y/N)?y::
:: downloading macros/latex/contrib/ntheorem.zip...
--18:54:41--  http://ctan.org/tex-archive/macros/late … heorem.zip
           => `ntheorem.zip'
Resolving ctan.org... 192.80.64.33
Connecting to ctan.org|192.80.64.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 375,158 (366K) [application/zip]

100%[=========================================================================================>] 375,158       84.40K/s    ETA 00:00

18:54:48 (84.33 KB/s) - `ntheorem.zip' saved [375158/375158]



Tìm gói có tên chứa `picin'
$ ctan grep picin
:: not package/file found


Không có gói nào như vậy. Thử tìm tập tin mà tên có chứa `picin'?

$ ctan grep -file picin
macros/latex209/contrib/picinpar.zip
macros/latex209/contrib/picinpar/picinpar.sty
macros/latex209/contrib/picinpar/picinpar.tex
macros/latex209/contrib/picins.zip
macros/latex209/contrib/picins/LIES.MICH
macros/latex209/contrib/picins/README.1st
macros/latex209/contrib/picins/extpic.sty
macros/latex209/contrib/picins/mandel.msp
macros/latex209/contrib/picins/mexhat1.msp
macros/latex209/contrib/picins/mexhat2.msp
macros/latex209/contrib/picins/mpic.dvi
macros/latex209/contrib/picins/picins.alt
macros/latex209/contrib/picins/picins.doc
macros/latex209/contrib/picins/picins.sty
macros/latex209/contrib/picins/picins.txt
systems/msdos/picins/picins.LIESMICH
systems/msdos/picins/picins.zip
systems/texlive/install/texmf-dist/tpm/picinpar.tpm
systems/win32/miktex/tm/packages/picinpar.cab
systems/win32/miktex/tm/packages/picins.cab


bla bla bla ...
bản 1.2.0 được công bố. sử dụng tập tin cache rất nhỏ (450 kb so với 2.5mb trước đây).

enjoy!
Bản 1.3.0 được công bố.

Tải về: file:ctan_tools.zip

Điểm mới:
1. tất cả đều được đệm (cache), ctan update nhanh hơn
2. có thể tự cập nhật (tải về 15MB từ CTAN)
ctan update --direct

Nếu muốn dùng cache (từ kyanh.net, đây là mặc định)
ctan update# hoặc
ctan update --use-cache

3. hỗ trợ option ngắn hơn để tìm file:
ctan fgrep <string> # tương đương với ctan grep -file <string>
ctan fget <string> # tương tự
viettug [32-14] 24/05/08:23 Jifty to access ctan
Bản 1.3.1 được công bố:
* fix lỗi typo
* hỗ trợ lzma (nếu trên máy có lzma). File cache khoảng 350k (so với 450k khi dùng dạng nén tar/bz2)

Tải về file:ctan_tools.zip
hoangoclan [15-5] 26/05/08:11 Re:Jifty to access ctan
Bác Kỳ Anh giỏi viết Shell Script thật, tool này chắc ngốn của bác nhiều thời gian lắm đây? Bác có thử đặt priority cho prozilla xem download speed có được cải thiện hơn không?
viettug [32-14] 26/05/08:17 Re:Jifty to access ctan
Cảm ơn bác

Đọc bài của bác khi tối mà chưa kịp trả lời: mới có điện lại nè.

Script đó tốn khoảng 1 ngày (vài tiếng đồng hồ lắt nhắt cộng lại). Giờ thì bản đó stable rồi. Đang suy nghĩ sang hướng khác của script.

Các gói latex thì khá nhỏ gọn (khoảng trăm ký), nên cũng không cần thiết dùng download accel. Tuy nhiên, nếu đó là nhu cầu thật sự thì /me sẽ chỉnh lại chút xíu.

Chúc bác vui vẻ (với vợ cả plus vợ bé plus vợ rất bé)