Compare commits
6 Commits
starfields
...
starfields
| Author | SHA1 | Date | |
|---|---|---|---|
| 52df657af2 | |||
| 0e916b4d70 | |||
| f09dc23897 | |||
| 6289de3c8e | |||
| c6d3a00d20 | |||
| b21df6a09e |
33
PKGBUILD
33
PKGBUILD
@@ -1,33 +0,0 @@
|
||||
# Maintainer: Tasos <support@starfields.gr>
|
||||
|
||||
pkgname="python-starfields-logparser"
|
||||
_pkgname="starfields_logparser"
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
|
||||
pkgdesc='A basic python logparser for arbitrary log files'
|
||||
arch=('any')
|
||||
depends=("python>=3.8" "python-django>=3.0")
|
||||
url="https://git.vickys-corner.xyz/ace/starfields-logparser"
|
||||
license=('GPLv3')
|
||||
|
||||
source=("https://git.vickys-corner.xyz/StarFields/starfields-drf-generics/archive/starfields-drf-generics-0.2.0.tar.gz")
|
||||
sha256sums=('4803c2574e2232181c4c512aa0a80f7e087bbc8da59279d7ffc99d3167092496')
|
||||
|
||||
makedepends=(
|
||||
'python-build'
|
||||
'python-installer'
|
||||
'python-wheel'
|
||||
'python-setuptools-scm'
|
||||
'python-hatchling'
|
||||
)
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/starfields-drf-generics
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/starfields-drf-generics/${_pkgname}
|
||||
python -m installer --destdir="${pkgdir}" ../dist/*.whl
|
||||
}
|
||||
@@ -18,6 +18,7 @@ class BaseOrderedLogParser:
|
||||
line = file.readline()
|
||||
new_flag = False
|
||||
|
||||
break_condition = True
|
||||
while (line):
|
||||
# Only check for a new line if we're not at new entries yet
|
||||
if not new_flag:
|
||||
@@ -34,6 +35,9 @@ class BaseOrderedLogParser:
|
||||
|
||||
self.aggregators_deinit(file, aggregates, status)
|
||||
|
||||
if not break_condition:
|
||||
self.reset_status(aggregates, status)
|
||||
else:
|
||||
self.update_status(aggregates, status)
|
||||
|
||||
def get_context_manager(self):
|
||||
@@ -52,6 +56,12 @@ class BaseOrderedLogParser:
|
||||
"""
|
||||
pass
|
||||
|
||||
def reset_status(self, aggregates, status):
|
||||
"""
|
||||
Resets the saved status of the parser.
|
||||
"""
|
||||
pass
|
||||
|
||||
def update_status(self, aggregates, status):
|
||||
"""
|
||||
Updates the saved status of the parser.
|
||||
|
||||
Reference in New Issue
Block a user