Compare commits

..

13 Commits

Author SHA1 Message Date
Trenton H
6664fac166 Fixes the complicated conditional 2025-03-11 10:25:32 -07:00
Trenton H
b6e697d50b Upgrading to v2 doesn't change anything for us atm, so do it 2025-03-11 10:25:32 -07:00
Trenton H
2ff9497d91 As an extra, configures logging for granian 2025-03-11 10:25:32 -07:00
Trenton H
a98f46ae9e Oh, it's the workdir 2025-03-11 10:25:32 -07:00
Trenton H
6ae1811477 Fixes the build, probably 2025-03-11 10:25:32 -07:00
Trenton H
3c95928051 And updates the docs 2025-03-11 10:25:32 -07:00
Trenton H
ca8c3bb95d Handling for bare metal 2025-03-11 10:25:32 -07:00
Trenton H
037389fbd5 Do granian running differently 2025-03-11 10:25:32 -07:00
Trenton H
f4413e0a08
Fix: Always clean up INotify (#9359) 2025-03-11 10:01:00 -07:00
shamoon
169aa8c8bd
Merge pull request #9362 from paperless-ngx/empty-dashboard-hint
Tweak: add saved views hint to dashboard
2025-03-11 00:41:40 -07:00
shamoon
94556a2607
Tweak: add saved views hint to dashboard 2025-03-11 00:37:07 -07:00
shamoon
dcd50d5359
Fix: one more february relative date fix 2025-03-11 00:35:18 -07:00
dependabot[bot]
376823598e
Chore(deps): Update ocrmypdf requirement from ~=16.9.0 to ~=16.10.0 (#9348)
* Chore(deps): Update ocrmypdf requirement from ~=16.9.0 to ~=16.10.0

Updates the requirements on [ocrmypdf](https://github.com/ocrmypdf/OCRmyPDF) to permit the latest version.
- [Release notes](https://github.com/ocrmypdf/OCRmyPDF/releases)
- [Changelog](https://github.com/ocrmypdf/OCRmyPDF/blob/main/docs/release_notes.rst)
- [Commits](https://github.com/ocrmypdf/OCRmyPDF/compare/v16.9.0...v16.10.0)

---
updated-dependencies:
- dependency-name: ocrmypdf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
2025-03-10 17:37:33 +00:00
8 changed files with 84 additions and 60 deletions

View File

@ -48,7 +48,7 @@ dependencies = [
"jinja2~=3.1.5", "jinja2~=3.1.5",
"langdetect~=1.0.9", "langdetect~=1.0.9",
"nltk~=3.9.1", "nltk~=3.9.1",
"ocrmypdf~=16.9.0", "ocrmypdf~=16.10.0",
"pathvalidate~=3.2.3", "pathvalidate~=3.2.3",
"pdf2image~=1.17.0", "pdf2image~=1.17.0",
"python-dateutil~=2.9.0", "python-dateutil~=2.9.0",

View File

@ -6185,32 +6185,39 @@
<context context-type="linenumber">43</context> <context context-type="linenumber">43</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="4524189418954028091" datatype="html">
<source>Hint: saved views can be created from the <x id="START_LINK" ctype="x-a" equiv-text="&lt;a routerLink=&quot;/documents&quot;&gt;"/>documents list<x id="CLOSE_LINK" ctype="x-a" equiv-text="&lt;/a&gt;"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/dashboard/dashboard.component.html</context>
<context context-type="linenumber">42</context>
</context-group>
</trans-unit>
<trans-unit id="6581372518205328477" datatype="html"> <trans-unit id="6581372518205328477" datatype="html">
<source>Hello <x id="PH" equiv-text="this.settingsService.displayName"/>, welcome to <x id="PH_1" equiv-text="environment.appTitle"/></source> <source>Hello <x id="PH" equiv-text="this.settingsService.displayName"/>, welcome to <x id="PH_1" equiv-text="environment.appTitle"/></source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/dashboard/dashboard.component.ts</context> <context context-type="sourcefile">src/app/components/dashboard/dashboard.component.ts</context>
<context context-type="linenumber">57</context> <context context-type="linenumber">61</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="2901300640157872718" datatype="html"> <trans-unit id="2901300640157872718" datatype="html">
<source>Welcome to <x id="PH" equiv-text="environment.appTitle"/></source> <source>Welcome to <x id="PH" equiv-text="environment.appTitle"/></source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/dashboard/dashboard.component.ts</context> <context context-type="sourcefile">src/app/components/dashboard/dashboard.component.ts</context>
<context context-type="linenumber">59</context> <context context-type="linenumber">63</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="1325877348738783391" datatype="html"> <trans-unit id="1325877348738783391" datatype="html">
<source>Dashboard updated</source> <source>Dashboard updated</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/dashboard/dashboard.component.ts</context> <context context-type="sourcefile">src/app/components/dashboard/dashboard.component.ts</context>
<context context-type="linenumber">90</context> <context context-type="linenumber">94</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="3214475953924351473" datatype="html"> <trans-unit id="3214475953924351473" datatype="html">
<source>Error updating dashboard</source> <source>Error updating dashboard</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/dashboard/dashboard.component.ts</context> <context context-type="sourcefile">src/app/components/dashboard/dashboard.component.ts</context>
<context context-type="linenumber">93</context> <context context-type="linenumber">97</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="2946624699882754313" datatype="html"> <trans-unit id="2946624699882754313" datatype="html">

View File

@ -34,6 +34,17 @@
} }
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.SavedView }"> <ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.SavedView }">
@if (!settingsService.offerTour() && savedViewService.allViews.length === 0) {
<div class="col">
<div class="card shadow-sm bg-light opacity-50">
<div class="card-body">
<div class="text-center">
<p class="mb-0 fst-italic"><i-bs name="info-circle" class="me-2"></i-bs><ng-container i18n>Hint: saved views can be created from the <a routerLink="/documents">documents list</a></ng-container></p>
</div>
</div>
</div>
</div>
}
@for (v of dashboardViews; track v.id) { @for (v of dashboardViews; track v.id) {
<div class="col"> <div class="col">
<pngx-saved-view-widget <pngx-saved-view-widget

View File

@ -105,6 +105,7 @@ describe('DashboardComponent', () => {
results: saved_views, results: saved_views,
}), }),
dashboardViews: saved_views.filter((v) => v.show_on_dashboard), dashboardViews: saved_views.filter((v) => v.show_on_dashboard),
allViews: saved_views,
}, },
}, },
provideHttpClient(withInterceptorsFromDi()), provideHttpClient(withInterceptorsFromDi()),

View File

@ -6,6 +6,8 @@ import {
moveItemInArray, moveItemInArray,
} from '@angular/cdk/drag-drop' } from '@angular/cdk/drag-drop'
import { Component } from '@angular/core' import { Component } from '@angular/core'
import { RouterModule } from '@angular/router'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { TourNgBootstrapModule, TourService } from 'ngx-ui-tour-ng-bootstrap' import { TourNgBootstrapModule, TourService } from 'ngx-ui-tour-ng-bootstrap'
import { SavedView } from 'src/app/data/saved-view' import { SavedView } from 'src/app/data/saved-view'
import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive'
@ -35,6 +37,8 @@ import { WelcomeWidgetComponent } from './widgets/welcome-widget/welcome-widget.
IfPermissionsDirective, IfPermissionsDirective,
DragDropModule, DragDropModule,
TourNgBootstrapModule, TourNgBootstrapModule,
NgxBootstrapIconsModule,
RouterModule,
], ],
}) })
export class DashboardComponent extends ComponentWithPermissions { export class DashboardComponent extends ComponentWithPermissions {

View File

@ -45,7 +45,8 @@ describe('CustomDatePipe', () => {
if (now.getMonth() === 0) { if (now.getMonth() === 0) {
notNow.setFullYear(now.getFullYear() - 1) notNow.setFullYear(now.getFullYear() - 1)
} }
expect(['Last month', '4 weeks ago']).toContain( // weird options are for february...
expect(['Last month', '4 weeks ago', '3 weeks ago']).toContain(
datePipe.transform(notNow, 'relative') datePipe.transform(notNow, 'relative')
) )
expect(datePipe.transform(now, 'relative')).toEqual('Just now') expect(datePipe.transform(now, 'relative')).toEqual('Just now')

View File

@ -294,9 +294,9 @@ class Command(BaseCommand):
inotify = INotify() inotify = INotify()
inotify_flags = flags.CLOSE_WRITE | flags.MOVED_TO | flags.MODIFY inotify_flags = flags.CLOSE_WRITE | flags.MOVED_TO | flags.MODIFY
if recursive: if recursive:
descriptor = inotify.add_watch_recursive(directory, inotify_flags) inotify.add_watch_recursive(directory, inotify_flags)
else: else:
descriptor = inotify.add_watch(directory, inotify_flags) inotify.add_watch(directory, inotify_flags)
inotify_debounce_secs: Final[float] = settings.CONSUMER_INOTIFY_DELAY inotify_debounce_secs: Final[float] = settings.CONSUMER_INOTIFY_DELAY
inotify_debounce_ms: Final[int] = inotify_debounce_secs * 1000 inotify_debounce_ms: Final[int] = inotify_debounce_secs * 1000
@ -305,6 +305,7 @@ class Command(BaseCommand):
notified_files = {} notified_files = {}
try:
while not finished: while not finished:
try: try:
for event in inotify.read(timeout=timeout_ms): for event in inotify.read(timeout=timeout_ms):
@ -354,6 +355,5 @@ class Command(BaseCommand):
except KeyboardInterrupt: except KeyboardInterrupt:
logger.info("Received SIGINT, stopping inotify") logger.info("Received SIGINT, stopping inotify")
finished = True finished = True
finally:
inotify.rm_watch(descriptor)
inotify.close() inotify.close()

8
uv.lock generated
View File

@ -1814,7 +1814,7 @@ wheels = [
[[package]] [[package]]
name = "ocrmypdf" name = "ocrmypdf"
version = "16.9.0" version = "16.10.0"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
dependencies = [ dependencies = [
{ name = "deprecation", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, { name = "deprecation", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
@ -1827,9 +1827,9 @@ dependencies = [
{ name = "pluggy", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, { name = "pluggy", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "rich", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, { name = "rich", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
] ]
sdist = { url = "https://files.pythonhosted.org/packages/a8/07/d8810415b98718a39b1161720acd925b6ef15743227012809f6da9d3b7bc/ocrmypdf-16.9.0.tar.gz", hash = "sha256:d000a2294cd1478d4bbfe15df5172327f77f4139bb5307404bc53be9bd81f039", size = 6804849 } sdist = { url = "https://files.pythonhosted.org/packages/07/cf/d207aea8442a8e5a63b16faae89af2b9e3474d8d5925a5ea8c4f10f73fa9/ocrmypdf-16.10.0.tar.gz", hash = "sha256:d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e", size = 6809110 }
wheels = [ wheels = [
{ url = "https://files.pythonhosted.org/packages/12/69/e40431c5410eaf0c55588d0d256e27ee32af7622cb7116ac99a2e868bd2f/ocrmypdf-16.9.0-py3-none-any.whl", hash = "sha256:33fec95450727b0d9482ee3851e45dd0219ff8d52a14fd45a8d3d0c71875584e", size = 161863 }, { url = "https://files.pythonhosted.org/packages/33/47/10058f54f593f5e618a6796fc3e8dc3e19536128f832e2d3d6e4943e9834/ocrmypdf-16.10.0-py3-none-any.whl", hash = "sha256:5093b9b058e7278b17c0b0978eb5175063b7a5511e3b9068257ece063d91ce8f", size = 162336 },
] ]
[[package]] [[package]]
@ -2018,7 +2018,7 @@ requires-dist = [
{ name = "langdetect", specifier = "~=1.0.9" }, { name = "langdetect", specifier = "~=1.0.9" },
{ name = "mysqlclient", marker = "extra == 'mariadb'", specifier = "~=2.2.7" }, { name = "mysqlclient", marker = "extra == 'mariadb'", specifier = "~=2.2.7" },
{ name = "nltk", specifier = "~=3.9.1" }, { name = "nltk", specifier = "~=3.9.1" },
{ name = "ocrmypdf", specifier = "~=16.9.0" }, { name = "ocrmypdf", specifier = "~=16.10.0" },
{ name = "pathvalidate", specifier = "~=3.2.3" }, { name = "pathvalidate", specifier = "~=3.2.3" },
{ name = "pdf2image", specifier = "~=1.17.0" }, { name = "pdf2image", specifier = "~=1.17.0" },
{ name = "psycopg", extras = ["c"], marker = "extra == 'postgres'", specifier = "==3.2.5" }, { name = "psycopg", extras = ["c"], marker = "extra == 'postgres'", specifier = "==3.2.5" },