Git Product home page Git Product logo

cuda_exttools's People

Contributors

alexey-t avatar halfbrained avatar kvichans avatar veksha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cuda_exttools's Issues

Empty items in extlist

Как получить чудесный список

Command.dlg_config:133 exkys=['Tidy [Ctrl+T]', '', 'edit', '', '']

делаем add, в длг файла делаем отмену.

Tidy cannot run

Python 3.4.3 (default, Oct 14 2015, 20:31:36) 
[GCC 4.8.4]
Command.run:500 nm="Tidy", cmnd="", ddir="tidy", prms_s="-errors -quiet "{FileName}""
Command.run:522 ready prms_l=['-errors', '-quiet', '/home/user/test-tree.html']
Command.run:525 val4call=['tidy', '-errors', '-quiet', '/home/user/test-tree.html']
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/cuda/cuda/app/py/cuda_exttools/__init__.py", line 14, in run
    def run(self, ext_id):          return RLS.run(ext_id)
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 530, in run
    subprocess.Popen(val4call, cwd=ddir)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: ''

Original exception was:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/cuda/cuda/app/py/cuda_exttools/__init__.py", line 14, in run
    def run(self, ext_id):          return RLS.run(ext_id)
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 530, in run
    subprocess.Popen(val4call, cwd=ddir)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: ''

err- "save before"

File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 504, in run
if not ed.file_save(): return
AttributeError: 'Editor' object has no attribute 'file_save'

(help) Where are get examples lines for tool patterns

В Син есть много готовых outpresets. Их можно перенести в Куд.
Подскажите, если ли где-то готовые наборы примеров для тестирования этих шаблонов?

Unkillable last line end

Невозможно избавиться от последнего перехода на новую строку.
Если это только визуальных эффект, то он запутывает: невозможно отличить когда файл заканчивается на \n, а когда нет.

Parse out lines like Synw

Synwrite ExtTools имеет фичу "как разбирать вывод тул"- есть опц.

  • regex
  • index of fname
  • index of line/col

по regex Син разбирает лог и подсвечивает output
wish. Так же в Cud ExtTools.
Через app_log можно давать regex, index of fname/ line/ col

(bug) Process done

подозрение. не точно. Может не закрываете процесс. запустил tidy 2-3 раза- менял shell=on/off- tidy стал игнорить файл- даже если вернул shell=off -все равно все запуски "не видят файл"

&Char

&Chars duplicated
(e.g. "&Brows")

Sel index

диалог открывается, listview index не задан, в Вин нет синей полосы на listview, wish- задавать index.

Y/n char

Есть реакция на Y N, но не вижу реакции на y/n lowercase

bt plugin exttools: nav by results

Добавил навигацию на основе результатов тула

  • Подменю в Tools с двумя командами "След/Пред результат"
  • Реакция на ВВОД/ДвКлик в output

Для работы с tidy появилась расширенная настройка (в Advanced)
source_tab_as_blanks:8

Exception on run if cannot run

создал тул--взял просто файл у него нет атрибута "можно запускать".Надо проверять это.А то вываливает


Original exception was:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/.cudatext/py/cuda_exttools/cd_exttools.py", line 247, in run
    subprocess.Popen(val4call, **nmargs)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

random()

Если ф. даст 1 число для разных тулов- один сотрется(много запусков Куд)?

name of button

предл. назваить кнопы справа

  • browse-> file
  • add-> param
  • browse-> folder
  • lexers
  • main tool
  • hotkey
  • encoding
  • pattern

Need macros {AppDir} {AppDrive}

макрос для портабельности.КИнул тул в подпапку Куды.И надо пускать с флешки.

Run refac

Можно сделать **все про запуск(но не про обращение к списку exts, не обращение к json)в новый файл?

Dlg SetMain

wish. 1/3 size for right list, 2/3 for left list

Enc names

def get_encoding_names(self):
Можно ли записать это в файл(текстом, и читать по text.splitlines)?

ошибки - turkis, englis, gree

Tidy- regex

тул Tidy.exe.
задал line (?P<line>\d+) column (?P<col>\d+) .+
При клике- ошибка

File is maybe not text:
/home/user/

Do you want to open it?

файл /home/user/test.htm

Tidy error

все время получается вывод (Output pane)

line 1 column 1 - Warning: inserting missing 'title' element
Info: Document content looks like HTML 3.2
1 warning, 0 errors were found!

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<title></title>
</head>
<body>
</body>
</html>

To learn more about...

Запуск в консоли-

tidy -errors -quiet "/home/user/test.html"

дает норм вывод

line 1 column 1 - Warning: specified input encoding (iso-8859-1) does not match actual input encoding (utf-8)
line 1 column 5 - Warning: missing <!DOCTYPE> declaration
line 3 column 24 - Warning: plain text isn't allowed in <head> elements
line 2 column 1 - Info: <head> previously mentioned
line 3 column 24 - Warning: inserting implicit <body>
line 4 column 1 - Warning: </head> isn't allowed in <body> elements
line 3 column 24 - Info: <body> previously mentioned
line 5 column 17 - Warning: discarding unexpected <body>
line 16 column 1 - Warning: missing </div>

запуск ИзКуд дает такой лог

Command.run:227 nm, raw-cmd=Tidy tidy -errors -quiet "{FileName}"
Command.run:254 ready   prms=-errors -quiet "/home/user/test-tree.html"
Command.run:269 ?? Popen
Command.run:279 ok Popen
Command.run:297 out_ln=line 1 column 1 - Warning: inserting missing 'title' element
Command.run:297 out_ln=Info: Document content looks like HTML 3.2
Command.run:297 out_ln=1 warning, 0 errors were found!
Command.run:297 out_ln=
Command.run:297 out_ln=<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
Command.run:297 out_ln=<html>
Command.run:297 out_ln=<head>
Command.run:297 out_ln=<meta name="generator" content=
Command.run:297 out_ln="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
Command.run:297 out_ln=<title></title>
Command.run:297 out_ln=</head>
Command.run:297 out_ln=<body>
Command.run:297 out_ln=</body>
Command.run:297 out_ln=</html>
Command.run:297 out_ln=
Command.run:297 out_ln=To learn more about 

Тул-

tidy

word in menus

Menus dlg_menu have word "...... ExtTool"
pls use short clean word: "........ tool"

(bug) Interact

запуск тула. у него параметр "{Interactive}"

  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 215, in run
    prm     = subst_props(prm, file_nm, cCrt, rCrt)
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 898, in subst_props
    ans = app.dlg_input('Param for call {}'.format(ext['nm']), '')
NameError: name 'ext' is not defined

{Filename}

wish.Если парам-р имеет {Filename},то давать ош при запуске тула,при untitled tab.

Lexer opt

ограничение не раб-т.
надо

  • задано html,html_ - НЕ должно раб-ть в json "Command only for lexers: html,html_"
  • если пусто- нет огр-я

(ask) How set around frame?

Можно ли из текущих контролов dlg_custom сделать рамку для с подписью для обозначения именованной группы, которую она будет окружать?
Похоже что ответ "нет"

(bug) close keys

Close Keys dialog,ESC-

  File "/home/user/cuda/cuda/app/py/cuda_exttools/__init__.py", line 13, in dlg_config
    def dlg_config(self):           return RLS.dlg_config()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 287, in dlg_config
    return self.dlg_config_list()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 472, in dlg_config_list
    ed_ans  = self.dlg_config_prop(self.exts[new_ext_ind], keys)
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 824, in dlg_config_prop
    keys    = apx._json_loads(open(keys_json).read()) if os.path.exists(keys_json) else {}
UnboundLocalError: local variable 'keys_json' referenced before assignment

(wish, wiki) Need dlg_custom design guide for main OSs

Хорошо бы составить советы по компоновке контролов, чтобы они прилично смотрелись в разных ОС (Win, Mac, Lnx).
Типичные проблемы:

  • Как распознать ОС?
  • Как расположить в одну строку label, edit, button, чтобы они выглядели выровненными?
  • Какое смещение делать по-вертикали от label до edit/list, чтобы они выглядели как подпись над редактором/списком?
  • Какое смещение по-вертикали между кнопками минимально достаточное?

(bug) new-tool create

не моуг создать тул. Add, отмена в dlg_file, потом

  • name "tool2"
  • file "gedit"
  • param {Interactive}
  File "<string>", line 1, in <module>
  File "/home/user/cuda/cuda/app/py/cuda_exttools/__init__.py", line 13, in dlg_config
    def dlg_config(self):           return RLS.dlg_config()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 288, in dlg_config
    return self.dlg_config_list()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 471, in dlg_config_list
    self.last_ext_id    = ids[ext_ind]
IndexError: list index out of range

More nice names, cfg

предлагаю ключи

            "file":
            "save"
            "params"
            "dir"
            "name"
            "id" 
            "shell"
            "out"
            "capture"
            "enc"

Output type err

проверьте все типа вывода. Один -Output- дает всегда append, это не Output Append, просто output.

New readme

Plugin for CudaText.
Allows to call external programs in CudaText.
Adds menu "Tools" (near "Plugins") with commands: 
    Config (customize tools),
    Run main lexer tool (analog of SublimeText's command "Build"), 
    Tool1...ToolN (items appear after tools are configured).

Config file is settings/exttools.json.

Details:
- "Shell command" option must be checked for tools which you want to run via OS-shell: 
  on Windows it's commands of cmd.exe. On Linux this opt usually not needed.
- If lexer(s) assigned to a tool, tool can be called only when these lexers active. 
- "Patterns" allow to parse output lines by regex, and find in these lines: 
  filename, line number, column number. If line parsed OK, you can jump to found
  line number and file by clicking in Output panel.


Author: A.Kvichanskiy (kvichans at forum/github)
License: MIT

Macro linenum 0-base

есть макр для 1-based line num, для красоты хорошо бы еще для 0-based(чтоб было)

CurrentLineNum0
CurrentColumnNum0

(bug) Clone

list имеет 1 п-т.Жмем clone, clone. вылет

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/cuda/cuda/app/py/cuda_exttools/__init__.py", line 13, in dlg_config
    def dlg_config(self):           return RLS.dlg_config()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 269, in dlg_config
    return self.dlg_config_list()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 428, in dlg_config_list
    self.last_ext_id    = ids[ext_ind]
IndexError: list index out of range

button top-y

нужна правка- кнопки по краю контролов edit, без -1..-2 пикселя.

Width er

Custom dlg. встаю на width of keys, "R50". OK- err

  File "/home/user/cuda/cuda/app/py/cuda_exttools/__init__.py", line 13, in dlg_config
    def dlg_config(self):           return RLS.dlg_config()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 269, in dlg_config
    return self.dlg_config_list()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 391, in dlg_config_list
    self.dlg_prs['keys']    = str(max( 50, int(custs[2])))
ValueError: invalid literal for int() with base 10: 'R50'

err- clone buttn

выбрал второй тул- на моем скрине- "edit"
жму clone-
bug- диалог пропал,
bug- появился в меню третий тул НО в списке потом опять 2

wish--клонировать в имя "edit и-чтото"

Dialog api

Ради этого плагина делалось апи :)

wish: refact

Лучше исп. if name.startswith('-') для сепараторов (то же в Macros)

No run if empty filename

If tab untitled: don't run tool if has macros {FileNNNNNNN}- show status message "Cannot run this tool for untitled tab"

Commd "Go to next output line"

Была идея дать в плагине команду "Перейти на след проблему". Для этого в API вы добавили извлечение строк из output и установку выделенной. Планирую сделать.

Listbox sel index

Перв. вызов диалога- listbox не имеет выделения
(значит не работает Edit/Del)

Dialogs List/Props

2 длг нужно-

  • позволит не юзать groupbox
  • мне не надо делать parent=
  • КРИВАЯ логика сейчас- правка не ясно к чему- к какому тулу- очень плохо:(

(feature) New format for Tool pattern

Оказывается в re у Питона есть именованные группы!
Я сделаю через них.
Сравните:

  • В Син разбор ошибки при запуске Питона делается при указании

    • рег.выр: \w+ "(.+)", line (\d+).*
    • номера группы с именем файла: 1
    • номера группы с строкой: 2
    • номера группы с колонкой: --
  • Куд это будет делаться одним рег.выражением

    \w+ "(?P<file>.+)", line (?P<line>\d+).*

Нужно передать в плагин навигацию по строкам из Output

Err, linux

сделал тул (файл /usr/bin/tidy -тут нет расширения)
парам {FileName}. захват. запуск-


Original exception was:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/.cudatext/py/cuda_exttools/__init__.py", line 265, in run
    subprocess.Popen(cmd)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/tidy /home/user/test.htm'

err- New

  • Add...
  • select any file e.g. project1.LPI
  • OK(no fill other)
Original exception was:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/cuda/cuda/app/py/cuda_exttools/__init__.py", line 13, in dlg_config
    def dlg_config(self):           return RLS.dlg_config()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 506, in dlg_config
    return self.dlg_config_list()
  File "/home/user/cuda/cuda/app/py/cuda_exttools/cd_exttools.py", line 209, in dlg_config_list
    self.last_ext_id    = ids[ext_ind]
IndexError: list index out of range

Help dialog

Button too wide. Pls to right corner, size 80-120

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.