<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Sean,<br>
<br>
I have just released another beta of ZendTo, 5.24-11.<br>
This includes the "autolist" command you wanted.<br>
I have also added some more documentation about the automation
scripts, which is at<br>
zend.to/automation<br>
which will give you some examples of how to use the commands.<br>
<br>
Cheers,<br>
Jules.<br>
<br>
<div class="moz-cite-prefix">On 27/05/2020 09:30, Jules via ZendTo
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:c915188f-6848-b7c5-22fd-6feeab41b7fc@Zend.To">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Sean,<br>
<br>
Would another "autolist" script that dumped the details of every
single drop-off in the system, as 1 big JSON structure, do what
you need?<br>
<br>
Then you can use your own code to search the data for the
drop-offs you're looking for, get the ClaimID and Passcode of the
relevant ones, then use "autopickup" to download them.<br>
<br>
Having that script exist at all is risky, in my view, as it gives
anyone who gets access to it "the keys to the castle vault". But
then again if, like most people, you're using SQLite3 then it's
just saving a hacker the step of working out how the DB schema
works. Which would take someone competent about 10 minutes. It's
very simple and obvious.<br>
<br>
Let me know if that would be a good solution for you.<br>
<br>
Cheers,<br>
Jules.<br>
<br>
<div class="moz-cite-prefix">On 26/05/2020 21:32, Cole, Sean
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:WM!05ee4173f06225109e8141622ea3584c71a3b31127b86b914947a85d1c85e0b7573e5b900eeaaaf6d0dd2da65b32987b!@mx.jul.es">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
<p>We are basically looking to have our students drop documents
off and don't want the staff to have to go to their email
click on the link to ZendTo, then download the file, then
place it in the folder where it has to go. We want o have an
automated process to check for any documents a student may
have dropped off every 10 minutes. Pick them up and put
them in the necessary folder on the server.</p>
<p> </p>
<p>Thanks for any help you can provide.</p>
<p>Sean Cole<font size="2"> </font></p>
<div style="color: rgb(0, 0, 0); font-family:
Calibri,Arial,Helvetica,sans-serif; font-size: 12pt;
background-color: rgb(255, 255, 255);" dir="ltr">
<hr tabindex="-1" style="width: 98%; display: inline-block;">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:
11pt;" face="Calibri, sans-serif" color="#000000"><b>From:</b>
Cole, Sean<br>
<b>Sent:</b> Tuesday, May 26, 2020 1:56 PM<br>
<b>To:</b> Jules; ZendTo Users<br>
<b>Subject:</b> Re: [ZendTo] AutoPickUp</font>
<div> </div>
</div>
<div>
<p>Each Drop-off has a different claimID and passcode so if
you have 10 drop-offs how can you automate the pickup if
you don't have the unique claimID and passcode for each of
the 10 drop-offs?</p>
<p> </p>
<p>Thanks Again for you help,</p>
<p>Sean Cole</p>
<p> </p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="width: 98%; display:
inline-block;">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:
11pt;" face="Calibri, sans-serif" color="#000000"><b>From:</b>
Jules <a class="moz-txt-link-rfc2396E"
href="mailto:Jules@Zend.To" moz-do-not-send="true"><Jules@Zend.To></a><br>
<b>Sent:</b> Saturday, May 23, 2020 5:41 AM<br>
<b>To:</b> ZendTo Users<br>
<b>Cc:</b> Cole, Sean<br>
<b>Subject:</b> Re: [ZendTo] AutoPickUp</font>
<div> </div>
</div>
<div>Sean,<br>
<br>
Before using any of the scripts, you need to create a
user that will be only used for driving the automation
scripts of ZendTo. Don't use a real user's account,
create one just for the purpose.<br>
Put that username in the 'automationUsers' setting in
preferences.php.<br>
<br>
For this example, let's set a few things:<br>
- The automation user is going to have the username "<tt>robot</tt>"
with a password of "<tt>machines</tt>".<br>
- The claimID and passcode of the drop-off will be "<tt>aaaClaimIDaaa</tt>"
and "<tt>bbbPasscodebbb</tt>".<br>
- The address of your ZendTo site will be "<tt><a
class="moz-txt-link-freetext"
href="https://your-zendto-site.com/"
moz-do-not-send="true">https://your-zendto-site.com/</a></tt>".
The site address always goes at the very end of the
command, after all the other options.<br>
<br>
To see the command-line usage:<br>
<tt> /opt/zendto/bin/autopickup --help</tt><br>
<br>
Fetch information about the drop-off, without
downloading anything:<br>
<tt> /opt/zendto/bin/autopickup --username "robot"
--password "machines" --claimid "aaaClaimIDaaa"
--passcode "bbbPasscodebbb" --list --nofiles <a
class="moz-txt-link-freetext"
href="https://your-zendto-site.com/"
moz-do-not-send="true">https://your-zendto-site.com/</a></tt><br>
<br>
Fetch all the files in the drop-off to the current
directory, verifying their checksums, and logging that
they were picked up by <a class="moz-txt-link-rfc2396E"
href="mailto:user@yourdomain.com"
moz-do-not-send="true">"user@yourdomain.com"</a>:<br>
<tt> /opt/zendto/bin/autopickup --username "robot"
--password "machines" --claimid "aaaClaimIDaaa"
--passcode "bbbPasscodebbb" --checksum --pickedupby <a
class="moz-txt-link-rfc2396E"
href="mailto:user@yourdomain.com"
moz-do-not-send="true">"user@yourdomain.com"</a></tt><tt>
<a class="moz-txt-link-freetext"
href="https://your-zendto-site.com/"
moz-do-not-send="true">https://your-zendto-site.com/</a></tt><br>
<br>
Fetch all the files in the drop-off to the directory
"/var/tmp/downloads", not bothering with checksums or
logging who did it:<br>
<tt> /opt/zendto/bin/autopickup --username "robot"
--password "machines" --claimid "aaaClaimIDaaa"
--passcode "bbbPasscodebbb" --output
"/var/tmp/downloads"</tt><tt> <a
class="moz-txt-link-freetext"
href="https://your-zendto-site.com/"
moz-do-not-send="true">https://your-zendto-site.com/</a></tt><br>
<br>
The output of the "--list --nofiles" command above will
give you a unique "fileid" number for each of the files
in the drop-off. So let's download file number 123,
verify its checksum and save it to the file
"~/Downloads/my-picked-up-file":<br>
<tt> /opt/zendto/bin/autopickup --username "robot"
--password "machines" --claimid "aaaClaimIDaaa"
--passcode "bbbPasscodebbb" --file 123 --checksum
--output "~/Downloads/my-picked-up-file"</tt><tt> <a
class="moz-txt-link-freetext"
href="https://your-zendto-site.com/"
moz-do-not-send="true">https://your-zendto-site.com/</a></tt><br>
<br>
If you are using a locally-signed SSL certificate on
your ZendTo server, you may need to add the option<br>
<tt> --insecure</tt><br>
to all of the above examples.<br>
<br>
To see the "curl" command it creates, which is what does
all the work, but not actually run anything, add the
option<br>
<tt> --debug</tt><br>
to any of the above examples.<br>
<br>
Does that help?<br>
<br>
The point of me using "curl" is that all the script
really does is create all the parameters for an HTTP
POST request to your ZendTo server, and then pull out
the JSON results from the right header in the returned
data. The "<tt>--debug</tt>" option will help you
understand what it's doing.<br>
<br>
Once you have played with it a bit, take a look how the
script works (90% is just parsing the command-line!) and
you will see how you could use a .Net http request to
achieve the same result with your own code running on a
Windows server.<br>
<br>
Cheers,<br>
Jules.<br>
<br>
<div class="moz-cite-prefix">On 22/05/2020 20:25, Cole,
Sean via ZendTo wrote:<br>
</div>
<blockquote type="cite">
<style type="text/css">
<!--
p
{margin-top:0px;
margin-bottom:0px}
-->
</style>
<p>Is anyone using the AutoPickUp Script? Any
documentation on the use of the script or examples.
Trying to move the files uploaded from the ZendTo
server to a Windows server.<br>
</p>
<p><br>
</p>
<p>Regards,<br>
</p>
<div id="Signature">
<div style="margin: 0px; font-family:
Calibri,Arial,Helvetica,sans-serif;"
name="divtagdefaultwrapper">
<div class="BodyFragment"><font size="2">
<div class="PlainText">
<p class="MsoNormal"><b><span>Sean Cole</span></b></p>
<p class="MsoNormal"><span>Mgr. Network
Services</span></p>
<p class="MsoNormal"><span style="color:
rgb(127, 127, 127); font-size: 10pt;"></span> </p>
<p class="MsoNormal"><span><a tabindex="0"
id="NoLP"
href="mailto:SeanCole@sunywcc.edu"
moz-do-not-send="true"><font
color="#0563c1">SeanCole@sunywcc.edu</font></a>
</span></p>
<p class="MsoNormal"><span>914-606-6923</span></p>
</div>
</font></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre">_______________________________________________
ZendTo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ZendTo@zend.to" moz-do-not-send="true">ZendTo@zend.to</a>
<a class="moz-txt-link-freetext" href="http://jul.es/mailman/listinfo/zendto" moz-do-not-send="true">http://jul.es/mailman/listinfo/zendto</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
The current UK shipping forecast:
Trafalgar: Northerly or northeasterly 5 to 7, occasionally 4 at first. Rough.
Rain or showers at first. Good, occasionally moderate at first.
<a class="moz-txt-link-abbreviated" href="http://www.Zend.To" moz-do-not-send="true">www.Zend.To</a>
Twitter: @JulesFM
</pre>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
'Intelligence is quickness to apprehend as distinct from ability,
which is capacity to act wisely on the thing apprehended.'
- Alfred North Whitehead
<a class="moz-txt-link-abbreviated" href="http://www.Zend.To" moz-do-not-send="true">www.Zend.To</a>
Twitter: @JulesFM
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
ZendTo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ZendTo@zend.to">ZendTo@zend.to</a>
<a class="moz-txt-link-freetext" href="http://jul.es/mailman/listinfo/zendto">http://jul.es/mailman/listinfo/zendto</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
'Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.
Though wise men at their end know dark is right,
Because their words had forked no lightning they
Do not go gentle into that good night.
Good men, the last wave by, crying how bright
Their frail deeds might have danced in a green bay,
Rage, rage against the dying of the light.
Wild men who caught and sang the sun in flight,
And learn, too late, they grieved it on its way,
Do not go gentle into that good night.
Grave men, near death, who see with blinding sight
Blind eyes could blaze like meteors and be gay,
Rage, rage against the dying of the light.
And you, my father, there on the sad height,
Curse, bless, me now with your fierce tears, I pray.
Do not go gentle into that good night.
Rage, rage against the dying of the light.'
- Dylan Thomas
<a class="moz-txt-link-abbreviated" href="http://www.Zend.To">www.Zend.To</a>
Twitter: @JulesFM
</pre>
</body>
</html>