
Made a landing page which works quite well. 1 problem is every pdfmerge.py has to be restarted manually when the tokens expire. That happens every 24 hours. It's the new pain with the newfound ease of running multiple pdfmerges.
The big problem continued to be repositioning cells. For now, sheets have just grown down & right as missing fields were added. There's also been just filling out the entire spreadsheet before filling out the form.
It would start by loading the entire sheet in 1 GET. The smart way might be hard coding a maximum sheet size or selecting the bottom right cell + 10. Specifying A1:Z256 as the range makes it return just the cells which are taken. If a form needs more than that range, you have bigger problems. There has to be a new rule where a form can only use 1 spreadsheet.
Then it would search in a radial pattern for matching data around blank cells. The user would have to do the search operation right after moving the data & before changing the data. For now, it only searches 2 cells in 4 directions. This tries to avoid the chance of picking the wrong cell while still allowing the user to accidentally move a cell 2 places over. The previous behavior only allowed shifting a 1 row or column at a time.

The key errors are no matching data in another cell, the matching cell being too far away, the moved cells being different offsets.

It tries to give some minimal diagnostics in a modeless dialog.
The next step was making the resync operation download the entire sheet instead of loading 1 cell at a time. This was much faster than loading 1 cell at a time, but was the final stage of limiting it to 1 sheet per form.
To handle multiple documents sharing the same sheet, what's really needed is a way to combine multiple forms in a single project & have a single pdfmerge.py serve them all. They would have to poll the server for changes. It can't rely on any command line tools because the authentication requires a browser.
It's become a growing problem with growing complexity.
lion mclionhead
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.