kvichans / cuda_backup_file Goto Github PK
View Code? Open in Web Editor NEWCudaText plugin with events/commands to create copy of current file and to compare
CudaText plugin with events/commands to create copy of current file and to compare
Сообщения, которые видит пользователь:
messages.pot.txt
Можно выкл. лог в консоли?
[ 5'34.19"]Command.on_save_pre:372
[ 6' 7.33"]Command.on_save_pre:372
[ 6'23.28"]Command.on_save_pre:372
Cud version:
call "..." button, to browse dir,
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/cuda/cuda/app/py/cuda_backup_file/cd_bk.py", line 633, in dlg_config
fold = CdSw.dlg_dir('')
File "/home/user/cuda/cuda/app/py/cuda_backup_file/cd_plug_lib.py", line 716, in dlg_dir
return dlg_dir(init_dir)
NameError: name 'dlg_dir' is not defined
Wish- учесть кодировку. бекап делать в тойже кодировке.
Wiki---> PROP_ENC: str: encoding name. Possible values are shown in menu of encodings.
ps. или плагин не читает текст?
default needs QUotes:
diff -u "{BACKUP_PATH}" "{CURRENT_PATH}"
Linux app has template image_2017-01-25_12-31-51.png
pls use _ as lead- before date, middle- between date/time.
Create copy/ Compare- раузмно сделать 2 команды. разные акшены. (мне НЕ нужно делать compare)
def option shows:
file/path\bk/filename.001.ext
Unix needs / slash.
"menuBK" not good: pls, python name. "menu_bak" for ex.
pls Configure "Backup File"
.
[ini1]
section=Events
id=on_save_pre
params=on_save_pre
Тут id некорректный- посмотрел пример плагинов- тут надо писать уник. слово для плагинов
Это будет ключ в .ini
Пример - id=BackupFile
показ диалога, видно More>>.
жму more.
Оконный менеджер спятил- движение мышы- мерцает окно- 10 раз в сек
еле нажал less<<
стало ок.
открыл Куд
создал новый файл из пустого таб.
сохранил в ~/tst-bak/tst1.txt.
открыл длг опций, включил Авто.
делаю сейв того файла. Авто бака нету. папки bk нету.
не вызвать diff, Ubuntu.
вызвал команду "...compare..".
диалог "имя бака". нажал ОК.
потом в консоли
[ 0.02"]Command.on_save_pre:355 sv_path=/home/user/test/bk/tst.004.htm
[ 0.05"]Command.on_save_pre:373 ok
[ 2.18"]Command.copy_bk_or_compare:245 sv_path=/home/user/test/bk/tst_02февр.17-14.htm
[ 2.21"]Command.copy_bk_or_compare:260 mask={FILE_STEM}_{DD}{MMM}{YY}-{hh}.{FILE_EXT}
[ 2.22"]Command.copy_bk_or_compare:282 mask=tst_\d\d\w\w\w\d\d-\d\d.htm
[ 3.83"]Command.copy_bk_or_compare:339 src, trg=('/home/user/test/tst.htm', '/home/user/test/bk/tst_02февр.17-14.htm')
и все
Traceback (most recent call last):
File "", line 1, in
File "/home/ildar/.config/cudatext/py/cuda_backup_file/cd_bk.py", line 342, in copy_bk_or_compare
subprocess.Popen(diff, shell=vrn_data['dfsh'])
File "/usr/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] Нет такого файла или каталога: 'diff -u "/home/ildar/1/index_190123032518.php" "/home/ildar/1/index.php"': 'diff -u "/home/ildar/1/index_190123032518.php" "/home/ildar/1/index.php"'
cudatext 1.72
python 3.6.7
ubuntu 18.04 x64
дефолт конфига.
жму Add variant, combobox.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/cuda/cuda/app/py/cuda_backup_file/cd_bk.py", line 456, in dlg_config
,diff=vds['diff']
KeyError: 'diff'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.