2 Commits

Author SHA1 Message Date
jeffser
fb8e3a434c Getting ready for 0.9.6.1 2024-06-22 02:13:20 -06:00
jeffser
e42e01a92c Removed DOCX compatibility due to error on dependencies 2024-06-22 02:11:17 -06:00
6 changed files with 18 additions and 36 deletions

View File

@@ -85,30 +85,6 @@
}
]
},
{
"name": "python3-python-docx",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"python-docx\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/63/f7/ffbb6d2eb67b80a45b8a0834baa5557a14a5ffce0979439e7cd7f0c4055b/lxml-5.2.2.tar.gz",
"sha256": "bb2dc4898180bea79863d5487e5f9c7c34297414bad54bcd0f0852aee9cfdb87"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/3e/3d/330d9efbdb816d3f60bf2ad92f05e1708e4a1b9abe80461ac3444c83f749/python_docx-1.1.2-py3-none-any.whl",
"sha256": "08c20d6058916fb19853fcf080f7f42b6270d89eac9fa5f8c15f691c0017fabe"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl",
"sha256": "04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"
}
]
},
{
"name": "ollama",
"buildsystem": "simple",

View File

@@ -64,6 +64,13 @@
<url type="homepage">https://github.com/Jeffser/Alpaca</url>
<url type="donation">https://github.com/sponsors/Jeffser</url>
<releases>
<release version="0.9.6.1" date="2024-06-22">
<url type="details">https://github.com/Jeffser/Alpaca/releases/tag/0.9.6.1</url>
<description>
<p>Fix</p>
<p>Removed DOCX compatibility temporally due to error with python-lxml dependency </p>
</description>
</release>
<release version="0.9.6" date="2024-06-21">
<url type="details">https://github.com/Jeffser/Alpaca/releases/tag/0.9.6</url>
<description>

View File

@@ -1,5 +1,5 @@
project('Alpaca', 'c',
version: '0.9.6',
version: '0.9.6.1',
meson_version: '>= 0.62.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)

View File

@@ -47,7 +47,7 @@ class AlpacaApplication(Adw.Application):
application_name='Alpaca',
application_icon='com.jeffser.Alpaca',
developer_name='Jeffry Samuel Eduarte Rojas',
version='0.9.6',
version='0.9.6.1',
developers=['Jeffser https://jeffser.com'],
designers=['Jeffser https://jeffser.com'],
translator_credits='Alex K (Russian) https://github.com/alexkdeveloper\nJeffser (Spanish) https://jeffser.com\nDaimar Stein (Brazilian Portuguese) https://github.com/not-a-dev-stein\nLouis Chauvet-Villaret (French) https://github.com/loulou64490',

View File

@@ -21,7 +21,7 @@ import gi
gi.require_version('GtkSource', '5')
gi.require_version('GdkPixbuf', '2.0')
from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf
import json, requests, threading, os, re, base64, sys, gettext, locale, webbrowser, subprocess, uuid, shutil, tarfile, tempfile, docx
import json, requests, threading, os, re, base64, sys, gettext, locale, webbrowser, subprocess, uuid, shutil, tarfile, tempfile #, docx
from time import sleep
from io import BytesIO
from PIL import Image
@@ -1137,13 +1137,13 @@ class AlpacaWindow(Adw.ApplicationWindow):
for i, page in enumerate(reader.pages):
text += f"\n- Page {i}\n{page.extract_text()}\n"
return text
elif file_type == 'docx':
document = docx.Document(file_path)
if len(document.paragraphs) == 0: return None
text = ""
for paragraph in document.paragraphs:
text += f"{paragraph.text}\n"
return text
#elif file_type == 'docx':
#document = docx.Document(file_path)
#if len(document.paragraphs) == 0: return None
#text = ""
#for paragraph in document.paragraphs:
#text += f"{paragraph.text}\n"
#return text
def remove_attached_file(self, button):
del self.attachments[button.get_name()]
@@ -1162,7 +1162,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
"image": "image-x-generic-symbolic",
"plain_text": "document-text-symbolic",
"pdf": "document-text-symbolic",
"docx": "document-text-symbolic"
#"docx": "document-text-symbolic"
}[file_type]
)
button = Gtk.Button(

View File

@@ -913,7 +913,6 @@
<suffix>json</suffix>
<suffix>xml</suffix>
<suffix>pdf</suffix>
<suffix>docx</suffix>
<suffix>png</suffix>
<suffix>jpeg</suffix>
<suffix>webp</suffix>