Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP Metadata Crawler script #1

Open
davidonlaptop opened this issue Oct 20, 2015 · 0 comments
Open

FTP Metadata Crawler script #1

davidonlaptop opened this issue Oct 20, 2015 · 0 comments

Comments

@davidonlaptop
Copy link
Member

Write a script that crawls an FTP to collect recursively the metadata of the files.

Script input parameters:

  • FTP_Site (e.g. ftp://ftp.ncbi.nlm.nih.gov/)

Script output (TSV Format):

  • rows:
    • one row per file
  • columns:
    • directory (/snp/organisms/human_9606/VCF)
    • filename (00-All.vcf.gz)
    • linktarget (All_20150603.vcf.gz) e.g. for when the entry is a symbolic link.
    • filesize (19) in bytes
    • DateModified (2015-06-08T15:16:20Z) in ISO 8601 format in the UTC timezone.
    • other metadata available ?

Particular behavior

  • The script should throttle its speed so not to flood the FTP server with too many requests. A good rule of thumb would be not more than 4 requests per second. This should be a variable in the script.

Example

Example of how this script could be called:

./files-crawler.sh ftp://ftp.ncbi.nlm.nih.gov/   >  files.csv 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant