This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from peewee import * | |
from peewee import SqliteDatabase, Model, TextField, ForeignKeyField | |
import xmltodict | |
import glob, os | |
database = SqliteDatabase('C:\\DadosNFeasy\\Data\\NfEasy2.db') | |
class UnknownField(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My traceback | |
''' | |
<class 'kivy.core.image.Image'> | |
Traceback (most recent call last): | |
File "/home/elias/Documentos/PROGRAMACAO/1-PYTHON/1-KIVY/PROJETOS/1-KIVYMD/Curso/Desk/main.py", line 126, in <module> | |
AppDesktop().run() | |
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/app.py", line 949, in run | |
self._run_prepare() | |
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/app.py", line 919, in _run_prepare | |
root = self.build() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[app] | |
# (str) Title of your application | |
title = Inventario | |
# (str) Package name | |
package.name = inventario | |
# (str) Package domain (needed for android/ios packaging) | |
package.domain = org.coutinho |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vamos adicionar um campo personalizado ao nosso widget com RecycleView | |
# Logo acima da Screen criei um campo personalizado, ele pode estar em | |
# qualquer lugar do arquivo kv (desde que esteja fora dos widgets | |
# existentes) | |
# Nesse campo eu defino as propriedades comuns como cor, tamanho da fonte | |
# e alinhamento. | |
# https://kivymd.readthedocs.io/en/latest/components/textfield/#mdtextfieldround | |
''' | |
# Campo criado herdando de MDTextFieldRound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#In my py file I have: | |
from kivy.lang import Builder | |
from kivy.uix.recycleview import RecycleView | |
from kivymd.uix.list import TwoLineIconListItem, TwoLineAvatarListItem | |
from kivy.properties import StringProperty | |
from kivymd.app import MDApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MEUS MODELOS | |
from peewee import CompositeKey ,SqliteDatabase, Model, CharField, TextField, ForeignKeyField, FloatField | |
import os | |
app_path = os.path.dirname(os.path.abspath(__file__)) | |
db = SqliteDatabase(os.path.join(app_path, 'contagem.db')) | |
#db = SqliteDatabase('contagem.db') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' MAIN FILE''' | |
from kivy.lang import Builder | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.properties import ObjectProperty | |
from kivy.properties import StringProperty | |
from kivy.uix.screenmanager import Screen | |
from kivymd.uix.card import MDCardSwipe | |
from kivymd.uix.list import TwoLineListItem, OneLineListItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
from pyzbar import pyzbar | |
def read_barcodes(frame): | |
barcodes = pyzbar.decode(frame) | |
for barcode in barcodes: | |
x, y , w, h = barcode.rect | |
print(barcode.rect) | |
print('X={}, Y={}, W={}, H={}'.format(x, y, w, h)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[app] | |
# (str) Title of your application | |
title = Inventario | |
# (str) Package name | |
package.name = inventario | |
# (str) Package domain (needed for android/ios packaging) | |
package.domain = org.inventario |