Giter Club home page Giter Club logo

paperlessdotnet's People

Contributors

dependabot[bot] avatar lukasschachner avatar vmelnalksnis avatar

Watchers

 avatar  avatar  avatar

paperlessdotnet's Issues

Test against multiple versions/configurations of paperless

Is your feature request related to a problem? Please describe.
Paperless API behavior has changed across versions, and also changes based on configuration (see PAPERLESS_TIME_ZONE).

Describe the solution you'd like
All integration tests are run against multiple combinations of versions and configurations.

Describe alternatives you've considered

Additional context
I could not find how to do this in XUnit without a ton of code duplication, most likely will have to move to NUnit. With NUnit I've already done something similiar, see https://github.com/VMelnalksnis/Gnomeshade/blob/master/tests/Gnomeshade.WebApi.Tests.Integration/Fixtures/WebserverTests.cs and https://github.com/VMelnalksnis/Gnomeshade/blob/master/tests/Gnomeshade.WebApi.Tests.Integration.PostgreSQL/WebserverSetup.cs

[FR] Custom field support

Is your feature request related to a problem? Please describe.
Somewhere along the line, Paperless-ngx added support for custom fields. Unless I'm missing something (usually the case), this feature is not currently supported by PaperlessDotNet.

Describe the solution you'd like
It should be possible to specify custom fields and values at document creation time, to read custom fields from documents that have been retrieved, and to retrieve an instance's current set of custom fields.

Describe alternatives you've considered
There is no apparent workaround or alternative solution.

Additional context
N/A

Error parsing timestamp

Describe the bug
API request appears to fail due to a timestamp parsing error.

To Reproduce
Steps to reproduce the behavior:

  1. Execute the following test:
            var baseAddress = new Uri("http://paperless_host");
            var token = "your-token-here";

            var assemblyName = typeof(IPaperlessClient).Assembly.GetName();
            var assemblyShortName = assemblyName.Name ?? assemblyName.FullName.Split(',').First();
            ProductInfoHeaderValue userAgent = new(assemblyShortName, assemblyName.Version?.ToString());

            var client = new HttpClient
            {
                BaseAddress = baseAddress
            };

            client.DefaultRequestHeaders.UserAgent.Add(userAgent);

#if NET6_0_OR_GREATER
            client.DefaultRequestHeaders.Add("Accept", $"{MediaTypeNames.Application.Json}; version=2");
#else
			client.DefaultRequestHeaders.Add("Accept", "application/json; version=2");
#endif
            client.DefaultRequestHeaders.Authorization = new("Token", token);

            var dtz = DateTimeZoneProviders.Tzdb;
            var so = new PaperlessJsonSerializerOptions(dtz);
            var cc = new CorrespondentClient(client, so);

            var dc = new DocumentClient(client, so);

            var pc = new PaperlessClient(cc, dc);

            var docs = pc.Documents.GetAll();

            await foreach(var doc in docs)
            {
                Console.WriteLine(doc.OriginalFileName);
            }
  1. Observe exception similar to the following:
System.Text.Json.JsonException: 'Cannot convert value to NodaTime.Instant'

Inner Exception
UnparsableValueException: The value string does not match a quoted string in the pattern. Value being parsed: '2023-12-18T00:00:00^-08:00'. (^ indicates error position.)

Expected behavior
A list of documents in the Paperless-ngx instance should be displayed

Screenshots
N/A

Additional context
N/A

[FR] Console app example

Is your feature request related to a problem? Please describe.
The README discusses usage outside of ASP.NET Core, and refers to "the configuration", which is a link to ServiceCollectionExtensions.cs in the VMelnalksnis.PaperlessDotNet.DependencyInjection package. It's not clear how this information should be used.

Describe the solution you'd like
A sample project in the form of a console app would be ideal, since this strips away any unnecessary layers that could obscure proper usage.

Describe alternatives you've considered
If not a sample project, perhaps some additional language could be added to the README that provides a little more information about the intended setup.

Additional context
None

Make polling delay after document creation configurable

Is your feature request related to a problem? Please describe.

  • I want to use a custom delay when polling for the import task result

Describe the solution you'd like

  • A second optional parameter in the Create method in the DocumentClient that configures the delay in ms

Additional context

  • I already implemented a the solution so i took the liberty and prepared a PR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.