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

More Modular Code & Simpler CLI Output #497

Merged
merged 29 commits into from Jul 8, 2016

Conversation

Projects
None yet
4 participants
@joehand
Member

joehand commented Jul 5, 2016

CLI Goodness! https://www.youtube.com/watch?v=fxKjSyCoqO4

Fixed

  • Use yolowatch module for recursive live updates
  • Improved stats for edge cases
  • Print link with --quiet argument

Changed

  • Simplified and clean up CLI output, #491, #490
  • Improve modularity of library, #493

Removed

  • List download option (will be re-added pending a hyperdrive update)

Added

  • Use dat-encoding for 50 character links, #492

joehand added some commits Jun 20, 2016

@karissa

This comment has been minimized.

Show comment
Hide comment
@karissa

karissa Jul 5, 2016

Collaborator

Nice, thanks for the detailed changelog report. It's super important to document how things are changing, good work!

Collaborator

karissa commented Jul 5, 2016

Nice, thanks for the detailed changelog report. It's super important to document how things are changing, good work!

printSwarm()
})
dat.on('download-finished', function () {

This comment has been minimized.

@karissa

karissa Jul 7, 2016

Collaborator

this is a great interface

@karissa

karissa Jul 7, 2016

Collaborator

this is a great interface

function printStats (data) {
var stats = dat.stats
var files = stats.filesTotal

This comment has been minimized.

@karissa

karissa Jul 7, 2016

Collaborator

what items are on .stats and which are on .appendStats and which aren't on either?

@karissa

karissa Jul 7, 2016

Collaborator

what items are on .stats and which are on .appendStats and which aren't on either?

This comment has been minimized.

@joehand

joehand Jul 7, 2016

Member

@karissa they overlap and could definitely use some improvement/more thought. One issue I keep running into is showing files vs "items" (files + dirs), since hyperdrive uses the combined total for it's count (archive.metadata.blocks).

.appendStats is files, dirs, and bytes calculated on sharing start. .stats is always the current archive stats, which gets updated as files are appended (initially and live).

stats = {
    filesTotal: 0,
    bytesTotal: 0,
    bytesUp: 0,
    bytesDown: 0,
    rateUp: speedometer(),
    rateDown: speedometer()
}

appendStats = {
    files: 0,
    bytes: 0,
    dirs: 0
}
@joehand

joehand Jul 7, 2016

Member

@karissa they overlap and could definitely use some improvement/more thought. One issue I keep running into is showing files vs "items" (files + dirs), since hyperdrive uses the combined total for it's count (archive.metadata.blocks).

.appendStats is files, dirs, and bytes calculated on sharing start. .stats is always the current archive stats, which gets updated as files are appended (initially and live).

stats = {
    filesTotal: 0,
    bytesTotal: 0,
    bytesUp: 0,
    bytesDown: 0,
    rateUp: speedometer(),
    rateDown: speedometer()
}

appendStats = {
    files: 0,
    bytes: 0,
    dirs: 0
}

This comment has been minimized.

@ErieMeyer
@ErieMeyer

ErieMeyer via email Jul 7, 2016

This comment has been minimized.

@maxogden

maxogden Jul 7, 2016

Member

@ErieMeyer ERIE YOU CREEPER

@maxogden

maxogden Jul 7, 2016

Member

@ErieMeyer ERIE YOU CREEPER

This comment has been minimized.

@karissa

karissa Jul 7, 2016

Collaborator

I'm happy with this! We could just document these values in the README (if we want, even though it's not a public API) and ship it! :)

@karissa

karissa Jul 7, 2016

Collaborator

I'm happy with this! We could just document these values in the README (if we want, even though it's not a public API) and ship it! :)

Show outdated Hide outdated commands/download.js
@karissa

This comment has been minimized.

Show comment
Hide comment
@karissa

karissa Jul 7, 2016

Collaborator

lgtm

Collaborator

karissa commented Jul 7, 2016

lgtm

@joehand joehand merged commit 6b6e6b6 into master Jul 8, 2016

2 of 4 checks passed

continuous-integration/appveyor/branch AppVeyor build failed
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@joehand joehand deleted the logger-module branch Jul 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment