Skip to content
Snippets Groups Projects
Commit 82c62748 authored by Wolf Widdra's avatar Wolf Widdra
Browse files

V 1.0.5 (elog comments html strip)

parent 12c878bb
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import urllib.parse
import os
import builtins
import re
from elog.logbook_exceptions import *
# from elog.logbook_exceptions import *
from datetime import datetime
from time import localtime
......@@ -499,17 +499,11 @@ class myLogbook(object):
def getShortMessage4File(self,filename):
stuff = self.getMessage4File(filename)
replacements = [
('<\/p>', ''),
('<p>', ''),
('&gt;', '>'),
('&lt;', '<')
]
if isinstance(stuff,str):
for old, new in replacements:
stuff = re.sub(old, new, stuff)
return stuff[:min(60,len(stuff))]
return ''
import html2text
h = html2text.HTML2Text()
# Ignore converting links from HTML
h.ignore_links = True
return h.handle(stuff)
def _remove_reserved_attributes(attributes):
"""
......@@ -605,7 +599,7 @@ def _handle_pswd(password, encrypt=True):
##########################################################################################################
# ogf settings:
try:
from eLogCredentials import user, password, dummy, unsafe # Defines User credentials
from libhreels.eLogCredentials import user, password, dummy, unsafe # Defines User credentials
logbook = myLogbook('https://labor-ep3.physik.uni-halle.de/HREELS/', user=dummy, password=unsafe)
print('eLog available!')
available = True
......
[tool.poetry]
name = "libhreels"
version = "1.0.3"
version = "1.0.5"
description = "Handling, simulating, and plotting HREELS and Auger spectroscopy data"
authors = ["Wolf Widdra <wolf.widdra@physik.uni-halle.de>"]
include = ["*.*"]
......@@ -17,7 +17,7 @@ scipy = "^1.4"
requests = "^2.23.0"
argparse = "^1.4.0"
PyQt5 = "^5.13"
numpy = "^1.18.3"
numpy = "^1.18.2"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
......@@ -26,10 +26,11 @@ pytest = "^5.2"
[tool.poetry.scripts]
dielectrics = "libhreels.dielectrics:myMain"
calchreels = "libhreels.calcHREELS:myMain"
viewhreelstest = "libhreels.ViewHREELS:myMain"
[tool.poetry.plugins."gui_scripts"]
viewhreels = "libhreels.ViewHREELS:myMain"
viewauger = "libhreels.ViewAuger:myMain"
viewhreels = "libhreels.ViewHREELS:myMain"
[build-system]
requires = ["poetry>=0.12"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment