[GNC-dev] Normalizing/obfuscating live data

Christian Stimming christian at cstimming.de
Mon Feb 4 03:40:19 EST 2019


Am Sonntag, 3. Februar 2019, 17:03:06 CET schrieb John Ralls:
> > On Feb 2, 2019, at 8:10 PM, David Carlson <david.carlson.417 at gmail.com>
> > wrote:
> > 
> > OK, I want to try https://wiki.gnucash.org/wiki/ObfuscateScript but I am
> > not a computer programmer.  I have no clue how to use it.  Can someone
> > help me?

Thanks for the pointer. I've copied this script into our git at 
  ./util/obfuscate.pl
The script manages to process my 50MB file in approx. 30 seconds. The account 
and txn texts are all nicely obfuscated. 

The script also contains a random obfuscation for the amounts, which will 
simply cause lots of transactions to the equity account upon loading, but this 
could be enabled as well.

In a real data file there are still more places with text that need to be 
modified, e.g. the scheduled transaction templates, bayes import matching, and 
such. Also, the dates are left unmodified which may or may not be a problem. 

Anyone please feel free to check with this script and add more obfuscation 
steps. I would like to achieve a state where the script will obfuscate my 
personal data file enough so that I feel I can make it available as a test 
file.

Usage of the script: Save your normal file in uncompressed form to XML file. 
Then,

   ./obfuscate.pl  inputfile.gnucash > outputfile.gnucash

(Contrary to the comments, the output is just written to stdout, not in-place 
into the file.)

Thanks for the idea here!

Regards,
Christian

 
> Run it from a command line using perl, assuming here that you have
> Strawberry installed on C:
> 
>   c:\strawberry\perl\bin\perl.exe ObfuscateScript path/to/myfile.gnucash
> 
> Note that it rewrites the file in place, so make a copy and run it on that.
> The file needs to be uncompressed.
> 
> Regards,
> John Ralls
> 
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel






More information about the gnucash-devel mailing list