Git Product home page Git Product logo

make-prefetch's Introduction

Build Status Coverage Status

make-prefetch

This is a tool to generate prefetch statements for downloads in BigFix ActionScript.

Using a URL argument

Suppose you want to create a prefetch statement to download this picture of Hodor.

The easiest way to do this is to run make-prefetch.py on the URL:

$ make-prefetch.py http://i.imgur.com/YAUeUOG.jpg

That will output a prefetch statement to download the picture:

prefetch YAUeUOG.jpg sha1:ce842e0af799f2ba476511c8fbfdc3bf89612dd0 size:57656 http://i.imgur.com/YAUeUOG.jpg sha256:74f69205a016a3896290eae03627e15e8dfeba812a631b5e0afca140722a322b

However, the file will be downloaded as YAUeUOG.jpg on the client. To instead download it as hodor.jpg, you can use the --name argument:

$ make-prefetch.py --name hodor.jpg http://i.imgur.com/YAUeUOG.jpg

This will output the same prefetch statement as before, but it will be downloaded as hodor.jpg on the client.

prefetch hodor.jpg sha1:ce842e0af799f2ba476511c8fbfdc3bf89612dd0 size:57656 http://i.imgur.com/YAUeUOG.jpg sha256:74f69205a016a3896290eae03627e15e8dfeba812a631b5e0afca140722a322b

Using a file argument

Suppose you have already downloaded this picture of Hodor and you want to create a prefetch statement for it.

To do this, run make-prefetch.py on the file to generate a prefetch statement:

$ make-prefetch.py hodor.jpg

This will output a prefetch statement with http://REPLACEME as the URL:

prefetch hodor.jpg sha1:ce842e0af799f2ba476511c8fbfdc3bf89612dd0 size:57656 http://REPLACEME sha256:74f69205a016a3896290eae03627e15e8dfeba812a631b5e0afca140722a322b

To specify the URL to download the file from, you can use the --url argument:

$ make-prefetch.py hodor.jpg --url http://example.com/winterfell/hodor.jpg

This will output the same prefetch statement as before, but the URL will be http://example.com/winterfell/hodor.jpg.

prefetch hodor.jpg sha1:ce842e0af799f2ba476511c8fbfdc3bf89612dd0 size:57656 http://example.com/winterfell/hodor.jpg sha256:74f69205a016a3896290eae03627e15e8dfeba812a631b5e0afca140722a322b

Support

Any issues or questions regarding this software should be filed via GitHub issues.

make-prefetch's People

Contributors

briangreenery avatar gnawhleinad avatar ottumm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.