Method and system for packing and unpacking web pages
First Claim
1. A method for packing a page as a single file, the method comprising:
- receiving an indication that a user has selected through a shell or file dialog a page representation corresponding to a main markup language document of the page, and in response to receiving the indication, displaying a selectable representation associated with packaging the page into a single file;
receiving an indication that the user has selected the representation associated with packaging the page into a single file;
in response to receiving the selection associated with packaging the page, making a determination as to whether the file includes at least one link to at least one resource file;
in response to a determination that the file includes at least one link to at least one resource file, packing the file and the at least one resource file into a single file;
wherein packing the file and the at least one resource file into a single file comprises;
storing a main markup language document of the page as a first component of the packaged file, the first component having a first content-location description corresponding to the location of the main markup language document,storing the at least one resource file as a second component of the packaged file, the second component having a second content-location description corresponding to the location of the at least one resource file, andwherein the first content-location description and the second content-location description define a folder structure corresponding to locations of the file and the resource file in relation to each other; and
displaying a representation of the packaged page file in the shell or file dialog containing the page representation corresponding to the main markup language document of the page;
determining whether the user desires to unpack the main markup language document; and
in response to determining that the user desires to unpack the main markup language document;
extracting a leaf name from the content-location description to be used as the name of the main markup language document,comparing the content-location description of each MIME part of the single file with the content-location description of the main markup language part of the single file,creating a folder structure corresponding to the content-location descriptions of the main markup language document and the MIME parts, wherein the folder structure includes a generic folder for storage of supporting files that do not have a content-location description,for each MIME part, determining if the supporting file is in the same folder as the main markup language document or in a subfolder below the main file,if the supporting file is in the same folder as the main markup language document or in a subfolder below the main file, converting the MIME part into HTML and saving the supporting file in the folder desiginated by the content-location description, andif the supporting file is not in the same folder as the main markup language document and is not in a subfolder below the main file, converting the MIME part into HTML and saving the supporting file in the generic folder.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for packing the multiple files and folders of an HTML Web page into a single MHTML file. The packing process begins by determining whether the user has write privileges to the current location. If not, the user is prompted to save the MHTML file in an alternate location (e.g., the desktop). If the user has write privileges to the current location, the process opens the main HTML Web page and searches for supporting resource files. In short, the supporting resource files are identified by searching for known, common resource file references in the main HTML source file. When the resource file references have been identified, the process packages the main HTML document and all of the supporting resource files into a single file in MHTML format. The unpacking process opens the MHTML file and identifies the main HTML document portion, as well as the portions of the MHTML file containing the supporting resource files. Once all of the components have been identified, the Web page'"'"'s folder structure is determined by referring to the content location field contained in each separate portion of the MHTML file. The individual MHTML components are converted into files and the main HTML file is stored. The resource files are stored in locations relative to the main HTML file, as identified by the unpacked folder structure.
11 Citations
11 Claims
-
1. A method for packing a page as a single file, the method comprising:
-
receiving an indication that a user has selected through a shell or file dialog a page representation corresponding to a main markup language document of the page, and in response to receiving the indication, displaying a selectable representation associated with packaging the page into a single file; receiving an indication that the user has selected the representation associated with packaging the page into a single file; in response to receiving the selection associated with packaging the page, making a determination as to whether the file includes at least one link to at least one resource file; in response to a determination that the file includes at least one link to at least one resource file, packing the file and the at least one resource file into a single file; wherein packing the file and the at least one resource file into a single file comprises; storing a main markup language document of the page as a first component of the packaged file, the first component having a first content-location description corresponding to the location of the main markup language document, storing the at least one resource file as a second component of the packaged file, the second component having a second content-location description corresponding to the location of the at least one resource file, and wherein the first content-location description and the second content-location description define a folder structure corresponding to locations of the file and the resource file in relation to each other; and displaying a representation of the packaged page file in the shell or file dialog containing the page representation corresponding to the main markup language document of the page; determining whether the user desires to unpack the main markup language document; and in response to determining that the user desires to unpack the main markup language document; extracting a leaf name from the content-location description to be used as the name of the main markup language document, comparing the content-location description of each MIME part of the single file with the content-location description of the main markup language part of the single file, creating a folder structure corresponding to the content-location descriptions of the main markup language document and the MIME parts, wherein the folder structure includes a generic folder for storage of supporting files that do not have a content-location description, for each MIME part, determining if the supporting file is in the same folder as the main markup language document or in a subfolder below the main file, if the supporting file is in the same folder as the main markup language document or in a subfolder below the main file, converting the MIME part into HTML and saving the supporting file in the folder desiginated by the content-location description, and if the supporting file is not in the same folder as the main markup language document and is not in a subfolder below the main file, converting the MIME part into HTML and saving the supporting file in the generic folder. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer-readable storage medium which stores a set of instructions which, when executed, performs a method for packing a page as a single file, the method executed by the set of instructions comprising:
-
receiving an indication that a user has selected through a shell or file dialog a page representation corresponding to a main markup language document of the page, and in response to receiving the indication, displaying a selectable representation associated with packaging the page into a single file; receiving an indication that the user has selected the representation associated with packaging the page into a single file; in response to receiving the selection associated with packaging the page, making a determination as to whether the file includes at least one link to at least one resource file; in response to a determination that the file includes at least one link to at least one resource file, packing the file and the at least one resource file into a single file; wherein packing the file and the at least one resource file into a single file comprises; storing a main markup language document of the page as a first component of the packaged file, the first component having a first content-location description corresponding to the location of the main markup language document, storing the at least one resource file as a second component of the packaged file, the second component having a second content-location description corresponding to the location of the at least one resource file, and wherein the first content-location description and the second content-location description define a folder structure corresponding to locations of the file and the resource file in relation to each other; and displaying a representation of the packaged page file in the shell or file dialog containing the page representation corresponding to the main markup language document of the page; in response to determining that the user desires to unpack the main markup language document, extracting a leaf name from the content-location description to be used as the name of the main markup language document, comparing the content-location description of each MIME part of the a single file with the content-location description of the main markup language part of the single file, creating a folder structure corresponding to the content-location descriptions of the main markup language document and the MIME parts, wherein the folder structure includes a generic folder for storage of supporting files that do not have a content-location description, for each MIME part, determining if the supporting file is in the same folder as the main markup language document or in a subfolder below the main file, if the supporting file is in the same folder as the main markup language document or in a subfolder below the main file, converting the MIME part into HTML and saving the supporting file in the folder designated by the content-location description, and if the supporting file is not in the same folder as the main markup language document and is not in a subfolder below the main file, converting the MIME part into HTML and saving the supporting file in the generic folder. - View Dependent Claims (8, 9, 10)
-
-
11. A system for packing a page as a single file, the system comprising:
-
a memory storage; and a processing unit coupled to the memory storage, wherein the processing unit is operative to; receive an indication that a user has selected through a shell or file dialog a page representation corresponding to a main markup language document of the page, and in response to receiving the indication, display a selectable representation associated with packaging the page into a single file; receive an indication that the user has selected the representation associated with packaging the page into a single file; in response to receiving the selection associated with packaging the page, make a determination as to whether the file includes at least one link to at least one resource file; in response to a determination that the file includes at least one link to at least one resource file, pack the file and the at least one resource file into a single file, the processing unit being operative to pack comprise the processing unit being operative to; store a main markup language document of the page as a first component of the packaged file, the first component having a first content-location description corresponding to the location of the main markup language document, store the at least one resource file as a second component of the packaged file, the second component having a second content-location description corresponding to the location of the at least one resource file, and wherein the first content-location description and the second content-location description define a folder structure corresponding to locations of the file and the resource file in relation to each other; display a representation of the packaged page file in the shell or file dialog containing the page representation corresponding to the main markup language document of the page; in response to determining that the user desires to unpack the main markup language document, extract a leaf name from the content-location description to be used as the name of the main markup language document, compare the content-location description of each MIME part of the a single file with the content-location description of the main markup language part of the single file, create a folder structure corresponding to the content-location descriptions of the main markup language document and the MIME parts, wherein the folder structure includes a generic folder for storage of supporting files that do not have a content-location description, for each MIME part, determine if the supporting file is in the same folder as the main markup language document or in a subfolder below the main file, if the supporting file is in the same folder as the main markup language document or in a subfolder below the main file, convert the MIME part into HTML and saving the supporting file in the folder designated by the content-location description, and if the supporting file is not in the same folder as the main markup language document and is not in a subfolder below the main file, convert the MIME part into HTML and saving the supporting file in the generic folder; the main markup language document of the page comprises a main HTML document of a Web page; the single file is an MHTML file; for each MIME part, determine if a leaf name can be extracted from the content-location description; if a leaf name for the supporting file can be extracted, save the supporting file with the leaf name in the folder designated by the content-location description; and if a leaf name for the supporting file cannot be extracted, assign the supporting file a name corresponding to the number of supporting files previously saved without an extracted leaf name, and attach a file extension corresponding to a content-type description stored with the supporting file as a component of the MHTML file.
-
Specification