Rupali Ravindra Shetye commited on
Commit
8908e91
·
1 Parent(s): c4209ad

Remove venv and update .gitignore

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitignore +3 -1
  2. DocIntel/bin/Activate.ps1 +0 -247
  3. DocIntel/bin/accelerate +0 -6
  4. DocIntel/bin/accelerate-config +0 -6
  5. DocIntel/bin/accelerate-estimate-memory +0 -6
  6. DocIntel/bin/accelerate-launch +0 -6
  7. DocIntel/bin/accelerate-merge-weights +0 -6
  8. DocIntel/bin/activate +0 -63
  9. DocIntel/bin/activate.csh +0 -26
  10. DocIntel/bin/activate.fish +0 -69
  11. DocIntel/bin/backend-test-tools +0 -6
  12. DocIntel/bin/check-model +0 -6
  13. DocIntel/bin/check-node +0 -6
  14. DocIntel/bin/chroma +0 -6
  15. DocIntel/bin/coverage +0 -6
  16. DocIntel/bin/coverage-3.11 +0 -6
  17. DocIntel/bin/coverage3 +0 -6
  18. DocIntel/bin/distro +0 -6
  19. DocIntel/bin/dotenv +0 -6
  20. DocIntel/bin/dumppdf.py +0 -468
  21. DocIntel/bin/f2py +0 -6
  22. DocIntel/bin/filetype +0 -6
  23. DocIntel/bin/fonttools +0 -6
  24. DocIntel/bin/hf +0 -6
  25. DocIntel/bin/httpx +0 -6
  26. DocIntel/bin/huggingface-cli +0 -6
  27. DocIntel/bin/idna +0 -6
  28. DocIntel/bin/isympy +0 -6
  29. DocIntel/bin/jsondiff +0 -41
  30. DocIntel/bin/jsonpatch +0 -107
  31. DocIntel/bin/jsonpointer +0 -66
  32. DocIntel/bin/jsonschema +0 -6
  33. DocIntel/bin/langchain-server +0 -6
  34. DocIntel/bin/langsmith +0 -6
  35. DocIntel/bin/langsmith 2 +0 -6
  36. DocIntel/bin/markdown-it +0 -6
  37. DocIntel/bin/nltk +0 -6
  38. DocIntel/bin/normalizer +0 -6
  39. DocIntel/bin/numba +0 -8
  40. DocIntel/bin/onnxruntime_test +0 -6
  41. DocIntel/bin/oxmsg +0 -6
  42. DocIntel/bin/pdf2txt.py +0 -324
  43. DocIntel/bin/pip +0 -6
  44. DocIntel/bin/pip3 +0 -6
  45. DocIntel/bin/pip3.11 +0 -6
  46. DocIntel/bin/plotly_get_chrome +0 -6
  47. DocIntel/bin/py.test +0 -6
  48. DocIntel/bin/pybase64 +0 -6
  49. DocIntel/bin/pyftmerge +0 -6
  50. DocIntel/bin/pyftsubset +0 -6
.gitignore CHANGED
@@ -25,6 +25,7 @@ wheels/
25
  MANIFEST
26
 
27
  # Environment
 
28
  .env
29
  .venv
30
  .virtualenv
@@ -76,4 +77,5 @@ htmlcov/
76
  *.pem
77
  *.key
78
  *.crt
79
- *.p12
 
 
25
  MANIFEST
26
 
27
  # Environment
28
+ DocIntel/
29
  .env
30
  .venv
31
  .virtualenv
 
77
  *.pem
78
  *.key
79
  *.crt
80
+ *.p12
81
+ DocIntel/
DocIntel/bin/Activate.ps1 DELETED
@@ -1,247 +0,0 @@
1
- <#
2
- .Synopsis
3
- Activate a Python virtual environment for the current PowerShell session.
4
-
5
- .Description
6
- Pushes the python executable for a virtual environment to the front of the
7
- $Env:PATH environment variable and sets the prompt to signify that you are
8
- in a Python virtual environment. Makes use of the command line switches as
9
- well as the `pyvenv.cfg` file values present in the virtual environment.
10
-
11
- .Parameter VenvDir
12
- Path to the directory that contains the virtual environment to activate. The
13
- default value for this is the parent of the directory that the Activate.ps1
14
- script is located within.
15
-
16
- .Parameter Prompt
17
- The prompt prefix to display when this virtual environment is activated. By
18
- default, this prompt is the name of the virtual environment folder (VenvDir)
19
- surrounded by parentheses and followed by a single space (ie. '(.venv) ').
20
-
21
- .Example
22
- Activate.ps1
23
- Activates the Python virtual environment that contains the Activate.ps1 script.
24
-
25
- .Example
26
- Activate.ps1 -Verbose
27
- Activates the Python virtual environment that contains the Activate.ps1 script,
28
- and shows extra information about the activation as it executes.
29
-
30
- .Example
31
- Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
32
- Activates the Python virtual environment located in the specified location.
33
-
34
- .Example
35
- Activate.ps1 -Prompt "MyPython"
36
- Activates the Python virtual environment that contains the Activate.ps1 script,
37
- and prefixes the current prompt with the specified string (surrounded in
38
- parentheses) while the virtual environment is active.
39
-
40
- .Notes
41
- On Windows, it may be required to enable this Activate.ps1 script by setting the
42
- execution policy for the user. You can do this by issuing the following PowerShell
43
- command:
44
-
45
- PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
46
-
47
- For more information on Execution Policies:
48
- https://go.microsoft.com/fwlink/?LinkID=135170
49
-
50
- #>
51
- Param(
52
- [Parameter(Mandatory = $false)]
53
- [String]
54
- $VenvDir,
55
- [Parameter(Mandatory = $false)]
56
- [String]
57
- $Prompt
58
- )
59
-
60
- <# Function declarations --------------------------------------------------- #>
61
-
62
- <#
63
- .Synopsis
64
- Remove all shell session elements added by the Activate script, including the
65
- addition of the virtual environment's Python executable from the beginning of
66
- the PATH variable.
67
-
68
- .Parameter NonDestructive
69
- If present, do not remove this function from the global namespace for the
70
- session.
71
-
72
- #>
73
- function global:deactivate ([switch]$NonDestructive) {
74
- # Revert to original values
75
-
76
- # The prior prompt:
77
- if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
78
- Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
79
- Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
80
- }
81
-
82
- # The prior PYTHONHOME:
83
- if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
84
- Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
85
- Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
86
- }
87
-
88
- # The prior PATH:
89
- if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
90
- Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
91
- Remove-Item -Path Env:_OLD_VIRTUAL_PATH
92
- }
93
-
94
- # Just remove the VIRTUAL_ENV altogether:
95
- if (Test-Path -Path Env:VIRTUAL_ENV) {
96
- Remove-Item -Path env:VIRTUAL_ENV
97
- }
98
-
99
- # Just remove VIRTUAL_ENV_PROMPT altogether.
100
- if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
101
- Remove-Item -Path env:VIRTUAL_ENV_PROMPT
102
- }
103
-
104
- # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
105
- if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
106
- Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
107
- }
108
-
109
- # Leave deactivate function in the global namespace if requested:
110
- if (-not $NonDestructive) {
111
- Remove-Item -Path function:deactivate
112
- }
113
- }
114
-
115
- <#
116
- .Description
117
- Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
118
- given folder, and returns them in a map.
119
-
120
- For each line in the pyvenv.cfg file, if that line can be parsed into exactly
121
- two strings separated by `=` (with any amount of whitespace surrounding the =)
122
- then it is considered a `key = value` line. The left hand string is the key,
123
- the right hand is the value.
124
-
125
- If the value starts with a `'` or a `"` then the first and last character is
126
- stripped from the value before being captured.
127
-
128
- .Parameter ConfigDir
129
- Path to the directory that contains the `pyvenv.cfg` file.
130
- #>
131
- function Get-PyVenvConfig(
132
- [String]
133
- $ConfigDir
134
- ) {
135
- Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
136
-
137
- # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
138
- $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
139
-
140
- # An empty map will be returned if no config file is found.
141
- $pyvenvConfig = @{ }
142
-
143
- if ($pyvenvConfigPath) {
144
-
145
- Write-Verbose "File exists, parse `key = value` lines"
146
- $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
147
-
148
- $pyvenvConfigContent | ForEach-Object {
149
- $keyval = $PSItem -split "\s*=\s*", 2
150
- if ($keyval[0] -and $keyval[1]) {
151
- $val = $keyval[1]
152
-
153
- # Remove extraneous quotations around a string value.
154
- if ("'""".Contains($val.Substring(0, 1))) {
155
- $val = $val.Substring(1, $val.Length - 2)
156
- }
157
-
158
- $pyvenvConfig[$keyval[0]] = $val
159
- Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
160
- }
161
- }
162
- }
163
- return $pyvenvConfig
164
- }
165
-
166
-
167
- <# Begin Activate script --------------------------------------------------- #>
168
-
169
- # Determine the containing directory of this script
170
- $VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
171
- $VenvExecDir = Get-Item -Path $VenvExecPath
172
-
173
- Write-Verbose "Activation script is located in path: '$VenvExecPath'"
174
- Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
175
- Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
176
-
177
- # Set values required in priority: CmdLine, ConfigFile, Default
178
- # First, get the location of the virtual environment, it might not be
179
- # VenvExecDir if specified on the command line.
180
- if ($VenvDir) {
181
- Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
182
- }
183
- else {
184
- Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
185
- $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
186
- Write-Verbose "VenvDir=$VenvDir"
187
- }
188
-
189
- # Next, read the `pyvenv.cfg` file to determine any required value such
190
- # as `prompt`.
191
- $pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
192
-
193
- # Next, set the prompt from the command line, or the config file, or
194
- # just use the name of the virtual environment folder.
195
- if ($Prompt) {
196
- Write-Verbose "Prompt specified as argument, using '$Prompt'"
197
- }
198
- else {
199
- Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
200
- if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
201
- Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
202
- $Prompt = $pyvenvCfg['prompt'];
203
- }
204
- else {
205
- Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
206
- Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
207
- $Prompt = Split-Path -Path $venvDir -Leaf
208
- }
209
- }
210
-
211
- Write-Verbose "Prompt = '$Prompt'"
212
- Write-Verbose "VenvDir='$VenvDir'"
213
-
214
- # Deactivate any currently active virtual environment, but leave the
215
- # deactivate function in place.
216
- deactivate -nondestructive
217
-
218
- # Now set the environment variable VIRTUAL_ENV, used by many tools to determine
219
- # that there is an activated venv.
220
- $env:VIRTUAL_ENV = $VenvDir
221
-
222
- if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
223
-
224
- Write-Verbose "Setting prompt to '$Prompt'"
225
-
226
- # Set the prompt to include the env name
227
- # Make sure _OLD_VIRTUAL_PROMPT is global
228
- function global:_OLD_VIRTUAL_PROMPT { "" }
229
- Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
230
- New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
231
-
232
- function global:prompt {
233
- Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
234
- _OLD_VIRTUAL_PROMPT
235
- }
236
- $env:VIRTUAL_ENV_PROMPT = $Prompt
237
- }
238
-
239
- # Clear PYTHONHOME
240
- if (Test-Path -Path Env:PYTHONHOME) {
241
- Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
242
- Remove-Item -Path Env:PYTHONHOME
243
- }
244
-
245
- # Add the venv to the PATH
246
- Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
247
- $Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/accelerate DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from accelerate.commands.accelerate_cli import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/accelerate-config DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from accelerate.commands.config import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/accelerate-estimate-memory DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from accelerate.commands.estimate import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/accelerate-launch DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from accelerate.commands.launch import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/accelerate-merge-weights DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from accelerate.commands.merge import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/activate DELETED
@@ -1,63 +0,0 @@
1
- # This file must be used with "source bin/activate" *from bash*
2
- # you cannot run it directly
3
-
4
- deactivate () {
5
- # reset old environment variables
6
- if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
7
- PATH="${_OLD_VIRTUAL_PATH:-}"
8
- export PATH
9
- unset _OLD_VIRTUAL_PATH
10
- fi
11
- if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
12
- PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
13
- export PYTHONHOME
14
- unset _OLD_VIRTUAL_PYTHONHOME
15
- fi
16
-
17
- # Call hash to forget past commands. Without forgetting
18
- # past commands the $PATH changes we made may not be respected
19
- hash -r 2> /dev/null
20
-
21
- if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
22
- PS1="${_OLD_VIRTUAL_PS1:-}"
23
- export PS1
24
- unset _OLD_VIRTUAL_PS1
25
- fi
26
-
27
- unset VIRTUAL_ENV
28
- unset VIRTUAL_ENV_PROMPT
29
- if [ ! "${1:-}" = "nondestructive" ] ; then
30
- # Self destruct!
31
- unset -f deactivate
32
- fi
33
- }
34
-
35
- # unset irrelevant variables
36
- deactivate nondestructive
37
-
38
- VIRTUAL_ENV=/Users/rupa/Desktop/Projects/DocIntel/DocIntel
39
- export VIRTUAL_ENV
40
-
41
- _OLD_VIRTUAL_PATH="$PATH"
42
- PATH="$VIRTUAL_ENV/"bin":$PATH"
43
- export PATH
44
-
45
- # unset PYTHONHOME if set
46
- # this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
47
- # could use `if (set -u; : $PYTHONHOME) ;` in bash
48
- if [ -n "${PYTHONHOME:-}" ] ; then
49
- _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
50
- unset PYTHONHOME
51
- fi
52
-
53
- if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
54
- _OLD_VIRTUAL_PS1="${PS1:-}"
55
- PS1='(DocIntel) '"${PS1:-}"
56
- export PS1
57
- VIRTUAL_ENV_PROMPT='(DocIntel) '
58
- export VIRTUAL_ENV_PROMPT
59
- fi
60
-
61
- # Call hash to forget past commands. Without forgetting
62
- # past commands the $PATH changes we made may not be respected
63
- hash -r 2> /dev/null
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/activate.csh DELETED
@@ -1,26 +0,0 @@
1
- # This file must be used with "source bin/activate.csh" *from csh*.
2
- # You cannot run it directly.
3
- # Created by Davide Di Blasi <davidedb@gmail.com>.
4
- # Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
5
-
6
- alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
7
-
8
- # Unset irrelevant variables.
9
- deactivate nondestructive
10
-
11
- setenv VIRTUAL_ENV /Users/rupa/Desktop/Projects/DocIntel/DocIntel
12
-
13
- set _OLD_VIRTUAL_PATH="$PATH"
14
- setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
15
-
16
-
17
- set _OLD_VIRTUAL_PROMPT="$prompt"
18
-
19
- if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
20
- set prompt = '(DocIntel) '"$prompt"
21
- setenv VIRTUAL_ENV_PROMPT '(DocIntel) '
22
- endif
23
-
24
- alias pydoc python -m pydoc
25
-
26
- rehash
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/activate.fish DELETED
@@ -1,69 +0,0 @@
1
- # This file must be used with "source <venv>/bin/activate.fish" *from fish*
2
- # (https://fishshell.com/); you cannot run it directly.
3
-
4
- function deactivate -d "Exit virtual environment and return to normal shell environment"
5
- # reset old environment variables
6
- if test -n "$_OLD_VIRTUAL_PATH"
7
- set -gx PATH $_OLD_VIRTUAL_PATH
8
- set -e _OLD_VIRTUAL_PATH
9
- end
10
- if test -n "$_OLD_VIRTUAL_PYTHONHOME"
11
- set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
12
- set -e _OLD_VIRTUAL_PYTHONHOME
13
- end
14
-
15
- if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
16
- set -e _OLD_FISH_PROMPT_OVERRIDE
17
- # prevents error when using nested fish instances (Issue #93858)
18
- if functions -q _old_fish_prompt
19
- functions -e fish_prompt
20
- functions -c _old_fish_prompt fish_prompt
21
- functions -e _old_fish_prompt
22
- end
23
- end
24
-
25
- set -e VIRTUAL_ENV
26
- set -e VIRTUAL_ENV_PROMPT
27
- if test "$argv[1]" != "nondestructive"
28
- # Self-destruct!
29
- functions -e deactivate
30
- end
31
- end
32
-
33
- # Unset irrelevant variables.
34
- deactivate nondestructive
35
-
36
- set -gx VIRTUAL_ENV /Users/rupa/Desktop/Projects/DocIntel/DocIntel
37
-
38
- set -gx _OLD_VIRTUAL_PATH $PATH
39
- set -gx PATH "$VIRTUAL_ENV/"bin $PATH
40
-
41
- # Unset PYTHONHOME if set.
42
- if set -q PYTHONHOME
43
- set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
44
- set -e PYTHONHOME
45
- end
46
-
47
- if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
48
- # fish uses a function instead of an env var to generate the prompt.
49
-
50
- # Save the current fish_prompt function as the function _old_fish_prompt.
51
- functions -c fish_prompt _old_fish_prompt
52
-
53
- # With the original prompt function renamed, we can override with our own.
54
- function fish_prompt
55
- # Save the return status of the last command.
56
- set -l old_status $status
57
-
58
- # Output the venv prompt; color taken from the blue of the Python logo.
59
- printf "%s%s%s" (set_color 4B8BBE) '(DocIntel) ' (set_color normal)
60
-
61
- # Restore the return status of the previous command.
62
- echo "exit $old_status" | .
63
- # Output the original/"old" prompt.
64
- _old_fish_prompt
65
- end
66
-
67
- set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
68
- set -gx VIRTUAL_ENV_PROMPT '(DocIntel) '
69
- end
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/backend-test-tools DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from onnx.backend.test.cmd_tools import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/check-model DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from onnx.bin.checker import check_model
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(check_model())
 
 
 
 
 
 
 
DocIntel/bin/check-node DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from onnx.bin.checker import check_node
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(check_node())
 
 
 
 
 
 
 
DocIntel/bin/chroma DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from chromadb.cli.cli import app
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(app())
 
 
 
 
 
 
 
DocIntel/bin/coverage DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from coverage.cmdline import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/coverage-3.11 DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from coverage.cmdline import main_deprecated
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main_deprecated())
 
 
 
 
 
 
 
DocIntel/bin/coverage3 DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from coverage.cmdline import main_deprecated
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main_deprecated())
 
 
 
 
 
 
 
DocIntel/bin/distro DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from distro.distro import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/dotenv DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from dotenv.__main__ import cli
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(cli())
 
 
 
 
 
 
 
DocIntel/bin/dumppdf.py DELETED
@@ -1,468 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- """Extract pdf structure in XML format"""
3
-
4
- import logging
5
- import os.path
6
- import re
7
- import sys
8
- from argparse import ArgumentParser
9
- from collections.abc import Container, Iterable
10
- from typing import Any, TextIO, cast
11
-
12
- import pdfminer
13
- from pdfminer.pdfdocument import PDFDocument, PDFNoOutlines, PDFXRefFallback
14
- from pdfminer.pdfexceptions import (
15
- PDFIOError,
16
- PDFObjectNotFound,
17
- PDFTypeError,
18
- PDFValueError,
19
- )
20
- from pdfminer.pdfpage import PDFPage
21
- from pdfminer.pdfparser import PDFParser
22
- from pdfminer.pdftypes import PDFObjRef, PDFStream, resolve1, stream_value
23
- from pdfminer.psparser import LIT, PSKeyword, PSLiteral
24
- from pdfminer.utils import isnumber
25
-
26
- logging.basicConfig()
27
- logger = logging.getLogger(__name__)
28
-
29
- ESC_PAT = re.compile(r'[\000-\037&<>()"\042\047\134\177-\377]')
30
-
31
-
32
- def escape(s: str | bytes) -> str:
33
- us = str(s, "latin-1") if isinstance(s, bytes) else s
34
- return ESC_PAT.sub(lambda m: f"&#{ord(m.group(0))};", us)
35
-
36
-
37
- def dumpxml(out: TextIO, obj: object, codec: str | None = None) -> None:
38
- if obj is None:
39
- out.write("<null />")
40
- return
41
-
42
- if isinstance(obj, dict):
43
- out.write(f'<dict size="{len(obj)}">\n')
44
- for k, v in obj.items():
45
- out.write(f"<key>{k}</key>\n")
46
- out.write("<value>")
47
- dumpxml(out, v)
48
- out.write("</value>\n")
49
- out.write("</dict>")
50
- return
51
-
52
- if isinstance(obj, list):
53
- out.write(f'<list size="{len(obj)}">\n')
54
- for v in obj:
55
- dumpxml(out, v)
56
- out.write("\n")
57
- out.write("</list>")
58
- return
59
-
60
- if isinstance(obj, (str, bytes)):
61
- out.write(f'<string size="{len(obj)}">{escape(obj)}</string>')
62
- return
63
-
64
- if isinstance(obj, PDFStream):
65
- if codec == "raw":
66
- # Bug: writing bytes to text I/O. This will raise TypeError.
67
- out.write(obj.get_rawdata()) # type: ignore [arg-type]
68
- elif codec == "binary":
69
- # Bug: writing bytes to text I/O. This will raise TypeError.
70
- out.write(obj.get_data()) # type: ignore [arg-type]
71
- else:
72
- out.write("<stream>\n<props>\n")
73
- dumpxml(out, obj.attrs)
74
- out.write("\n</props>\n")
75
- if codec == "text":
76
- data = obj.get_data()
77
- out.write(f'<data size="{len(data)}">{escape(data)}</data>\n')
78
- out.write("</stream>")
79
- return
80
-
81
- if isinstance(obj, PDFObjRef):
82
- out.write(f'<ref id="{obj.objid}" />')
83
- return
84
-
85
- if isinstance(obj, PSKeyword):
86
- # Likely bug: obj.name is bytes, not str
87
- out.write(f"<keyword>{obj.name}</keyword>") # type: ignore [str-bytes-safe]
88
- return
89
-
90
- if isinstance(obj, PSLiteral):
91
- # Likely bug: obj.name may be bytes, not str
92
- out.write(f"<literal>{obj.name}</literal>") # type: ignore [str-bytes-safe]
93
- return
94
-
95
- if isnumber(obj):
96
- out.write(f"<number>{obj}</number>")
97
- return
98
-
99
- raise PDFTypeError(obj)
100
-
101
-
102
- def dumptrailers(
103
- out: TextIO,
104
- doc: PDFDocument,
105
- show_fallback_xref: bool = False,
106
- ) -> None:
107
- for xref in doc.xrefs:
108
- if not isinstance(xref, PDFXRefFallback) or show_fallback_xref:
109
- out.write("<trailer>\n")
110
- dumpxml(out, xref.get_trailer())
111
- out.write("\n</trailer>\n\n")
112
- no_xrefs = all(isinstance(xref, PDFXRefFallback) for xref in doc.xrefs)
113
- if no_xrefs and not show_fallback_xref:
114
- msg = (
115
- "This PDF does not have an xref. Use --show-fallback-xref if "
116
- "you want to display the content of a fallback xref that "
117
- "contains all objects."
118
- )
119
- logger.warning(msg)
120
-
121
-
122
- def dumpallobjs(
123
- out: TextIO,
124
- doc: PDFDocument,
125
- codec: str | None = None,
126
- show_fallback_xref: bool = False,
127
- ) -> None:
128
- visited = set()
129
- out.write("<pdf>")
130
- for xref in doc.xrefs:
131
- for objid in xref.get_objids():
132
- if objid in visited:
133
- continue
134
- visited.add(objid)
135
- try:
136
- obj = doc.getobj(objid)
137
- if obj is None:
138
- continue
139
- out.write(f'<object id="{objid}">\n')
140
- dumpxml(out, obj, codec=codec)
141
- out.write("\n</object>\n\n")
142
- except PDFObjectNotFound as e:
143
- print(f"not found: {e!r}")
144
- dumptrailers(out, doc, show_fallback_xref)
145
- out.write("</pdf>")
146
-
147
-
148
- def dumpoutline(
149
- outfp: TextIO,
150
- fname: str,
151
- objids: Any,
152
- pagenos: Container[int],
153
- password: str = "",
154
- dumpall: bool = False,
155
- codec: str | None = None,
156
- extractdir: str | None = None,
157
- ) -> None:
158
- with open(fname, "rb") as fp:
159
- parser = PDFParser(fp)
160
- doc = PDFDocument(parser, password)
161
- pages = {
162
- page.pageid: pageno
163
- for (pageno, page) in enumerate(PDFPage.create_pages(doc), 1)
164
- }
165
-
166
- def resolve_dest(dest: object) -> Any:
167
- if isinstance(dest, (str, bytes)):
168
- dest = resolve1(doc.get_dest(dest))
169
- elif isinstance(dest, PSLiteral):
170
- dest = resolve1(doc.get_dest(dest.name))
171
- if isinstance(dest, dict):
172
- dest = dest["D"]
173
- if isinstance(dest, PDFObjRef):
174
- dest = dest.resolve()
175
- return dest
176
-
177
- try:
178
- outlines = doc.get_outlines()
179
- outfp.write("<outlines>\n")
180
- for level, title, dest, a, _se in outlines:
181
- pageno = None
182
- if dest:
183
- dest = resolve_dest(dest)
184
- pageno = pages[dest[0].objid]
185
- elif a:
186
- action = a
187
- if isinstance(action, dict):
188
- subtype = action.get("S")
189
- if subtype and repr(subtype) == "/'GoTo'" and action.get("D"):
190
- dest = resolve_dest(action["D"])
191
- pageno = pages[dest[0].objid]
192
- s = escape(title)
193
- outfp.write(f'<outline level="{level!r}" title="{s}">\n')
194
- if dest is not None:
195
- outfp.write("<dest>")
196
- dumpxml(outfp, dest)
197
- outfp.write("</dest>\n")
198
- if pageno is not None:
199
- outfp.write(f"<pageno>{pageno!r}</pageno>\n")
200
- outfp.write("</outline>\n")
201
- outfp.write("</outlines>\n")
202
- except PDFNoOutlines:
203
- pass
204
- parser.flush()
205
-
206
-
207
- LITERAL_FILESPEC = LIT("Filespec")
208
- LITERAL_EMBEDDEDFILE = LIT("EmbeddedFile")
209
-
210
-
211
- def extractembedded(fname: str, password: str, extractdir: str) -> None:
212
- def extract1(objid: int, obj: dict[str, Any]) -> None:
213
- filename = os.path.basename(obj.get("UF") or cast(bytes, obj.get("F")).decode())
214
- fileref = obj["EF"].get("UF") or obj["EF"].get("F")
215
- fileobj = doc.getobj(fileref.objid)
216
- if not isinstance(fileobj, PDFStream):
217
- error_msg = (
218
- f"unable to process PDF: reference for {filename!r} is not a PDFStream"
219
- )
220
- raise PDFValueError(error_msg)
221
- if fileobj.get("Type") is not LITERAL_EMBEDDEDFILE:
222
- raise PDFValueError(
223
- f"unable to process PDF: reference for {filename!r} "
224
- "is not an EmbeddedFile",
225
- )
226
- path = os.path.join(extractdir, f"{objid:06d}-{filename}")
227
- if os.path.exists(path):
228
- raise PDFIOError(f"file exists: {path!r}")
229
- print(f"extracting: {path!r}")
230
- os.makedirs(os.path.dirname(path), exist_ok=True)
231
- with open(path, "wb") as out:
232
- out.write(fileobj.get_data())
233
-
234
- with open(fname, "rb") as fp:
235
- parser = PDFParser(fp)
236
- doc = PDFDocument(parser, password)
237
- extracted_objids = set()
238
- for xref in doc.xrefs:
239
- for objid in xref.get_objids():
240
- obj = doc.getobj(objid)
241
- if (
242
- objid not in extracted_objids
243
- and isinstance(obj, dict)
244
- and obj.get("Type") is LITERAL_FILESPEC
245
- ):
246
- extracted_objids.add(objid)
247
- extract1(objid, obj)
248
-
249
-
250
- def dumppdf(
251
- outfp: TextIO,
252
- fname: str,
253
- objids: Iterable[int],
254
- pagenos: Container[int],
255
- password: str = "",
256
- dumpall: bool = False,
257
- codec: str | None = None,
258
- extractdir: str | None = None,
259
- show_fallback_xref: bool = False,
260
- ) -> None:
261
- with open(fname, "rb") as fp:
262
- parser = PDFParser(fp)
263
- doc = PDFDocument(parser, password)
264
- if objids:
265
- for objid in objids:
266
- obj = doc.getobj(objid)
267
- dumpxml(outfp, obj, codec=codec)
268
- if pagenos:
269
- for pageno, page in enumerate(PDFPage.create_pages(doc)):
270
- if pageno in pagenos:
271
- if codec:
272
- for obj in page.contents:
273
- obj = stream_value(obj)
274
- dumpxml(outfp, obj, codec=codec)
275
- else:
276
- dumpxml(outfp, page.attrs)
277
- if dumpall:
278
- dumpallobjs(outfp, doc, codec, show_fallback_xref)
279
- if (not objids) and (not pagenos) and (not dumpall):
280
- dumptrailers(outfp, doc, show_fallback_xref)
281
- if codec not in ("raw", "binary"):
282
- outfp.write("\n")
283
-
284
-
285
- def create_parser() -> ArgumentParser:
286
- parser = ArgumentParser(description=__doc__, add_help=True)
287
- parser.add_argument(
288
- "files",
289
- type=str,
290
- default=None,
291
- nargs="+",
292
- help="One or more paths to PDF files.",
293
- )
294
-
295
- parser.add_argument(
296
- "--version",
297
- "-v",
298
- action="version",
299
- version=f"pdfminer.six v{pdfminer.__version__}",
300
- )
301
- parser.add_argument(
302
- "--debug",
303
- "-d",
304
- default=False,
305
- action="store_true",
306
- help="Use debug logging level.",
307
- )
308
- procedure_parser = parser.add_mutually_exclusive_group()
309
- procedure_parser.add_argument(
310
- "--extract-toc",
311
- "-T",
312
- default=False,
313
- action="store_true",
314
- help="Extract structure of outline",
315
- )
316
- procedure_parser.add_argument(
317
- "--extract-embedded",
318
- "-E",
319
- type=str,
320
- help="Extract embedded files",
321
- )
322
-
323
- parse_params = parser.add_argument_group(
324
- "Parser",
325
- description="Used during PDF parsing",
326
- )
327
- parse_params.add_argument(
328
- "--page-numbers",
329
- type=int,
330
- default=None,
331
- nargs="+",
332
- help="A space-seperated list of page numbers to parse.",
333
- )
334
- parse_params.add_argument(
335
- "--pagenos",
336
- "-p",
337
- type=str,
338
- help="A comma-separated list of page numbers to parse. Included for "
339
- "legacy applications, use --page-numbers for more idiomatic "
340
- "argument entry.",
341
- )
342
- parse_params.add_argument(
343
- "--objects",
344
- "-i",
345
- type=str,
346
- help="Comma separated list of object numbers to extract",
347
- )
348
- parse_params.add_argument(
349
- "--all",
350
- "-a",
351
- default=False,
352
- action="store_true",
353
- help="If the structure of all objects should be extracted",
354
- )
355
- parse_params.add_argument(
356
- "--show-fallback-xref",
357
- action="store_true",
358
- help="Additionally show the fallback xref. Use this if the PDF "
359
- "has zero or only invalid xref's. This setting is ignored if "
360
- "--extract-toc or --extract-embedded is used.",
361
- )
362
- parse_params.add_argument(
363
- "--password",
364
- "-P",
365
- type=str,
366
- default="",
367
- help="The password to use for decrypting PDF file.",
368
- )
369
-
370
- output_params = parser.add_argument_group(
371
- "Output",
372
- description="Used during output generation.",
373
- )
374
- output_params.add_argument(
375
- "--outfile",
376
- "-o",
377
- type=str,
378
- default="-",
379
- help='Path to file where output is written. Or "-" (default) to '
380
- "write to stdout.",
381
- )
382
- codec_parser = output_params.add_mutually_exclusive_group()
383
- codec_parser.add_argument(
384
- "--raw-stream",
385
- "-r",
386
- default=False,
387
- action="store_true",
388
- help="Write stream objects without encoding",
389
- )
390
- codec_parser.add_argument(
391
- "--binary-stream",
392
- "-b",
393
- default=False,
394
- action="store_true",
395
- help="Write stream objects with binary encoding",
396
- )
397
- codec_parser.add_argument(
398
- "--text-stream",
399
- "-t",
400
- default=False,
401
- action="store_true",
402
- help="Write stream objects as plain text",
403
- )
404
-
405
- return parser
406
-
407
-
408
- def main(argv: list[str] | None = None) -> None:
409
- parser = create_parser()
410
- args = parser.parse_args(args=argv)
411
-
412
- if args.debug:
413
- logging.getLogger().setLevel(logging.DEBUG)
414
-
415
- objids = [int(x) for x in args.objects.split(",")] if args.objects else []
416
-
417
- if args.page_numbers:
418
- pagenos = {x - 1 for x in args.page_numbers}
419
- elif args.pagenos:
420
- pagenos = {int(x) - 1 for x in args.pagenos.split(",")}
421
- else:
422
- pagenos = set()
423
-
424
- password = args.password
425
-
426
- if args.raw_stream:
427
- codec: str | None = "raw"
428
- elif args.binary_stream:
429
- codec = "binary"
430
- elif args.text_stream:
431
- codec = "text"
432
- else:
433
- codec = None
434
-
435
- # Use context manager for file output, ensuring proper cleanup
436
- with sys.stdout if args.outfile == "-" else open(args.outfile, "w") as outfp:
437
- for fname in args.files:
438
- if args.extract_toc:
439
- dumpoutline(
440
- outfp,
441
- fname,
442
- objids,
443
- pagenos,
444
- password=password,
445
- dumpall=args.all,
446
- codec=codec,
447
- extractdir=None,
448
- )
449
- elif args.extract_embedded:
450
- extractembedded(
451
- fname, password=password, extractdir=args.extract_embedded
452
- )
453
- else:
454
- dumppdf(
455
- outfp,
456
- fname,
457
- objids,
458
- pagenos,
459
- password=password,
460
- dumpall=args.all,
461
- codec=codec,
462
- extractdir=None,
463
- show_fallback_xref=args.show_fallback_xref,
464
- )
465
-
466
-
467
- if __name__ == "__main__":
468
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/f2py DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from numpy.f2py.f2py2e import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/filetype DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from filetype.__main__ import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/fonttools DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from fontTools.__main__ import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/hf DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from huggingface_hub.cli.hf import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/httpx DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from httpx import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/huggingface-cli DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from huggingface_hub.cli.deprecated_cli import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/idna DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from idna.cli import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/isympy DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from isympy import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/jsondiff DELETED
@@ -1,41 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- # -*- coding: utf-8 -*-
3
-
4
- from __future__ import print_function
5
-
6
- import sys
7
- import json
8
- import jsonpatch
9
- import argparse
10
-
11
-
12
- parser = argparse.ArgumentParser(description='Diff two JSON files')
13
- parser.add_argument('FILE1', type=argparse.FileType('r'))
14
- parser.add_argument('FILE2', type=argparse.FileType('r'))
15
- parser.add_argument('--indent', type=int, default=None,
16
- help='Indent output by n spaces')
17
- parser.add_argument('-u', '--preserve-unicode', action='store_true',
18
- help='Output Unicode character as-is without using Code Point')
19
- parser.add_argument('-v', '--version', action='version',
20
- version='%(prog)s ' + jsonpatch.__version__)
21
-
22
-
23
- def main():
24
- try:
25
- diff_files()
26
- except KeyboardInterrupt:
27
- sys.exit(1)
28
-
29
-
30
- def diff_files():
31
- """ Diffs two JSON files and prints a patch """
32
- args = parser.parse_args()
33
- doc1 = json.load(args.FILE1)
34
- doc2 = json.load(args.FILE2)
35
- patch = jsonpatch.make_patch(doc1, doc2)
36
- if patch.patch:
37
- print(json.dumps(patch.patch, indent=args.indent, ensure_ascii=not(args.preserve_unicode)))
38
- sys.exit(1)
39
-
40
- if __name__ == "__main__":
41
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/jsonpatch DELETED
@@ -1,107 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- # -*- coding: utf-8 -*-
3
-
4
- import sys
5
- import os.path
6
- import json
7
- import jsonpatch
8
- import tempfile
9
- import argparse
10
-
11
-
12
- parser = argparse.ArgumentParser(
13
- description='Apply a JSON patch on a JSON file')
14
- parser.add_argument('ORIGINAL', type=argparse.FileType('r'),
15
- help='Original file')
16
- parser.add_argument('PATCH', type=argparse.FileType('r'),
17
- nargs='?', default=sys.stdin,
18
- help='Patch file (read from stdin if omitted)')
19
- parser.add_argument('--indent', type=int, default=None,
20
- help='Indent output by n spaces')
21
- parser.add_argument('-b', '--backup', action='store_true',
22
- help='Back up ORIGINAL if modifying in-place')
23
- parser.add_argument('-i', '--in-place', action='store_true',
24
- help='Modify ORIGINAL in-place instead of to stdout')
25
- parser.add_argument('-v', '--version', action='version',
26
- version='%(prog)s ' + jsonpatch.__version__)
27
- parser.add_argument('-u', '--preserve-unicode', action='store_true',
28
- help='Output Unicode character as-is without using Code Point')
29
-
30
- def main():
31
- try:
32
- patch_files()
33
- except KeyboardInterrupt:
34
- sys.exit(1)
35
-
36
-
37
- def patch_files():
38
- """ Diffs two JSON files and prints a patch """
39
- args = parser.parse_args()
40
- doc = json.load(args.ORIGINAL)
41
- patch = json.load(args.PATCH)
42
- result = jsonpatch.apply_patch(doc, patch)
43
-
44
- if args.in_place:
45
- dirname = os.path.abspath(os.path.dirname(args.ORIGINAL.name))
46
-
47
- try:
48
- # Attempt to replace the file atomically. We do this by
49
- # creating a temporary file in the same directory as the
50
- # original file so we can atomically move the new file over
51
- # the original later. (This is done in the same directory
52
- # because atomic renames do not work across mount points.)
53
-
54
- fd, pathname = tempfile.mkstemp(dir=dirname)
55
- fp = os.fdopen(fd, 'w')
56
- atomic = True
57
-
58
- except OSError:
59
- # We failed to create the temporary file for an atomic
60
- # replace, so fall back to non-atomic mode by backing up
61
- # the original (if desired) and writing a new file.
62
-
63
- if args.backup:
64
- os.rename(args.ORIGINAL.name, args.ORIGINAL.name + '.orig')
65
- fp = open(args.ORIGINAL.name, 'w')
66
- atomic = False
67
-
68
- else:
69
- # Since we're not replacing the original file in-place, write
70
- # the modified JSON to stdout instead.
71
-
72
- fp = sys.stdout
73
-
74
- # By this point we have some sort of file object we can write the
75
- # modified JSON to.
76
-
77
- json.dump(result, fp, indent=args.indent, ensure_ascii=not(args.preserve_unicode))
78
- fp.write('\n')
79
-
80
- if args.in_place:
81
- # Close the new file. If we aren't replacing atomically, this
82
- # is our last step, since everything else is already in place.
83
-
84
- fp.close()
85
-
86
- if atomic:
87
- try:
88
- # Complete the atomic replace by linking the original
89
- # to a backup (if desired), fixing up the permissions
90
- # on the temporary file, and moving it into place.
91
-
92
- if args.backup:
93
- os.link(args.ORIGINAL.name, args.ORIGINAL.name + '.orig')
94
- os.chmod(pathname, os.stat(args.ORIGINAL.name).st_mode)
95
- os.rename(pathname, args.ORIGINAL.name)
96
-
97
- except OSError:
98
- # In the event we could not actually do the atomic
99
- # replace, unlink the original to move it out of the
100
- # way and finally move the temporary file into place.
101
-
102
- os.unlink(args.ORIGINAL.name)
103
- os.rename(pathname, args.ORIGINAL.name)
104
-
105
-
106
- if __name__ == "__main__":
107
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/jsonpointer DELETED
@@ -1,66 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
-
3
-
4
- import argparse
5
- import json
6
- import sys
7
-
8
- import jsonpointer
9
-
10
- parser = argparse.ArgumentParser(
11
- description='Resolve a JSON pointer on JSON files')
12
-
13
- # Accept pointer as argument or as file
14
- ptr_group = parser.add_mutually_exclusive_group(required=True)
15
-
16
- ptr_group.add_argument('-f', '--pointer-file', type=argparse.FileType('r'),
17
- nargs='?',
18
- help='File containing a JSON pointer expression')
19
-
20
- ptr_group.add_argument('POINTER', type=str, nargs='?',
21
- help='A JSON pointer expression')
22
-
23
- parser.add_argument('FILE', type=argparse.FileType('r'), nargs='+',
24
- help='Files for which the pointer should be resolved')
25
- parser.add_argument('--indent', type=int, default=None,
26
- help='Indent output by n spaces')
27
- parser.add_argument('-v', '--version', action='version',
28
- version='%(prog)s ' + jsonpointer.__version__)
29
-
30
-
31
- def main():
32
- try:
33
- resolve_files()
34
- except KeyboardInterrupt:
35
- sys.exit(1)
36
-
37
-
38
- def parse_pointer(args):
39
- if args.POINTER:
40
- ptr = args.POINTER
41
- elif args.pointer_file:
42
- ptr = args.pointer_file.read().strip()
43
- else:
44
- parser.print_usage()
45
- sys.exit(1)
46
-
47
- return ptr
48
-
49
-
50
- def resolve_files():
51
- """ Resolve a JSON pointer on JSON files """
52
- args = parser.parse_args()
53
-
54
- ptr = parse_pointer(args)
55
-
56
- for f in args.FILE:
57
- doc = json.load(f)
58
- try:
59
- result = jsonpointer.resolve_pointer(doc, ptr)
60
- print(json.dumps(result, indent=args.indent))
61
- except jsonpointer.JsonPointerException as e:
62
- print('Could not resolve pointer: %s' % str(e), file=sys.stderr)
63
-
64
-
65
- if __name__ == "__main__":
66
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/jsonschema DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from jsonschema.cli import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/langchain-server DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from langchain.server import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/langsmith DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from langsmith.cli.main import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/langsmith 2 DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from langsmith.cli.main import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/markdown-it DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from markdown_it.cli.parse import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/nltk DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from nltk.cli import cli
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(cli())
 
 
 
 
 
 
 
DocIntel/bin/normalizer DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from charset_normalizer.cli import cli_detect
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(cli_detect())
 
 
 
 
 
 
 
DocIntel/bin/numba DELETED
@@ -1,8 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- # -*- coding: UTF-8 -*-
3
- from __future__ import print_function, division, absolute_import
4
-
5
- from numba.misc.numba_entry import main
6
-
7
- if __name__ == "__main__":
8
- main()
 
 
 
 
 
 
 
 
 
DocIntel/bin/onnxruntime_test DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from onnxruntime.tools.onnxruntime_test import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/oxmsg DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from oxmsg.cli import oxmsg
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(oxmsg())
 
 
 
 
 
 
 
DocIntel/bin/pdf2txt.py DELETED
@@ -1,324 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- """A command line tool for extracting text and images from PDF and
3
- output it to plain text, html, xml or tags.
4
- """
5
-
6
- import argparse
7
- import logging
8
- import sys
9
- from collections.abc import Container, Iterable
10
- from typing import Any
11
-
12
- import pdfminer.high_level
13
- from pdfminer.layout import LAParams
14
- from pdfminer.pdfexceptions import PDFValueError
15
- from pdfminer.utils import AnyIO
16
-
17
- logging.basicConfig()
18
-
19
- OUTPUT_TYPES = ((".htm", "html"), (".html", "html"), (".xml", "xml"), (".tag", "tag"))
20
-
21
-
22
- def float_or_disabled(x: str) -> float | None:
23
- if x.lower().strip() == "disabled":
24
- return None
25
- try:
26
- return float(x)
27
- except ValueError as err:
28
- raise argparse.ArgumentTypeError(f"invalid float value: {x}") from err
29
-
30
-
31
- def extract_text(
32
- files: Iterable[str] = [],
33
- outfile: str = "-",
34
- laparams: LAParams | None = None,
35
- output_type: str = "text",
36
- codec: str = "utf-8",
37
- strip_control: bool = False,
38
- maxpages: int = 0,
39
- page_numbers: Container[int] | None = None,
40
- password: str = "",
41
- scale: float = 1.0,
42
- rotation: int = 0,
43
- layoutmode: str = "normal",
44
- output_dir: str | None = None,
45
- debug: bool = False,
46
- disable_caching: bool = False,
47
- **kwargs: Any,
48
- ) -> None:
49
- if not files:
50
- raise PDFValueError("Must provide files to work upon!")
51
-
52
- if output_type == "text" and outfile != "-":
53
- for override, alttype in OUTPUT_TYPES:
54
- if outfile.endswith(override):
55
- output_type = alttype
56
-
57
- if outfile == "-":
58
- outfp: AnyIO = sys.stdout
59
- if sys.stdout.encoding is not None:
60
- codec = "utf-8"
61
- for fname in files:
62
- with open(fname, "rb") as fp:
63
- pdfminer.high_level.extract_text_to_fp(fp, **locals())
64
- else:
65
- # Use context manager for file output, ensuring proper cleanup
66
- with open(outfile, "wb") as outfp:
67
- for fname in files:
68
- with open(fname, "rb") as fp:
69
- pdfminer.high_level.extract_text_to_fp(fp, **locals())
70
-
71
-
72
- def create_parser() -> argparse.ArgumentParser:
73
- parser = argparse.ArgumentParser(description=__doc__, add_help=True)
74
- parser.add_argument(
75
- "files",
76
- type=str,
77
- default=None,
78
- nargs="+",
79
- help="One or more paths to PDF files.",
80
- )
81
-
82
- parser.add_argument(
83
- "--version",
84
- "-v",
85
- action="version",
86
- version=f"pdfminer.six v{pdfminer.__version__}",
87
- )
88
- parser.add_argument(
89
- "--debug",
90
- "-d",
91
- default=False,
92
- action="store_true",
93
- help="Use debug logging level.",
94
- )
95
- parser.add_argument(
96
- "--disable-caching",
97
- "-C",
98
- default=False,
99
- action="store_true",
100
- help="If caching or resources, such as fonts, should be disabled.",
101
- )
102
-
103
- parse_params = parser.add_argument_group(
104
- "Parser",
105
- description="Used during PDF parsing",
106
- )
107
- parse_params.add_argument(
108
- "--page-numbers",
109
- type=int,
110
- default=None,
111
- nargs="+",
112
- help="A space-seperated list of page numbers to parse.",
113
- )
114
- parse_params.add_argument(
115
- "--pagenos",
116
- "-p",
117
- type=str,
118
- help="A comma-separated list of page numbers to parse. "
119
- "Included for legacy applications, use --page-numbers "
120
- "for more idiomatic argument entry.",
121
- )
122
- parse_params.add_argument(
123
- "--maxpages",
124
- "-m",
125
- type=int,
126
- default=0,
127
- help="The maximum number of pages to parse.",
128
- )
129
- parse_params.add_argument(
130
- "--password",
131
- "-P",
132
- type=str,
133
- default="",
134
- help="The password to use for decrypting PDF file.",
135
- )
136
- parse_params.add_argument(
137
- "--rotation",
138
- "-R",
139
- default=0,
140
- type=int,
141
- help="The number of degrees to rotate the PDF "
142
- "before other types of processing.",
143
- )
144
-
145
- la_params = LAParams() # will be used for defaults
146
- la_param_group = parser.add_argument_group(
147
- "Layout analysis",
148
- description="Used during layout analysis.",
149
- )
150
- la_param_group.add_argument(
151
- "--no-laparams",
152
- "-n",
153
- default=False,
154
- action="store_true",
155
- help="If layout analysis parameters should be ignored.",
156
- )
157
- la_param_group.add_argument(
158
- "--detect-vertical",
159
- "-V",
160
- default=la_params.detect_vertical,
161
- action="store_true",
162
- help="If vertical text should be considered during layout analysis",
163
- )
164
- la_param_group.add_argument(
165
- "--line-overlap",
166
- type=float,
167
- default=la_params.line_overlap,
168
- help="If two characters have more overlap than this they "
169
- "are considered to be on the same line. The overlap is specified "
170
- "relative to the minimum height of both characters.",
171
- )
172
- la_param_group.add_argument(
173
- "--char-margin",
174
- "-M",
175
- type=float,
176
- default=la_params.char_margin,
177
- help="If two characters are closer together than this margin they "
178
- "are considered to be part of the same line. The margin is "
179
- "specified relative to the width of the character.",
180
- )
181
- la_param_group.add_argument(
182
- "--word-margin",
183
- "-W",
184
- type=float,
185
- default=la_params.word_margin,
186
- help="If two characters on the same line are further apart than this "
187
- "margin then they are considered to be two separate words, and "
188
- "an intermediate space will be added for readability. The margin "
189
- "is specified relative to the width of the character.",
190
- )
191
- la_param_group.add_argument(
192
- "--line-margin",
193
- "-L",
194
- type=float,
195
- default=la_params.line_margin,
196
- help="If two lines are close together they are considered to "
197
- "be part of the same paragraph. The margin is specified "
198
- "relative to the height of a line.",
199
- )
200
- la_param_group.add_argument(
201
- "--boxes-flow",
202
- "-F",
203
- type=float_or_disabled,
204
- default=la_params.boxes_flow,
205
- help="Specifies how much a horizontal and vertical position of a "
206
- "text matters when determining the order of lines. The value "
207
- "should be within the range of -1.0 (only horizontal position "
208
- "matters) to +1.0 (only vertical position matters). You can also "
209
- "pass `disabled` to disable advanced layout analysis, and "
210
- "instead return text based on the position of the bottom left "
211
- "corner of the text box.",
212
- )
213
- la_param_group.add_argument(
214
- "--all-texts",
215
- "-A",
216
- default=la_params.all_texts,
217
- action="store_true",
218
- help="If layout analysis should be performed on text in figures.",
219
- )
220
-
221
- output_params = parser.add_argument_group(
222
- "Output",
223
- description="Used during output generation.",
224
- )
225
- output_params.add_argument(
226
- "--outfile",
227
- "-o",
228
- type=str,
229
- default="-",
230
- help="Path to file where output is written. "
231
- 'Or "-" (default) to write to stdout.',
232
- )
233
- output_params.add_argument(
234
- "--output_type",
235
- "-t",
236
- type=str,
237
- default="text",
238
- help="Type of output to generate {text,html,xml,tag}.",
239
- )
240
- output_params.add_argument(
241
- "--codec",
242
- "-c",
243
- type=str,
244
- default="utf-8",
245
- help="Text encoding to use in output file.",
246
- )
247
- output_params.add_argument(
248
- "--output-dir",
249
- "-O",
250
- default=None,
251
- help="The output directory to put extracted images in. If not given, "
252
- "images are not extracted.",
253
- )
254
- output_params.add_argument(
255
- "--layoutmode",
256
- "-Y",
257
- default="normal",
258
- type=str,
259
- help="Type of layout to use when generating html "
260
- "{normal,exact,loose}. If normal,each line is"
261
- " positioned separately in the html. If exact"
262
- ", each character is positioned separately in"
263
- " the html. If loose, same result as normal "
264
- "but with an additional newline after each "
265
- "text line. Only used when output_type is html.",
266
- )
267
- output_params.add_argument(
268
- "--scale",
269
- "-s",
270
- type=float,
271
- default=1.0,
272
- help="The amount of zoom to use when generating html file. "
273
- "Only used when output_type is html.",
274
- )
275
- output_params.add_argument(
276
- "--strip-control",
277
- "-S",
278
- default=False,
279
- action="store_true",
280
- help="Remove control statement from text. Only used when output_type is xml.",
281
- )
282
-
283
- return parser
284
-
285
-
286
- def parse_args(args: list[str] | None) -> argparse.Namespace:
287
- parsed_args = create_parser().parse_args(args=args)
288
-
289
- # Propagate parsed layout parameters to LAParams object
290
- if parsed_args.no_laparams:
291
- parsed_args.laparams = None
292
- else:
293
- parsed_args.laparams = LAParams(
294
- line_overlap=parsed_args.line_overlap,
295
- char_margin=parsed_args.char_margin,
296
- line_margin=parsed_args.line_margin,
297
- word_margin=parsed_args.word_margin,
298
- boxes_flow=parsed_args.boxes_flow,
299
- detect_vertical=parsed_args.detect_vertical,
300
- all_texts=parsed_args.all_texts,
301
- )
302
-
303
- if parsed_args.page_numbers:
304
- parsed_args.page_numbers = {x - 1 for x in parsed_args.page_numbers}
305
-
306
- if parsed_args.pagenos:
307
- parsed_args.page_numbers = {int(x) - 1 for x in parsed_args.pagenos.split(",")}
308
-
309
- if parsed_args.output_type == "text" and parsed_args.outfile != "-":
310
- for override, alttype in OUTPUT_TYPES:
311
- if parsed_args.outfile.endswith(override):
312
- parsed_args.output_type = alttype
313
-
314
- return parsed_args
315
-
316
-
317
- def main(args: list[str] | None = None) -> int:
318
- parsed_args = parse_args(args)
319
- extract_text(**vars(parsed_args))
320
- return 0
321
-
322
-
323
- if __name__ == "__main__":
324
- sys.exit(main())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DocIntel/bin/pip DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from pip._internal.cli.main import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/pip3 DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from pip._internal.cli.main import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/pip3.11 DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from pip._internal.cli.main import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/plotly_get_chrome DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from plotly.io._kaleido import plotly_get_chrome
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(plotly_get_chrome())
 
 
 
 
 
 
 
DocIntel/bin/py.test DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from _pytest.config import _console_main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(_console_main())
 
 
 
 
 
 
 
DocIntel/bin/pybase64 DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from pybase64.__main__ import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/pyftmerge DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from fontTools.merge import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())
 
 
 
 
 
 
 
DocIntel/bin/pyftsubset DELETED
@@ -1,6 +0,0 @@
1
- #!/Users/rupa/Desktop/Projects/DocIntel/DocIntel/bin/python3.11
2
- import sys
3
- from fontTools.subset import main
4
- if __name__ == '__main__':
5
- sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
- sys.exit(main())