we handled the '/' character in reorganize. Filecabinet converts it to a '-' so we are now processing that. The folder templates file still should match exactly how it looks in FCCS
This commit is contained in:
@@ -30,7 +30,7 @@ Extracts and organizes documents from FileCabinet CS (Thomson Reuters) using GUI
|
|||||||
## Setup Per Engagement
|
## Setup Per Engagement
|
||||||
|
|
||||||
1. Edit `config.ini` -- point `backup_dir`, `export_dir`, and `output_dir` at the client's directories. This file is created automatically from `config.template.ini` the first time you run any script (it's git-ignored, so your machine-specific paths never drift the repo). To reset a machine, delete `config.ini` and re-run. Keep shared/default changes in `config.template.ini` (the tracked file).
|
1. Edit `config.ini` -- point `backup_dir`, `export_dir`, and `output_dir` at the client's directories. This file is created automatically from `config.template.ini` the first time you run any script (it's git-ignored, so your machine-specific paths never drift the repo). To reset a machine, delete `config.ini` and re-run. Keep shared/default changes in `config.template.ini` (the tracked file).
|
||||||
2. Populate `fccs_folders.txt` -- open FCCS > System Configuration > Document Folders and list each folder template exactly as shown, one per line. Keep the `YYYY` prefix on recurring folders. Thomson Reuters product folders (UltraTax CS, Planner CS, Practice CS) are detected automatically and do not need to be listed. Like `config.ini`, this file is auto-created from `fccs_folders.template.txt` on first use and is git-ignored — edit it freely per engagement; put only broadly-useful defaults in the tracked template.
|
2. Populate `fccs_folders.txt` -- open FCCS > System Configuration > Document Folders and list each folder template exactly as shown, one per line (names containing `/`, like `Foreign Bank/Income`, can be copied verbatim — the code converts `/` to `-` automatically, matching how FCCS writes it into filenames). Keep the `YYYY` prefix on recurring folders. Thomson Reuters product folders (UltraTax CS, Planner CS, Practice CS) are detected automatically and do not need to be listed. Like `config.ini`, this file is auto-created from `fccs_folders.template.txt` on first use and is git-ignored — edit it freely per engagement; put only broadly-useful defaults in the tracked template.
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,12 @@ def build_folder_patterns(templates):
|
|||||||
))
|
))
|
||||||
|
|
||||||
for tmpl in templates:
|
for tmpl in templates:
|
||||||
|
# FCCS converts "/" to "-" when embedding the folder name in the flat
|
||||||
|
# export filename ("/" is illegal in Windows filenames), so templates
|
||||||
|
# copied verbatim from the FCCS UI (e.g. "YYYY Foreign Bank/Income")
|
||||||
|
# must be normalized the same way to match — and to be usable as an
|
||||||
|
# output directory component.
|
||||||
|
tmpl = tmpl.replace("/", "-")
|
||||||
if "YYYY" in tmpl:
|
if "YYYY" in tmpl:
|
||||||
# Replace YYYY with captured 4-digit year pattern, escape the rest
|
# Replace YYYY with captured 4-digit year pattern, escape the rest
|
||||||
parts = tmpl.split("YYYY")
|
parts = tmpl.split("YYYY")
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
#
|
#
|
||||||
# List folder names exactly as shown in FCCS System Configuration > Document Folders.
|
# List folder names exactly as shown in FCCS System Configuration > Document Folders.
|
||||||
# Keep the YYYY prefix for recurring folders. Non-recurring folders go as-is.
|
# Keep the YYYY prefix for recurring folders. Non-recurring folders go as-is.
|
||||||
|
# Names containing "/" (e.g. "YYYY Foreign Bank/Income") can be copied verbatim —
|
||||||
|
# the code converts "/" to "-" automatically, matching how FCCS writes filenames.
|
||||||
# Thomson Reuters product folders (UltraTax CS, Planner CS, Practice CS) are
|
# Thomson Reuters product folders (UltraTax CS, Planner CS, Practice CS) are
|
||||||
# handled automatically — do not list them here.
|
# handled automatically — do not list them here.
|
||||||
# Blank lines and lines starting with # are ignored.
|
# Blank lines and lines starting with # are ignored.
|
||||||
|
|||||||
Reference in New Issue
Block a user