Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Making a reusable toolkit for writing seesaw scripts

License

NotificationsYou must be signed in to change notification settings

ArchiveTeam/seesaw-kit

Repository files navigation

An asynchronous toolkit for distributed web processing. Written in Python and named after its behavior, it supports concurrent downloads, uploads, etc.

This toolkit is well-known forArchive Team projects. It also powers theArchive Team warrior.

Build StatusCoverage Status

Installation

Requires Python 2 or 3.

Needs the Tornado library for event-driven I/O. The complete list of Python modules needed are listed in requirements.txt.

How to try it out

To run the example pipeline:

sudo pip install -r requirements.txt./run-pipeline --help./run-pipeline examples/example-pipeline.py someone

Point your browser tohttp://127.0.0.1:8001/.

You can also userun-pipeline2 orrun-pipeline3 to be explicit for the Python version.

Overview

General idea: a set ofTasks that can be combined into aPipeline that processesItems:

  • AnItem is a thing that needs to be downloaded (a user, for example). It has properties that are filled by theTasks.
  • ATask is a step in the download process: it takes an item, does something with it and passes it on. Example Tasks: getting an item name from the tracker, running a download script, rsyncing the result, notifying the tracker that it's done.
  • APipeline represents a sequence ofTasks. To make a seesaw script for a new project you'd specify a newPipeline.

ATask can work on multipleItems at a time (e.g., multiple Wget downloads). The concurrency can be limited by wrapping the task in aLimitConcurrencyTask: this will queue the items and run them one-by-one (e.g., a single Rsync upload).

ThePipeline needs to be fed emptyItem objects; by controlling the number of activeItems you can limit the number of items. (For example, add a new item each time an item leaves the pipeline.)

With theItemValue,ItemInterpolation andConfigValue classes it is possible to pass item-specific arguments to theTask objects. The value of these objects will be re-evaluated for each item. Examples: a path name that depends on the item name, a configurable bandwidth limit, the number of concurrent downloads.

Consultthe wiki for more information.

About

Making a reusable toolkit for writing seesaw scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp