libreliodev / wordpress

Librelio Wordpress plug-in
0 stars 1 forks source link

Create script to handle uploaded files to AUT_ folder in S3 directory - Uncompress #22

Closed libreliodev closed 9 years ago

libreliodev commented 9 years ago

This script should be either triggered by an http request, or by wordpress-cron at the same time as lift-search updates

As a first step, the script should scan the AUT_ folder on the S3 folder, and uncompress all files

AlirezaAlgo commented 9 years ago

@libreliodev Are these files are zip files? Should we do the rest of procedure one at a time for each file?

libreliodev commented 9 years ago

@serverfire

Are these files are zip files?

Yes, the original files don't have .zipextension, but are zip files

Should we do the rest of procedure one at a time for each file?

The best option would be to group together all files with the same name (but different extension), and apply the complete script to this set of files.

AlirezaAlgo commented 9 years ago

@libreliodev

The best option would be to group together all files with the same name (but different extension), and apply the complete script to this set of files.

To clarify the process.

  1. Get the list of files in specified S3 directory.
  2. Group zip files as specified and for each group do the rest.

Then each group has a single [file_name]_toc_.xml and output is in a single directory named [file_name].

libreliodev commented 9 years ago

@serverfire This Is correct

AlirezaAlgo commented 9 years ago

@libreliodev It's almost done. I've to test it. Can you help me creating a test process? What we need.

  1. Access to a s3 bucket for read and write. (For specific directory is ok)
  2. A example document for uploading.

Thank you

libreliodev commented 9 years ago

@serverfire

You can use the current customer, and the credentials you already have. There are example files in the AUT_ folder.

AlirezaAlgo commented 9 years ago

@libreliodev Which Bucket and KeyPrefix([publisher]/[app])?

libreliodev commented 9 years ago

@serverfire See private answer

AlirezaAlgo commented 9 years ago

@libreliodev Done.

Things to do before testing.

composer update
grunt build:production

And set settings in librelio page.

Move uploaded zip files was not specified to where. So for now it's AUT_END_.

AlirezaAlgo commented 9 years ago

run script with http://[wpsite]/process_s3upload.php

libreliodev commented 9 years ago

@serverfire Have you updated the customer's site, or should we do it?

AlirezaAlgo commented 9 years ago

@libreliodev I've Installed it.

AlirezaAlgo commented 9 years ago

@libreliodev Unfortunately i stuck with a syntax error. I can fix it with ftp access to site.

libreliodev commented 9 years ago

@serverfire FTP credentials sent to you via private message. Please let us know when we can test.We tried running http://[wpsite]/process_s3upload.php but nothing seems to have happened

AlirezaAlgo commented 9 years ago

@libreliodev All ready for testing.

libreliodev commented 9 years ago

@serverfire Successfully tested

libreliodev commented 9 years ago

@serverfire

It was specified that

This script should be either triggered by an http request, or by wordpress-cron at the same time as lift-search updates

This does not seem to have been implemented. Can you please correct?

AlirezaAlgo commented 9 years ago

@libreliodev I'll setup wordpress-cron after other issues has solved.