treeing 1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- treeing/__init__.py +7 -0
- treeing/_release_defaults.py +3 -0
- treeing/assets/icon.icns +0 -0
- treeing/assets/icon.ico +0 -0
- treeing/assets/icon.png +0 -0
- treeing/cli/__init__.py +5 -0
- treeing/cli/confirm.py +197 -0
- treeing/cli/help_text.py +311 -0
- treeing/cli/io.py +72 -0
- treeing/cli/main.py +427 -0
- treeing/cli/report.py +104 -0
- treeing/cli_entry.py +16 -0
- treeing/config.py +205 -0
- treeing/core/__init__.py +15 -0
- treeing/core/constants.py +20 -0
- treeing/core/generator.py +567 -0
- treeing/core/parser.py +407 -0
- treeing/core/preview.py +98 -0
- treeing/gui/__init__.py +5 -0
- treeing/gui/app.py +886 -0
- treeing/gui/dnd.py +124 -0
- treeing/gui/icon.py +69 -0
- treeing/gui/preview.py +9 -0
- treeing/gui/settings.py +80 -0
- treeing/gui/tooltip.py +234 -0
- treeing/gui_entry.py +39 -0
- treeing/main.py +21 -0
- treeing/path_checks.py +87 -0
- treeing/strings.bootstrap.json +7 -0
- treeing/strings.json +222 -0
- treeing-1.0.1.dist-info/METADATA +112 -0
- treeing-1.0.1.dist-info/RECORD +36 -0
- treeing-1.0.1.dist-info/WHEEL +5 -0
- treeing-1.0.1.dist-info/entry_points.txt +3 -0
- treeing-1.0.1.dist-info/licenses/LICENSE +21 -0
- treeing-1.0.1.dist-info/top_level.txt +1 -0
treeing/strings.json
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app_title": "Treeing — ASCII tree → directory/file generator",
|
|
3
|
+
"gui_label_input": "Paste or edit an ASCII tree (supports `tree` command output):",
|
|
4
|
+
"gui_label_preview": "Parsed directory tree preview:",
|
|
5
|
+
"gui_btn_import": "📂 Import text file",
|
|
6
|
+
"gui_btn_clear": "🗑️ Clear",
|
|
7
|
+
"gui_btn_parse": "🔍 Parse tree",
|
|
8
|
+
"gui_btn_generate": "📁 Generate directories/files",
|
|
9
|
+
"gui_btn_view_warnings": "📋 All warnings",
|
|
10
|
+
"gui_btn_tree_icon_expanded": "▼",
|
|
11
|
+
"gui_btn_tree_icon_collapsed": "▶",
|
|
12
|
+
"gui_btn_close": "Close",
|
|
13
|
+
"gui_btn_about": "ℹ️ About",
|
|
14
|
+
"gui_btn_exit": "❌ Exit",
|
|
15
|
+
"gui_status_ready": "Ready",
|
|
16
|
+
"gui_status_imported": "Imported: {filename}",
|
|
17
|
+
"gui_status_drop_extra_ignored": "({count} additional file(s) ignored)",
|
|
18
|
+
"gui_status_cleared": "Cleared",
|
|
19
|
+
"gui_status_parsed": "Parse complete: {count} valid node(s), {warnings} warning(s)",
|
|
20
|
+
"gui_status_generated": "Generated successfully to: {path}",
|
|
21
|
+
"gui_status_generated_with_warnings": "Generated successfully to: {path} ({count} warning(s): {summary})",
|
|
22
|
+
"gui_status_gen_failed": "Generation failed: {error}",
|
|
23
|
+
"gui_title_no_input": "Notice",
|
|
24
|
+
"gui_title_parse_warning": "Format warnings",
|
|
25
|
+
"gui_title_gen_success": "Success",
|
|
26
|
+
"gui_title_gen_warning": "Generation complete (with warnings)",
|
|
27
|
+
"gui_title_import_error": "Import error",
|
|
28
|
+
"gui_title_generate_error": "Generation failed",
|
|
29
|
+
"gui_title_generate_confirm": "Confirm generation",
|
|
30
|
+
"gui_title_warnings": "Warning list",
|
|
31
|
+
"gui_title_close_confirm": "Exit confirmation",
|
|
32
|
+
"gui_title_import_parse": "Import complete",
|
|
33
|
+
"gui_title_about": "About Treeing",
|
|
34
|
+
"gui_msg_no_input_content": "Please input or import an ASCII tree first.",
|
|
35
|
+
"gui_msg_parse_warning": "Found {count} parse warning(s):\n\n{warnings_text}",
|
|
36
|
+
"gui_msg_parse_warning_more": "... {extra} more",
|
|
37
|
+
"gui_msg_gen_success_content": "✅ Generated directories/files to:\n{path}",
|
|
38
|
+
"gui_msg_gen_warning": "✅ Generated to:\n{path}\n\nFound {count} warning(s):\n\n{warnings_text}",
|
|
39
|
+
"gui_msg_generate_confirm": "This will create empty folders and empty files in the following directory ({count} node(s)):\n\n{path}\n\nPlease verify the preview on the right. When \"Abort on path conflict\" is unchecked, items with the same name may be overwritten.\n\nContinue?",
|
|
40
|
+
"gui_msg_import_parse": "Parse the imported content now?\n(You may adjust the options below first; choose \"No\" to parse manually with \"Parse tree\".)",
|
|
41
|
+
"gui_msg_no_warnings": "No warnings currently.",
|
|
42
|
+
"gui_msg_close_confirm": "The input box contains unsaved content. Exit anyway?",
|
|
43
|
+
"gui_msg_view_all_warnings_hint": "(Click \"All warnings\" or double-click the status bar to see the full list.)",
|
|
44
|
+
"gui_msg_about": "Treeing\nVersion {version}\n\n[Overview]\nTurns ASCII directory trees (e.g. `tree` command output) into real empty directories and empty files.\nSupports Unicode box-drawing, pipe style, and Windows `tree` formats; provides both a GUI and a CLI.\n\n[Main features]\n• Parse and preview directory tree structures\n• Generate empty directories and files in one click\n• Optional strict directory inference, abort-on-conflict, nested path names, and more\n• CLI supports JSON output, dry-run, and scripting\n\n[Usage tips]\n• GUI: Ctrl+Enter to parse, Ctrl+G to generate\n Launch: {gui_python} (source)\n {gui_exe_unix} (Linux / macOS executable) / {gui_exe_win} (Windows executable)\n• CLI:\n Source: {cli_python} --help\n Executable: {cli_exe_unix} --help (Linux / macOS) / {cli_exe_win} --help (Windows)\n• See the user guide for details.\n\n[Privacy]\nThis is a fully local, offline tool. It does not connect to the network, upload anything, or collect personal data.\nIt only stores UI preferences (font size, last output directory, import encoding, and the encoding drop-down presets) under ~/.treeing/settings.json in your home directory, to restore them on next launch, and they never leave your machine.\nYou may delete that file at any time; the app will fall back to defaults.\nTo report issues, please use the Issues page on the project homepage.\n\n[AI disclosure]\nParts of this source code were written with assistance from AI coding tools.\n\n[Licence & credits]\nCopyright (c) 2026 MING\nMIT Licence — see the project LICENSE file\n\n[Project homepage]\nhttps://github.com/xiao-ming-b65536/treeing",
|
|
45
|
+
"gui_err_tcl_missing": "Error: could not initialise the GUI; the Tcl/Tk runtime in the current environment is incomplete.\nPlease install a full Tcl/Tk, or use the CLI:\n {cli_python} --help # source\n {cli_exe_unix} --help # Linux / macOS executable\n {cli_exe_win} --help # Windows executable",
|
|
46
|
+
"preview_virtual_prefix": "[virtual] ",
|
|
47
|
+
"preview_virtual_auto_display": "auto-inserted",
|
|
48
|
+
"preview_virtual_root_display": "virtual root",
|
|
49
|
+
"preview_dot_root_display": "current directory",
|
|
50
|
+
"gui_filetype_text": "Text files",
|
|
51
|
+
"gui_filetype_text_pattern": "*.txt",
|
|
52
|
+
"gui_filetype_all": "All files",
|
|
53
|
+
"gui_filetype_all_pattern": "*.*",
|
|
54
|
+
"gui_file_dialog_title_open": "Choose a text file to import",
|
|
55
|
+
"gui_file_dialog_title_generate": "Choose the output directory",
|
|
56
|
+
"gui_label_indent_unit": "Indent unit:",
|
|
57
|
+
"gui_label_allow_nested": "Allow nested path names",
|
|
58
|
+
"gui_label_fail_on_conflict": "Abort on path conflict",
|
|
59
|
+
"gui_label_strict_dirs": "Strict directory inference",
|
|
60
|
+
"gui_label_no_fix": "Disable auto-repair",
|
|
61
|
+
"gui_label_encoding": "File import encoding:",
|
|
62
|
+
"gui_label_font_size": "Font size:",
|
|
63
|
+
"gui_tooltip_input": "Paste or write a \"directory tree diagram\" here, such as the output of the `tree` command or an ASCII tree with ├──.\nNot plain prose, logs, or source code.\nNotes:\n1. Content pasted directly is read as UTF-8 and is not affected by the \"File import encoding\" option on the right.\n2. Lines starting with # or // are treated as comments and ignored.",
|
|
64
|
+
"gui_tooltip_preview": "Click \"Parse tree\" first; the recognised folders and files will appear here (names cleaned per generation rules).\nFolders end with /.\nGrey italic items are virtual nodes (shown as [virtual] …) and will not be written to disk.\nNotes:\n1. Preview is read-only.\n2. If a name has been cleaned, it shows \"disk name (original name)\".",
|
|
65
|
+
"gui_tooltip_indent_unit": "How many characters each level is indented.\nUsually leave blank and let the program auto-detect (typically 2 or 4).\nFor hand-written trees with a fixed 2-space indent per level, enter 2; for 4 characters per level, enter 4.\nNotes:\n1. Only integers greater than 0 are accepted.\n2. An invalid or non-numeric value is treated as \"auto\".\n3. A wrong value may break parent-child relationships—check the preview on the right.",
|
|
66
|
+
"gui_tooltip_encoding": "Text encoding used when opening \"Import text file\" or dropping a file.\nPick a common one from the dropdown, or type another encoding name (e.g. cp1252).\nThe dropdown presets can be edited in import_encodings under ~/.treeing/settings.json.\nNotes:\n1. Does not affect content pasted directly into the input box (paste is always UTF-8).\n2. A wrong encoding name causes import to fail.",
|
|
67
|
+
"gui_tooltip_import": "Choose a \"directory tree diagram\" text file (e.g. tree.txt, asciitree.txt).\nThe content should be a folder hierarchy diagram, not notes, prose, or regular source files.\nAfter a successful import you will be asked whether to parse immediately; you may adjust the options below first.\nNotes:\n1. Encoding is decided by the \"File import encoding\" dropdown (manual entry allowed).\n2. Import replaces the current input box content.\n3. A wrong encoding raises an error.\n4. Shortcut: Ctrl+O.",
|
|
68
|
+
"gui_tooltip_clear": "Clear the input box on the left and the preview on the right.\nNotes:\n1. No second confirmation.\n2. Cannot be undone—back up your text first.\n3. Shortcut: Ctrl+L.",
|
|
69
|
+
"gui_tooltip_parse": "Analyse the directory tree structure based on the current input and the checkboxes below.\nResults appear in the preview on the right; problems raise a dialogue.\nNotes:\n1. Empty input shows a notice.\n2. If no line can be recognised, a notice is shown.\n3. When there are many warnings, the dialogue shows up to 8; click \"All warnings\" for the full list.\n4. Shortcut: Ctrl+Enter.",
|
|
70
|
+
"gui_tooltip_generate": "Create folders and empty files in the directory you choose, based on the tree diagram on the left.\nThe left side must be a tree or ASCII tree diagram, not plain prose or notes.\nClick \"Parse tree\" first and review the preview before clicking this button.\nNotes:\n1. Only empty folders and empty files are created; the diagram text is not copied into files.\n2. After choosing the target folder you will be asked to confirm; Cancel aborts without writing.\n3. When \"Abort on path conflict\" is unchecked, a later item with the same name overwrites an earlier one.\n4. Shortcut: Ctrl+G; the last target directory is remembered.",
|
|
71
|
+
"gui_tooltip_exit": "Close the program.\nYou can also click the × at the top-right of the window.\nNotes:\n1. Input box content is not saved automatically; if there is content, you will be asked to confirm.",
|
|
72
|
+
"gui_tooltip_about": "Show the program version, feature overview, and licence information.",
|
|
73
|
+
"gui_tooltip_allow_nested": "Usually leave this unchecked.\nCheck it only when a single line contains a slash path like src/main/app.py and you want it created as real folder levels.\nNotes:\n1. Use only with content you trust.\n2. Paths containing .. or starting with a drive letter like C:\\ or D:\\ are rejected.\n3. When unchecked, the whole line is treated as one filename (slashes become underscores, etc.).",
|
|
74
|
+
"gui_tooltip_fail_on_conflict": "When checked, any duplicate name, or a name used as both a file and a folder, immediately aborts and rolls back what was created this run.\nNotes:\n1. Only affects \"Generate directories/files\".\n2. Pre-existing content in the target folder is not deleted.\n3. On a failure such as missing write permission, it also tries to roll back what was just created.",
|
|
75
|
+
"gui_tooltip_strict_dirs": "Usually leave this unchecked (the default is fine).\nDecides how lines that do not clearly indicate whether they are a file or a folder are interpreted.\nChecked: names without an extension like .py or .txt default to folders (e.g. SubDir).\nUnchecked: names with uppercase letters may be treated as files instead of folders.\nNotes:\n1. Only affects lines with branch symbols like ├──.\n2. Lines ending with / are always folders in both modes.\n3. Anything with children below it is always a folder.\n4. Common filenames like Makefile and README are always files.",
|
|
76
|
+
"gui_tooltip_no_fix": "When checked, irregular indentation is no longer auto-repaired.\nEnable only when the input is already well-aligned and you want to parse it verbatim.\nNotes:\n1. With messy indentation you may get more warnings or grey temporary levels.\n2. Can be combined with \"Indent unit\".",
|
|
77
|
+
"gui_tooltip_toggle_tree": "Toggle between fully expanded and fully collapsed.\n▼ fully expanded (click to collapse); ▶ fully collapsed (click to expand).\nNotes:\n1. Affects the preview area only; does not modify the input.\n2. After manually expanding/collapsing individual nodes, the icon may not match the actual state exactly.",
|
|
78
|
+
"gui_tooltip_view_warnings": "View all current parse/generation warnings in a dialogue.\nThe button is disabled when there are no warnings; you can also double-click the status bar at the bottom.\nNotes:\n1. Shows only the warnings from the most recent parse/generation in this session.",
|
|
79
|
+
"gui_tooltip_font_size": "Adjust the monospace font size (8–24) of the input box on the left.\nThe setting is saved to ~/.treeing/settings.json in your user directory.\nNotes:\n1. Affects only the input box font, not the preview area.",
|
|
80
|
+
"cli_help_desc": "Treeing — ASCII tree → directory/file generator (CLI)\nTurns `tree` command output or hand-written ASCII trees into real empty directories and empty files.",
|
|
81
|
+
"cli_help_epilog": "Usage (<args> shown below):\n {cli_python} <args> # source\n {cli_exe_unix} <args> # Linux / macOS executable\n {cli_exe_win} <args> # Windows executable\n\nExample <args>:\n -i tree.txt -o ./out --dry-run\n -i tree.txt -o ./out --confirm\n -i tree.txt -o ./out --yes --fail-on-conflict\n help confirm # write confirmation\n --help-full # full help\n --about # about\n\nMore: help (topic list) | see the user guide",
|
|
82
|
+
"cli_help_full_flag": "Show full help (detailed description of each option)",
|
|
83
|
+
"cli_help_full_header": "======== Option details (matches GUI tooltips) ========",
|
|
84
|
+
"cli_help_full_section_automation": "[Automation]",
|
|
85
|
+
"cli_help_full_section_generate": "[Generation]",
|
|
86
|
+
"cli_help_full_section_input": "[Input / Output / Encoding]",
|
|
87
|
+
"cli_help_full_section_parse": "[Parsing]",
|
|
88
|
+
"cli_help_full_section_platform": "[Platform]",
|
|
89
|
+
"cli_help_full_topic_line": " help {topic} — {title}",
|
|
90
|
+
"cli_help_group_automation": "Automation / output format",
|
|
91
|
+
"cli_help_group_generate": "Generation options",
|
|
92
|
+
"cli_help_group_input": "Input",
|
|
93
|
+
"cli_help_group_output": "Output",
|
|
94
|
+
"cli_help_group_parse": "Parse options",
|
|
95
|
+
"cli_help_topic_automation": "(Example) Recommended CI / agent combos:\n --dry-run --json --quiet --warn-exit-code --fail-on-conflict\n --yes --json --quiet --fail-on-conflict\n --warnings-file /path/to/log\nNotes:\n1. Always pass -o explicitly.\n2. Dry-run first, then --yes for the real run.\n3. Exit codes: 0 success, 1 failure, 2 warnings (needs --warn-exit-code).\n4. In non-interactive environments use --yes or TREEING_YES=1, not --confirm.",
|
|
96
|
+
"cli_help_topic_confirm": "Confirmation policy before writing to disk (matches the GUI \"Confirm generation\").\n\n--confirm: prints paths and node count to stderr, interactive [y/N] (default No). TTY only.\n--yes / -y: no prompt, treated as confirmed (explicit allow for CI / agents); prints an [INFO] audit line to stdout (omitted with --quiet).\nTREEING_YES=1: same as --yes (for containers / scheduled tasks; accepts 1/true/yes/on).\n\nNotes:\n1. Default is no prompt, for script compatibility.\n2. --confirm and --yes are mutually exclusive; --confirm and --json are mutually exclusive.\n3. --dry-run writes nothing; if combined with --confirm, prints one [WARN] line to stdout and ignores it.\n4. When the user picks N, the exit code is 0 (cancelled).\n\nRecommended:\n --dry-run --format tree # preview structure first\n --confirm # manual confirm\n --yes --fail-on-conflict # unattended script",
|
|
97
|
+
"cli_help_topic_dry_run": "Run parsing and path registration, but skip mkdir/touch.\nNotes:\n1. With --fail-on-conflict, conflicts only warn instead of aborting.\n2. Recommended before every real run.",
|
|
98
|
+
"cli_help_topic_format": "text: print an [OK]/[DRY-RUN] summary to stdout.\ntree: print an ASCII preview tree to stdout (node names match the GUI preview).\nNotes:\n1. With --format tree, the text summary is not printed.\n2. With --json, the tree_preview field is an array of strings.",
|
|
99
|
+
"cli_help_topic_input": "Read an ASCII directory tree from a file (-i) or standard input (-p).\nNotes:\n1. -i and -p are mutually exclusive.\n2. Without -i/-p, prints --help.\n3. In pipe scenarios, prefer -i or explicit -p to avoid confusion with the help subcommand.",
|
|
100
|
+
"cli_help_topic_json": "Print a single-line JSON object to stdout with ok, node_count, warnings, exit_code, etc.\nNotes:\n1. With --quiet, stdout contains only the JSON.\n2. With --warn-exit-code, exit_code may be 2.\n3. On failure, an error field is included.",
|
|
101
|
+
"cli_help_topic_output": "Specify the root directory for generated output (-o).\nNotes:\n1. Defaults to '.' (current working directory); in scripts, always specify it explicitly.\n2. When -o is not given and the current directory is the write target, prints one [WARN] line to stdout (omitted under --dry-run; with --json --quiet it goes into a JSON field).\n3. --use-settings reads last_generate_dir from ~/.treeing/settings.json (not for CI); falling back to '.' also emits a [WARN].\n4. --check-writable checks write permission before writing (including not-yet-existing subpaths).",
|
|
102
|
+
"cli_help_topic_parse": "Parsing is done by build_tree; --no-fix, --strict-dirs, and --indent-unit affect the result.\nNotes:\n1. Parse warnings go to stdout (the [WARN] block) or --warnings-file.\n2. --format tree shows the same preview tree as the GUI.",
|
|
103
|
+
"cli_help_topic_rollback_on_error": "On an exception during writing (non-dry-run), roll back files/directories created during this run.\nNotes:\n1. Off by default: on failure, partial results are kept.\n2. Unlike --fail-on-conflict (which targets path conflicts), this targets I/O and similar errors.\n3. No equivalent in the GUI.",
|
|
104
|
+
"cli_help_topic_see_also": "See also: --help-full | user guide\nLaunch: {cli_python} | {cli_exe_unix} | {cli_exe_win}",
|
|
105
|
+
"cli_help_topic_strict": "Equivalent to --fail-on-conflict --no-fix.\nNotes:\n1. Suitable for strict CI runs.\n2. With irregular indentation, parse warnings or virtual nodes are more likely.",
|
|
106
|
+
"cli_help_topic_title_about": "Topic: about",
|
|
107
|
+
"cli_help_topic_title_allow_nested": "Topic: nested path names (--allow-nested-names)",
|
|
108
|
+
"cli_help_topic_title_automation": "Topic: automation & CI",
|
|
109
|
+
"cli_help_topic_title_confirm": "Topic: write confirmation (--confirm / --yes)",
|
|
110
|
+
"cli_help_topic_title_dry_run": "Topic: preview mode (--dry-run)",
|
|
111
|
+
"cli_help_topic_title_encoding": "Topic: encoding (--encoding)",
|
|
112
|
+
"cli_help_topic_title_fail_on_conflict": "Topic: abort on conflict (--fail-on-conflict)",
|
|
113
|
+
"cli_help_topic_title_format": "Topic: output format (--format)",
|
|
114
|
+
"cli_help_topic_title_indent_unit": "Topic: indent unit (--indent-unit)",
|
|
115
|
+
"cli_help_topic_title_input": "Topic: input (-i / -p)",
|
|
116
|
+
"cli_help_topic_title_json": "Topic: JSON output (--json)",
|
|
117
|
+
"cli_help_topic_title_no_fix": "Topic: disable auto-repair (--no-fix)",
|
|
118
|
+
"cli_help_topic_title_output": "Topic: output (-o)",
|
|
119
|
+
"cli_help_topic_title_parse": "Topic: parsing flow",
|
|
120
|
+
"cli_help_topic_title_rollback_on_error": "Topic: rollback on error (--rollback-on-error)",
|
|
121
|
+
"cli_help_topic_title_strict": "Topic: strict mode (--strict)",
|
|
122
|
+
"cli_help_topic_title_strict_dirs": "Topic: strict directory inference (--strict-dirs)",
|
|
123
|
+
"cli_help_topic_title_warnings": "Topic: warnings",
|
|
124
|
+
"cli_help_topic_title_windows": "Topic: Windows tips",
|
|
125
|
+
"cli_help_topic_windows": "(Example) Capture a tree on Windows: tree /F /A > mytree.txt\nNotes:\n1. For non-UTF-8 files, pass the matching codepage, e.g. --encoding cp1252.\n2. The CLI already handles console encoding; PYTHONIOENCODING is usually unnecessary.\n3. For scheduled tasks, set \"Start in\" and pass -o explicitly.",
|
|
126
|
+
"cli_help_topics_footer": "Tips: --help for a short option list | --help-full for full details | --about for about\nLaunch: {cli_python} | {cli_exe_unix} | {cli_exe_win}",
|
|
127
|
+
"cli_help_topics_intro": "Treeing CLI help topics.\nUsage:\n {cli_python} help <topic> # source\n {cli_exe_unix} help <topic> # Linux / macOS executable\n {cli_exe_win} help <topic> # Windows executable",
|
|
128
|
+
"cli_help_topics_item": " {topic:<16} {title}",
|
|
129
|
+
"cli_help_topics_section_automation": "[Automation]",
|
|
130
|
+
"cli_help_topics_section_generate": "[Generation]",
|
|
131
|
+
"cli_help_topics_section_input": "[Input & output]",
|
|
132
|
+
"cli_help_topics_section_meta": "[Other]",
|
|
133
|
+
"cli_help_topics_section_parse": "[Parsing]",
|
|
134
|
+
"cli_help_topics_section_platform": "[Platform]",
|
|
135
|
+
"cli_help_unknown_topic": "[ERR] Unknown help topic: {topic}",
|
|
136
|
+
"cli_about_flag": "Show about info (version, overview, licence, etc.)",
|
|
137
|
+
"cli_allow_nested_names": "Treat / \\ in names as path segments and create levels (trusted input only; see help allow-nested)",
|
|
138
|
+
"cli_check_writable": "Extra check that the output directory is writable before generation (whether the output path is a directory is always checked)",
|
|
139
|
+
"cli_confirm": "Interactive confirm [y/N] before writing (needs TTY; mutually exclusive with --yes)",
|
|
140
|
+
"cli_confirm_cancelled": "[INFO] Generation cancelled",
|
|
141
|
+
"cli_confirm_conflict_disabled": "Without --fail-on-conflict, items with the same name may be overwritten.",
|
|
142
|
+
"cli_confirm_conflict_enabled": "With --fail-on-conflict: path conflicts abort and roll back.",
|
|
143
|
+
"cli_confirm_dry_run_ignored": "[WARN] --confirm has no effect under --dry-run",
|
|
144
|
+
"cli_confirm_no_warnings": "No parse warnings currently.",
|
|
145
|
+
"cli_confirm_prompt": "Continue? {suffix}",
|
|
146
|
+
"cli_confirm_warn_count": "Parse warnings: {count} (see the stdout [WARN] block or --warnings-file).",
|
|
147
|
+
"cli_confirm_yes_audit": "[INFO] Generation confirmed: {count} node(s) -> {path}",
|
|
148
|
+
"cli_dry_run": "Preview only, do not write to disk (recommended for first use)",
|
|
149
|
+
"cli_dry_run_msg": "[DRY-RUN] Preview mode: {count} valid node(s), nothing created",
|
|
150
|
+
"cli_empty_tree": "[ERR] Parse result is empty; nothing generated",
|
|
151
|
+
"cli_encoding": "Input encoding (applies to both -i and -p; default utf-8)",
|
|
152
|
+
"cli_err_warnings_file_write": "[WARN] Could not write warnings file {path}: {error}",
|
|
153
|
+
"cli_error_confirm_json": "Cannot combine --confirm with --json",
|
|
154
|
+
"cli_error_confirm_not_tty": "[ERR] --confirm requires an interactive terminal; use --yes, TREEING_YES=1, or --dry-run instead",
|
|
155
|
+
"cli_error_input_conflict": "Cannot combine --paste (-p) with --input (-i)",
|
|
156
|
+
"cli_fail_on_conflict": "Abort and roll back on duplicate paths or type conflicts (same as GUI)",
|
|
157
|
+
"cli_fail_on_duplicate": "Deprecated; same as --fail-on-conflict",
|
|
158
|
+
"cli_format": "Output format: text (default summary) or tree (ASCII preview tree, same semantics as the GUI preview)",
|
|
159
|
+
"cli_generate_failed": "[ERR] Generation failed: {error}",
|
|
160
|
+
"cli_generate_success": "[OK] Successfully generated {count} node(s) to '{path}'",
|
|
161
|
+
"cli_indent_unit": "Indent unit in characters N (default: auto-detect; see help indent-unit)",
|
|
162
|
+
"cli_input_file": "Input file path (ASCII tree text). Mutually exclusive with -p",
|
|
163
|
+
"cli_json": "Output the result as JSON to stdout (for scripts and agents)",
|
|
164
|
+
"cli_msg_generate_confirm": "This will create empty folders and empty files in the following directory ({count} node(s)):\n\n {path}\n\n{conflict_hint}\n{warn_hint}",
|
|
165
|
+
"cli_no_fix": "Disable indentation auto-repair (same as GUI \"Disable auto-repair\")",
|
|
166
|
+
"cli_no_warn_limit": "Show all warnings in the terminal without truncation",
|
|
167
|
+
"cli_output_dir": "Output root directory (default .; in scripts, specify it explicitly)",
|
|
168
|
+
"cli_output_is_file": "[ERR] Output path is a file, not a directory: {path}",
|
|
169
|
+
"cli_output_not_writable": "[ERR] Output directory is not writable: {path}",
|
|
170
|
+
"cli_paste": "Read from standard input (mutually exclusive with -i; prompt on stderr)",
|
|
171
|
+
"cli_prompt_paste": "Paste the tree structure, end with Ctrl+D (Linux/Mac) or Ctrl+Z (Windows):",
|
|
172
|
+
"cli_quiet": "Suppress stdout warnings and text summary (common with --json; the implicit -o notice goes into the JSON)",
|
|
173
|
+
"cli_reading_error": "[ERR] Failed to read file: {error}",
|
|
174
|
+
"cli_reading_stdin_error": "[ERR] Failed to read standard input: {error}",
|
|
175
|
+
"cli_rollback_on_error": "Roll back files/directories created this run on write failure (default: keep partial results)",
|
|
176
|
+
"cli_strict": "Strict mode: equivalent to --fail-on-conflict --no-fix",
|
|
177
|
+
"cli_strict_dirs": "Strict directory inference (same as GUI; branch lines default to directories)",
|
|
178
|
+
"cli_use_settings": "When -o is not given, read last_generate_dir from ~/.treeing/settings.json",
|
|
179
|
+
"cli_version_fmt": "Treeing {version}",
|
|
180
|
+
"cli_warn_exit_code": "Exit with code 2 when successful but with parse/generation warnings",
|
|
181
|
+
"cli_warn_implicit_output": "[WARN] -o not specified; will write to the current directory: {path}",
|
|
182
|
+
"cli_warn_limit": "Maximum number of warnings shown in the terminal (default 10)",
|
|
183
|
+
"cli_warning_header": "[WARN] Found {count} warning(s):",
|
|
184
|
+
"cli_warning_header_truncated": "[WARN] Found {count} warning(s) (showing {shown}):",
|
|
185
|
+
"cli_warning_item": " {warning}",
|
|
186
|
+
"cli_warning_more": " ... {extra} more",
|
|
187
|
+
"cli_warning_section": " [{title}] {count}",
|
|
188
|
+
"cli_warning_section_generate": "Generation",
|
|
189
|
+
"cli_warning_section_parse": "Parse",
|
|
190
|
+
"cli_warnings_file": "Write all warnings to a UTF-8 file (one per line, prefixed with [parse]/[generate])",
|
|
191
|
+
"cli_yes": "Skip confirmation, treat as confirmed (CI / agent; mutually exclusive with --confirm)",
|
|
192
|
+
"core_err_path_conflict": "Path conflict '{name}'; generation aborted",
|
|
193
|
+
"core_err_path_conflict_rolled": "Path conflict '{name}'; generation aborted (rolled back {rolled} item(s))",
|
|
194
|
+
"core_hint_indent_unit_check": "An indent unit was specified manually, but parsing encountered indent repair or multiple root nodes. Verify the indent unit matches the input (CLI: --indent-unit; GUI: indent unit).",
|
|
195
|
+
"core_kind_dir": "directory",
|
|
196
|
+
"core_kind_file": "file",
|
|
197
|
+
"core_warn_disk_type_conflict": "⚠️ Path '{path}' is already a {existing_kind} in the output directory and cannot be created as a {new_kind}",
|
|
198
|
+
"core_warn_dot_root": "The root node '.' means the current directory; contents will be generated directly into the target path",
|
|
199
|
+
"core_warn_duplicate_path": "⚠️ Duplicate path '{name}'; the later one will overwrite the earlier",
|
|
200
|
+
"core_warn_empty_input": "Input is empty or has no valid nodes",
|
|
201
|
+
"core_warn_indent_fixed": "Line {line} indent fixed from {old} to {new} (unit {unit})",
|
|
202
|
+
"core_warn_indent_jump": "Indent jump: inserted virtual directory '<auto>' under '{parent}'",
|
|
203
|
+
"core_warn_inferred_dir": "Inferred '{name}' as a directory from its children",
|
|
204
|
+
"core_warn_inferred_dir_heuristic": "Inferred '{name}' as a directory from the branch prefix",
|
|
205
|
+
"core_warn_multiple_roots": "Detected {count} root node(s): {names}",
|
|
206
|
+
"core_warn_name_clean": "⚠️ Name '{old}' cleaned to '{new}'",
|
|
207
|
+
"core_warn_nested_rejected": "⚠️ Nested path '{name}' contains an illegal segment (.. or absolute path); flattened",
|
|
208
|
+
"core_warn_orphan": "Line {line} orphan node '{name}' treated as a root",
|
|
209
|
+
"core_warn_path_too_long": "⚠️ Path too long ({length} chars); may fail: {path}",
|
|
210
|
+
"core_warn_path_type_conflict": "⚠️ Path '{path}' is already a {existing_kind} and cannot be created as a {new_kind}",
|
|
211
|
+
"core_warn_path_under_file": "⚠️ Path '{path}' is under file '{file}' and cannot be created",
|
|
212
|
+
"core_warn_skip_subtree": "⚠️ Node '{name}' and its subtree skipped (nested path conflict or unable to create an intermediate directory)",
|
|
213
|
+
"core_warn_unrecognized_line": "Line {line} unrecognised and skipped: {content}",
|
|
214
|
+
"core_warn_virtual_root": "Created virtual root node '<virtual>'",
|
|
215
|
+
"build_artifact_missing": "Build artifact does not exist: {path}",
|
|
216
|
+
"build_artifact_too_small": "Build artifact too small: {path} ({size} bytes, minimum {min_size})",
|
|
217
|
+
"build_done": "[OK] Build complete; executable at dist/{exe}",
|
|
218
|
+
"build_resource_missing": "Build resource does not exist: {path}",
|
|
219
|
+
"build_skip_icon": "No platform-specific build icon; skipping --icon",
|
|
220
|
+
"build_start_target": "Building {target} ...",
|
|
221
|
+
"build_using_icon": "Using icon: {icon}"
|
|
222
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: treeing
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: ASCII tree → directory/file generator
|
|
5
|
+
Author: MING
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/xiao-ming-b65536/treeing
|
|
8
|
+
Project-URL: Source, https://github.com/xiao-ming-b65536/treeing
|
|
9
|
+
Project-URL: Issue Tracker, https://github.com/xiao-ming-b65536/treeing/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/xiao-ming-b65536/treeing/blob/main/CHANGELOG.md
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Environment :: X11 Applications
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# Treeing — ASCII tree → directory/file generator
|
|
29
|
+
|
|
30
|
+
Turn directory-tree text (e.g. output from the `tree` command) into real folders and empty files.
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- Common `tree` output formats: Unicode box-drawing, pipe style, Windows `tree`, space-indented trees.
|
|
35
|
+
- Automatic indent repair (disable with `--no-fix` or the GUI checkbox).
|
|
36
|
+
- Both a GUI and a CLI.
|
|
37
|
+
- Cross-platform: Windows, macOS, Linux.
|
|
38
|
+
- User-visible strings live in `treeing/strings.json` (bootstrap errors in `treeing/strings.bootstrap.json`).
|
|
39
|
+
|
|
40
|
+
## Preview
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
> Screenshot: Windows, English UI, parsing a sample project tree.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
### Install from PyPI
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install treeing
|
|
52
|
+
treeing -i tree.txt -o ./out # CLI
|
|
53
|
+
treeing-gui # GUI
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The CLI needs only the Python standard library. The GUI uses `tkinter`; on Linux install it with `sudo apt-get install python3-tk` (it ships with Python on Windows and macOS).
|
|
57
|
+
|
|
58
|
+
### Run from source
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
python -m venv .venv
|
|
62
|
+
# Windows: .\.venv\Scripts\pip install -r requirements-build.txt
|
|
63
|
+
# Unix: .venv/bin/pip install -r requirements-build.txt
|
|
64
|
+
|
|
65
|
+
python -m treeing.main # GUI
|
|
66
|
+
python -m treeing.main -i tree.txt -o ./out # CLI
|
|
67
|
+
python -m treeing.main --help # CLI help
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Run a prebuilt executable
|
|
71
|
+
|
|
72
|
+
Prebuilt binaries are attached to each [release](https://github.com/xiao-ming-b65536/treeing/releases) (Windows, Linux, macOS ARM, macOS x86). Pick the archive for your platform (replace `vX.Y.Z` with the actual version):
|
|
73
|
+
|
|
74
|
+
| Platform | Archives |
|
|
75
|
+
|---|---|
|
|
76
|
+
| Windows | `treeing-cli-windows-vX.Y.Z.zip`, `treeing-gui-windows-vX.Y.Z.zip` |
|
|
77
|
+
| Linux | `treeing-cli-linux-vX.Y.Z.tar.gz`, `treeing-gui-linux-vX.Y.Z.tar.gz` |
|
|
78
|
+
| macOS (Apple Silicon) | `treeing-cli-macos-arm64-vX.Y.Z.tar.gz`, `treeing-gui-macos-arm64-vX.Y.Z.tar.gz` |
|
|
79
|
+
| macOS (Intel) | `treeing-cli-macos-x86_64-vX.Y.Z.tar.gz`, `treeing-gui-macos-x86_64-vX.Y.Z.tar.gz` |
|
|
80
|
+
|
|
81
|
+
CLI and GUI are packaged separately; download whichever you need. Verify against `SHA256SUMS.txt` in the same release.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
treeing-gui # GUI — Linux / macOS
|
|
85
|
+
treeing-gui.exe # GUI — Windows
|
|
86
|
+
|
|
87
|
+
treeing-cli -i tree.txt -o ./out # CLI — Linux / macOS
|
|
88
|
+
treeing-cli.exe -i tree.txt -o ./out # CLI — Windows
|
|
89
|
+
treeing-cli --help # CLI help — Linux / macOS
|
|
90
|
+
treeing-cli.exe --help # CLI help — Windows
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Build executables yourself
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install -r requirements-build.txt
|
|
97
|
+
python build.py --target all # outputs to dist/<platform>/
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Documentation
|
|
101
|
+
|
|
102
|
+
See [docs/USER_GUIDE.md](docs/USER_GUIDE.md) for a unified guide covering source runs and prebuilt executables on Windows, macOS ARM, macOS x86, and Linux.
|
|
103
|
+
|
|
104
|
+
## Legal
|
|
105
|
+
|
|
106
|
+
- **Licence** — MIT; see [LICENSE](LICENSE).
|
|
107
|
+
- **Privacy Policy** — see [PRIVACY.md](PRIVACY.md).
|
|
108
|
+
- **Terms of Use** — see [TERMS.md](TERMS.md).
|
|
109
|
+
|
|
110
|
+
## AI Disclosure
|
|
111
|
+
|
|
112
|
+
Parts of this source code were written with assistance from AI coding tools.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
treeing/__init__.py,sha256=LJhSCoS7AIBSQy8dra8pDI1zv0n8A8_2YShnEqQxkLg,180
|
|
2
|
+
treeing/_release_defaults.py,sha256=C0VOMnYuk0VhPVR8PTnIGVtiiiKVL_9APzM4Y9S6G3I,135
|
|
3
|
+
treeing/cli_entry.py,sha256=2As3RVutfzQnLJrpJjC3Ub_1vXBvpWIDzZhZuChcaKY,404
|
|
4
|
+
treeing/config.py,sha256=4ZnFJIIHq0iP71MVcd_G7PBWbe6kh--P1eCV4dQuuPI,6519
|
|
5
|
+
treeing/gui_entry.py,sha256=CvRpVa838-R9cObPxGGXKDOcUHtTM63uiioiBf_Jylo,938
|
|
6
|
+
treeing/main.py,sha256=wYUwVbWzv822urPvaDbq8LYF4vcOGxXF8oZ83DNBdN0,566
|
|
7
|
+
treeing/path_checks.py,sha256=GduxRIhdpd1RXZVsgZaOreXySyQPqwPXtTFt4d7PWsA,2726
|
|
8
|
+
treeing/strings.bootstrap.json,sha256=nVk3KUYQkmUXnG7qIy73fpaIheVkilQm8trlFD-g2Ys,428
|
|
9
|
+
treeing/strings.json,sha256=m_bt8AJpfK5vG6IGrZAKDzGl6Vuxu2TdbadhaXlNPAI,27168
|
|
10
|
+
treeing/assets/icon.icns,sha256=17qU_h9nR99Ldtl8b9orDtJ4g-0urmwjQcRT9B1AMhE,272900
|
|
11
|
+
treeing/assets/icon.ico,sha256=uvUj-V6Lqo-ChsSqNzpQ5EP-huBMUkhSK5gkTRESkbk,7546
|
|
12
|
+
treeing/assets/icon.png,sha256=cVxdImObB_cSLWSwG5irPEGwY548b4EdzSIqW1i8_YU,2068
|
|
13
|
+
treeing/cli/__init__.py,sha256=1740fG0bbj2_K0_qrE6UKMqdUOUJbv8Xa5CqhkAvgjQ,176
|
|
14
|
+
treeing/cli/confirm.py,sha256=En3Zq4CMCSiiofL9-LQ5Gl3heVGw1O1_GAhj1wb6jao,5444
|
|
15
|
+
treeing/cli/help_text.py,sha256=jl9olXbRQTqjrxNTEXVYFBZ_Uu7gsNazts9E4hYAXMM,12062
|
|
16
|
+
treeing/cli/io.py,sha256=jFP1JTLhVu0RzWdo5XvkSH_Gt94LwAyROhlcVNx-jEU,2028
|
|
17
|
+
treeing/cli/main.py,sha256=fSi5Izc3xXXan7Yk-y7naKqTzeBK0gSw20fm1qoomeg,13423
|
|
18
|
+
treeing/cli/report.py,sha256=Ux1cwusxxcY1mIqRfMpdDRag-XDL6oXlHsZRmYnssBc,2984
|
|
19
|
+
treeing/core/__init__.py,sha256=QMs-3DhcS8D5xQIt5D1SzxLqCZAcK8BmkRRR8gOlJVA,444
|
|
20
|
+
treeing/core/constants.py,sha256=ypIM_kUhUIch_Pzq1SHHkkW2vovDu_CZZ3Km6z24Kvc,752
|
|
21
|
+
treeing/core/generator.py,sha256=A7ncMENmRfD98n0eOH8f1IlFEQ8p6Qs1XkmrPH8-eW8,19694
|
|
22
|
+
treeing/core/parser.py,sha256=x4VPXkfSEOOtxMlC-CYpDIpZVRoF3NQ-BlfTae_20ok,14740
|
|
23
|
+
treeing/core/preview.py,sha256=i8sHCi-vFVWB_zVk_-7khMlH_4ELH2N9H3h5HqSWTJw,3652
|
|
24
|
+
treeing/gui/__init__.py,sha256=G6j5AjUKvDFMrxweEblWy8ewX075jPLmiveCft2kVOc,134
|
|
25
|
+
treeing/gui/app.py,sha256=AFAppNQXM7Wb4zLP9gw7LIZ8J7SRbvDHHnRPQihMj5k,35991
|
|
26
|
+
treeing/gui/dnd.py,sha256=zFdGUHfyBcGkgq--5bWXtnk34iQZYK7kKVoyEz8RPcA,4165
|
|
27
|
+
treeing/gui/icon.py,sha256=Pl9Fbug9RKQUIiBgfg-UPe8U07aTdouHBJmnXouK-wE,1975
|
|
28
|
+
treeing/gui/preview.py,sha256=Mh6GPsHPWa7CJsqls0pqwnd8vnj-_V25wnM8TdaQRrc,240
|
|
29
|
+
treeing/gui/settings.py,sha256=Qwfl7qd7hI6FpDidux5dKR9uT8u1DjZMurNu9yrhTkg,2692
|
|
30
|
+
treeing/gui/tooltip.py,sha256=_IhjHCw993NhsCQ1l0cMJ1vOTFYajbVpLW1o-DJfDI0,7895
|
|
31
|
+
treeing-1.0.1.dist-info/licenses/LICENSE,sha256=u9eWdt3oRJHmLLSglq5cwZ8ET8iD9JTzPQ-vtKfvygs,1061
|
|
32
|
+
treeing-1.0.1.dist-info/METADATA,sha256=hVdbKs3svH3UjZxrofSOXVjqvQbiD9BmVioyvHFCEAU,4162
|
|
33
|
+
treeing-1.0.1.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
34
|
+
treeing-1.0.1.dist-info/entry_points.txt,sha256=OIvIWsHcyN_0a8w_0NVgsuZn0pHZukFd66MnESM6nik,94
|
|
35
|
+
treeing-1.0.1.dist-info/top_level.txt,sha256=zeXodw-2A5KAUmafCAGq0veA0Y8gCjaS41HVixv6K5E,8
|
|
36
|
+
treeing-1.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MING
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
treeing
|