将javadoc从一个doc站点转移到一个本地的zip文件 [英] Rip javadocs from a doc site to a local zip file

查看:119
本文介绍了将javadoc从一个doc站点转移到一个本地的zip文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有任何工具将javadocs从在线主机下载到本地文件。



我使用的在线文档倾向于拒绝客户端如eclipse,使工作变得困难,所以我需要将它们拉到我的机器上,并将它们附加到我的库jar。

解决方案

ol>

  • 首先,确保他们没有提供zip格式或类似的下载。


  • 然后,确保你实际上被允许这样做(这可能取决于你住在哪里,以及网站上提到的任何条件,你想要拉这个)。


  • 然后,查看 Wget 工具。它是GNU系统的一部分,因此包含在许多Linux发行版中,也可用于Windows和Mac,我想。


  • 这样的东西对我有用:

      wget --no-parent --recursive --level = inf  - 页面要求--wait = 1 
    http://epaul.github.com/jsch-documentation/simple.javadoc/

    (没有换行符。)



    在尝试此操作之前,请先查看手册中的每个选项。



    这个下载许多相同的 index.html副本,附加了名称(每个页面上的框架链接)。您可以通过添加 - 拒绝'index.html\?*'选项来删除这些文件,但仍然会首先下载(并检查递归链接) )。我还没有找到如何避免下载它们。 (请参阅与Serverfault 相关的问题的链接。)



    也许添加正确的递归级别将有助于这里(我没有尝试)。



    下载后,你可能会想压缩生成的目录以减少磁盘空间。使用您选择的zip工具。


    I'm wondering if there is any tool to "download" the javadocs from an online host to a local file.

    The online docs I am using tend to reject clients such as eclipse, making work difficult, so I need to pull them onto my machine and attach them to my library jar.

    解决方案

    1. First, make sure they don't already offer an download in zip form or similar.

    2. Then, make sure you are actually allowed to do this (this may depend on where you live, and on any conditions mentioned on the web site from where you want to pull this).

    3. Then, have a look at the Wget tool. It is part of the GNU system, thus included in many Linux distributions, but also available for Windows and Mac, I suppose.

    Something like this works for me:

    wget --no-parent --recursive --level=inf --page-requisites --wait=1 
       http://epaul.github.com/jsch-documentation/simple.javadoc/
    

    (without the line break.)

    Look up what each option does in the manual before trying this.

    This downloads lots of the same copy of the index.html file with appended ?... names (for the FRAMES links on each page). You can remove these files after downloading by adding the --reject 'index.html\?*' option, but they still will be downloaded first (and checked for recursive links). I did not yet find out how to avoid downloading them at all. (See this related question on Serverfault.)

    Maybe adding the right recursion level would help here (I didn't try).

    After downloading, you might want to zip the resulting directory to take less disk space. Use the zip tool of your choice for this.

    这篇关于将javadoc从一个doc站点转移到一个本地的zip文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆