little tasks, little python scripts.
- [About] (#about)
- [Demo] (#demo)
- [Features] (#features)
- [Installation] (#installation)
- [Usage] (#usage)
- [Development] (#development)
- [Change log] (#change-log)
- [License] (#license)
- [Credits] (#credits)
- [Authors] (#authors)
Some python scripts to do some tasks:
- acoes.py: Command Line Tool that scrapes any brazilian stock price from UOL website.
- cartola.py: a bot to send Telegram messages about Cartola-FC.
See acoes.py
in action:
See cartola.py
in action:
There are some pros in this repository:
- Small repository;
- Uncomplicated python code;
- One script to one task;
Maybe we have more :)
The acoes.py needs:
And cartola.py needs:
- python 3;
- python-telegram-bot (
pip install python-telegram-bot
); - subprocess (It is a Python built in, it cames in Python standard library);
- logging (It is a Python built in, it cames in Python standard library);
In four steps:
- Download this project (here in a zip file);
- Unzip its folder in your local machine;
- Open the folder in a terminal (shell);
- Run any commands showed in next section.
Open the Terminal (shell) and, go to the project folder that contains the script to be executed.
To run acoes.py:
- In the Terminal, type:
python acoes.py
- When showing
Código da ação:
message, type the stock ticker to be searched with quotes, eg.'petr3.sa'
or,'vale5.sa'
or,'CIEL3.SA'
or,'EZTC3.SA'
. - The script will search the stock on UOL website and return one of the two cases:
- If not found the stock ticker, it returns this message:
Nenhum dado encontrato para esse código
. - Else, if found the stock ticker, the script scrapes web data and shows the stock price in the terminal like this:
- If not found the stock ticker, it returns this message:
Resultado da consulta:
---------------------
Data: 24 Oct. 2016
Horário: 18:09
---------------------
Ação: PETROBRAS ON
Code: petr3.sa
Isin: BRPETRACNOR9
Status: alta
Último Valor: 19,38
Maior Valor: 19,72
Menor Valor: 19,07
Abertura: 19,52
Volume: 16.685.500
After all, the script closes itself, automatically.
To run cartola.py:
(blank)
Its simple!
Have you issues and questions? Then go and write in our Github Repository issue tracker and let's discuss it! :)
And want you to develop some code? So go and send it to our Github Pull Request to be checked and accepted!
Nothing! We have not any test classes. :(
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
[0.4.0] - 2016-10-24
Added
- Included
Demo
section onREADME.md
file.
Changed
- Included changes in
Change log
section onREADME.md
file. - Break big code-lines in
acoes.py
for readability.
Fixed
- Deleted blank spaces in
acoes.py
file that bugging it. - Corrected portuguese grammar typos in
acoes.py
file.
[0.3.0] - 2016-10-23
Added
- Included
README.md
file.
[0.2.0] - 2016-10-19
Added
- Included
cartola.py
file.
[0.1.0] - 2016-05-06
Added
- Included
acoes.py
file.
This project, named Python, is avaliable under the following license: licence_name.
Acknowledgment to the following people and projects:
acoes.py
based on (blank).cartola.py
based on (blank).README.md
file inspired by many projects in Awesome-readme repository, and in PurpleBooth/README-Template.md, and by Daniel Bader's article.
Thanks to everyone!
This project is authored by:
- Name (nick): Guilherme (ggrigon)
- Website: http://www.pequenasnotaveis.com.br/
- Email: [email protected]
- Github: https://github.com/ggrigon
- Bitbucket: (blank)
- Twitter: (blank)
- Facebook: (blank)