Hi @Stephenjqz !
I've been trying to do this lately... i'm sure others can assist, but you can pull the HTML or Text content out using the Generic Query Editor (see screenshots attached) or using Deliveries->export fields using the same sort of criteria. Not the most elegant but a good start for a one off export/download of HTML.



I also have written some draft javascript code below to get the HTML filzesize in KB for deliveries (raw total size, includes all personalisation blocks for example so may not be the final size that a customer receives in their inbox) which you can take or leave below (i;m sure it can be written more elegantly).
-------
function getByteLen(normal_val)
{
// Force string type
normal_val = String(normal_val);
// Split original string into array
var normal_pieces = normal_val.split('');
// Get length of original array
var normal_length = normal_pieces.length;
// Declare array for encoded normal array
var encoded_pieces = new Array();
// Declare array for individual byte pieces
var byte_pieces = new Array();
// Loop through normal pieces and convert to URL friendly format
for(var i = 0; i <= normal_length; i++)
{
if(normal_pieces[i] && normal_pieces[i] != '')
{
encoded_pieces[i] = encodeURI(normal_pieces[i]);
}
}
// Get length of encoded array
var encoded_length = encoded_pieces.length;
// Loop through encoded array
// Scan individual items for a %
// Split on % and add to byte array
// If no % exists then add to byte array
for(var i = 0; i <= encoded_length; i++)
{
if(encoded_pieces[i] && encoded_pieces[i] != '')
{
// % exists
if(encoded_pieces[i].indexOf('%') != -1)
{
// Split on %
var split_code = encoded_pieces[i].split('%');
// Get length
var split_length = split_code.length;
// Loop through pieces
for(var j = 0; j <= split_length; j++)
{
if(split_code[j] && split_code[j] != '')
{
// Push to byte array
byte_pieces.push(split_code[j]);
}
}
}
else
{
// No percent
// Push to byte array
byte_pieces.push(encoded_pieces[i]);
}
}
}
// Array length is the number of bytes in string
var byte_length = byte_pieces.length;
return byte_length;
}
var query = xtk.queryDef.create(
<queryDef schema="nms:delivery" operation="select">
<select>
<node expr="@id"/>
<node expr="@label"/>
</select>
<where>
<condition bool-operator="AND">
<condition expr="@id > 100000000"/>
<condition expr="@id < 110000000"/>
</condition>
</where>
</queryDef>)
var res = query.ExecuteQuery()
var i = 0;
for each (var delivery in res.delivery)
{
i++;
var id = delivery.@id.toString();
var content = nms.delivery.get(id).content.html.source;
/* logInfo(delivery.@label.toString() + " - Size KB : " + (getByteLen(content)/1024).toFixed()) */
logInfo(delivery.@id.toString() + "|" + (getByteLen(content)/1024).toFixed())
if(i > 10)
break;
}
Cheers,
David