> On Oct 20, 2022, at 10:06 PM, Jeff <beastmaster...@hotmail.com> wrote:
> 
> On 12/8/21 10:48 AM, john wrote:
>> 
>>> On Dec 7, 2021, at 10:27 PM, Jeff <beastmaster...@hotmail.com> wrote:
>>> 
>>> On 12/7/21 11:38 AM, john wrote:
>>>> 
>>>>> On Dec 7, 2021, at 1:40 AM, Jeff <beastmaster...@hotmail.com> wrote:
>>>>> 
>>>>> Since GNC is based on XML and MySQL, how hard would it be to upgrade to 
>>>>> link the code to a MySQL database format for document saving (i.e.check 
>>>>> images) instead of just an XML hard link to a file?
>>>>> 
>>>>> Even though there seems to be a limit on the number of transactions that 
>>>>> you can convert from XML to MySQL. 3 years works, 30 doesn't.  I have 30+ 
>>>>> in my ledger and cannot get it to convert from XML to MySQL. My dad's 
>>>>> only has less than 4 years and converts fine to MySQL.
>>>>> 
>>>>> Saving to an image file currently limits you to one drive and a specific 
>>>>> file.  MySQL would allow saving to wherever the database of images exists 
>>>>> as a list of blobs.  Hard drive upgrades would be much simpler.
>>>>> 
>>>>> Again just curious.
>>>> There is no programmatic limit in GnuCash on the number of transactions 
>>>> that GnuCash can store using the MySQL backend, so you're most likely 
>>>> hitting some limitation on the server side. You can run GnuCash with --log 
>>>> gnc.backend.sql=debug to get details of the insert queries and server 
>>>> error responses; combined with your MySQL logs you should be able to 
>>>> pretty quickly diagnose the problem. If you find that GnuCash's backend is 
>>>> doing something dumb please file a bug.
>>>> 
>>>> As for document image links they're URIs so you can put them anywhere that 
>>>> you can access with a URI. A web server on your LAN is an easy to 
>>>> implement option.
>>>> 
>>>> Regards,
>>>> John Ralls
>>>> 
>>>> .
>>> 
>>> I understand the direct link to a file or URL but; how does one specify a 
>>> URI?
>> 
>> URI means Uniform Resource Identifier, see 
>> https://en.wikipedia.org/wiki/Uniform_Resource_Identifier. It's a more 
>> general term than URL, or Uniform Resource Locator.
>> 
>> Regards,
>> John Ralls
>> 
> Sorry John Ralls, if my reply comes directly to you, my email client no 
> longer lets me easily reply directly to the list only.
> 
> I have not been able to convert my data to an sql file, period. 30 years 
> worth.  Works for other sets of books with much fewer years of data.
> 
> What I am after is a way to link images to a transaction but not via a 
> specific filename.  Like many others I am sure, I'd like to access the images 
> from any drive, including a replacement drive. I just had 2 hard drive 
> failures back to back on external drives. Now not only do I have to hire a 
> forensic company to try and recover them, I have lost all images saved to 
> them.  And yes, they were both unfortunately system back up drives. 12 
> terabytes for those 2.
> 
> In fewer words, I need a method of attaching images to a stand alone 
> database.  I have never had a successful build of GNC.  Some stupid mistake 
> on my part I am sure.  I would be more than happy to write such program but I 
> do not understand the GNC code well enough to change the image link from a 
> file to a call to a standalone database program running in the back ground.

Jeff,

It came through the list with no problems. You didn't even send it directly to 
me. Even if your client no longer does reply-list, and most don't, you can use 
reply-all which duplicates the CCs of the message you're replying to and will 
get it to the list as well as to the sender you're replying to.

The details of how this works is that you select Linked Location in the Change 
a Transaction Linked Document dialog and enter a URI. This can be any URI your 
OS knows how to open. mysql: and psql: are not likely to be options; http: is 
guaranteed to work. For the other end you set up a web server (apache, nginx, 
etc.). That can be on the same computer, in which case you can use 
http://localhost/ to start the URI. The rest of the URI will be instructions to 
the web server to retrieve the image you want. A very simple way to do it would 
be to set up a directory in the web server root called gnucash-images and to 
have a simple index.php in it that reads the image parameter provided in the 
URI and serves the file from an images subdirectory. A URI for that scheme 
might look like 
http://localhost/gnucash-images/index.php?image=laundry_receipt_2022-10-21.jpeg 
. 
If writing a PHP script is a little beyond you you could use a Content 
Management System to do the same thing. WordPress is the most popular in part 
because non-programmers can run it. The documentation is clear and extensive.

You could make that work with the images in a database, though AFAIK none of 
the off-the-shelf CMSes do so so you'd have to code that up yourself in PHP: 
Your index.php would query the database to retrieve the blob and wrap it up so 
the browser thinks it's an image file it knows how to display; jpeg and png are 
the safest choices for that.

Regards,
John Ralls

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to