Skip to content

Implemento oloquinho slow e fast#16

Open
devinvestidor wants to merge 2 commits into
oloquinho:masterfrom
devinvestidor:master
Open

Implemento oloquinho slow e fast#16
devinvestidor wants to merge 2 commits into
oloquinho:masterfrom
devinvestidor:master

Conversation

@devinvestidor

Copy link
Copy Markdown

Implementando funcionalidade indispensável slow e fast.

npm run start-slow
npm run start-fast

@luanorlandi luanorlandi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não testei ainda os audios, vejo a noite

Acho que podemos melhorar o uso de parametros aqui, talvez alguma lib para isso ou seguir um exemplo

Comment thread README.md
@@ -1,5 +1,5 @@
# 'Oloquinho' Command Line Sound
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essa parte você editou manualmente?

Ela é gerada automaticamento com o allcontributors, daí não precisamos editar

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luanorlandi editei manualmente... Pensei que precisava

Comment thread package.json
"start": "node index.js"
"start": "node index.js default",
"start-slow": "node index.js slow",
"start-fast": "node index.js fast"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No CLI global como ficaria esses comandos?

Acho que seria uma boa colocar como parâmetros, por exemplo:

$ npm install -g oloquinho
$ oloquinho --slow

Mantendo o original, e permitindo mais variações que outros quiserem contribuir

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teoricamente o original não foi alterado. Testei apenas na máquina e não via cli global...

Na prática para iniciar o projeto, temos 3 opções:

npm start (nessa foi adicionado apenas um parâmetro no package)
npm run start-slow
npm run start-fast

Sobre o CLI global, eu nunca publiquei nada lá. Mas creio que essa alteração não irá alterar o comportamento original. Poderias publicar para testarmos. :)

@victorperin

Copy link
Copy Markdown
Member

Aeww @karanalpe, valeu pela contribuição.

Eu fiz um review, aqui (ao mesmo tempo do luan hehe). Acredito que o ideal seja discutirmos antes em uma issue, qual seria a melhor maneira de se fazer isso.

@victorperin victorperin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karanalpe, você pode criar uma issue para discutirmos a melhor forma de implementar isso? Pois a gente podia deixar mais simples essa implementação. :)

Comment thread README.md

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
<table><tr><td align="center"><a href="http://luanorlandi.github.io"><img src="https://avatars1.githubusercontent.com/u/6919329?v=4" width="100px;" alt="Luan Orlandi"/><br /><sub><b>Luan Orlandi</b></sub></a><br /><a href="https://github.com/oloquinho/oloquinho/commits?author=luanorlandi" title="Code">💻</a></td><td align="center"><a href="https://brorlandi.github.io"><img src="https://avatars2.githubusercontent.com/u/1594658?v=4" width="100px;" alt="Bruno Orlandi"/><br /><sub><b>Bruno Orlandi</b></sub></a><br /><a href="https://github.com/oloquinho/oloquinho/commits?author=BrOrlandi" title="Code">💻</a></td><td align="center"><a href="http://victorperin.ninja"><img src="https://avatars2.githubusercontent.com/u/5847145?v=4" width="100px;" alt="Victor Perin"/><br /><sub><b>Victor Perin</b></sub></a><br /><a href="https://github.com/oloquinho/oloquinho/commits?author=victorperin" title="Code">💻</a></td><td align="center"><a href="https://github.com/igoventura"><img src="https://avatars0.githubusercontent.com/u/10341129?v=4" width="100px;" alt="Igo Ventura"/><br /><sub><b>Igo Ventura</b></sub></a><br /><a href="https://github.com/oloquinho/oloquinho/commits?author=igoventura" title="Code">💻</a> <a href="https://github.com/oloquinho/oloquinho/issues?q=author%3Aigoventura" title="Bug reports">🐛</a></td></tr></table>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Por favor, não edite manualmente essa parte. É o bot que é responsável por isso.

Comment thread index.js
const args = process.argv.slice(2);
const mainPath = path.dirname(fs.realpathSync(__filename))
const soundPath = path.join(mainPath, './oloquinho')
const soundPath = path.join(mainPath, `./oloquinho-${args[0]}`)

@victorperin victorperin Apr 26, 2019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acho que essa abordagem de colocar o audio mais rápido e mais devagar interessante, porém, não acho que essa seja a melhor maneira de fazer isso.

Isso torna nosso pacote bem maior e acaba deixando as coisas mais confusas. (pra cada nova alteração teria um audio novo, o que torna a coisa mais difícil de escalar.

Sei que no linux, da pra adicionar um parâmetro para mudar essa velocidade de reprodução, mas ainda não sei se da pra fazer isso no windows. (Acredito que o mistério está no vbs... haha)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victorperin seria massa tentar fazer a edição desse áudio tendo apenas um arquivo. Dessa maneira o pacote ficaria pequeno.

Comment thread package.json
"scripts": {
"start": "node index.js"
"start": "node index.js default",
"start-slow": "node index.js slow",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não acho que essa abordagem de start-slow ou start-fast seja interessante, pois não da pra acessar ao rodar como comando.

Acredito que a solução seja acessar por parâmetros e também como propriedades (caso alguém queira usar como dependencia)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #18 criada

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

Successfully merging this pull request may close these issues.

3 participants