#2361
|
||||
|
||||
Quote:
I checked settings.json and found the correct strings there. So, another 'problem' created by Excel's 'features'. There are many examples for unwanted 'conversion' etc. E.g. I want to open a csv file which contains Corona figures for age groups: 0-4 5-9 10-14 15-19 ... What does Excel do? 0-4 05. Sep Oct 14 15-19 ... Haven't found a way to turn these automatic 'helpers' off. If you format all columns to Text, Excel won't remember... Same with the tsv settings file, created by mgpai's script: Doubleclicking for opening it in Excel results in corruption of some strings. So, you have to import it, select UTF-8,... Also haven't found a way to tell Excel that I want to open all files as UTF-8. Question 1: You seem to be pretty familiar with Excel, too. Any ideas, e.g. how to let Excel treat all *.txt, *.csv, *.tsv, ... as UTF-8? Question 2: If you format all columns to Text, Excel won't remember... Do you know how to tell Excel to use text formatting as default? This would solve some problems such as my age group example. Then I could open csv files from RKI using doubleclick instead of time consuming import of each and every file... Last edited by StefanM; 21.06.2022 at 11:50. |
#2362
|
||||
|
||||
Quote:
Please see: lukemiller.org/journal/2005/03/changing-default-text-import-origin.html smallbusiness.chron.com/open-utf8-excel-63726.html It seems Excel does support BOM, see superuser.com/questions/911369/excel-change-default-encoding-file-origin-of-text-import-wizard-to-utf-8-650 @mgpai: see stackoverflow.com/questions/4389005/how-to-add-a-utf-8-bom-in-java, just have to add the BOM character at the beginning of the string should do it, for example Quote:
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 21.06.2022 at 12:43. |
#2363
|
||||
|
||||
I'm sorry but I have not found a way to change/define the default formatter of new sheets.
__________________
JD-Dev & Server-Admin |
#2364
|
||||
|
||||
I googled already for ages...
But the BOM issue, I haven't found myself. Will check it out. Thanks a lot! EDIT: No, this doesn't help! As you still have to use import. What I want to do is open files in Excel with doubleclick without corrupting anything. The ultimate solution, however, would be to be able to configure Excel in such a way, that it uses certain start settings. E.g. I often use 'text to columns'. But it's a pain in the ass, that every time you start Excel, it is reset to it's default settings and it is enabled. Last edited by StefanM; 21.06.2022 at 12:49. |
#2365
|
||||
|
||||
have you tried to change default encoding via registry ?
__________________
JD-Dev & Server-Admin |
#2366
|
||||
|
||||
Yes, long time ago already. And in Win10 there is also an option to enable UTF-8 (still called experimental). Both won't help.
But I set Windows notepad to UTF-8 via Registry, also long time ago. That works. |
#2367
|
||||
|
||||
Quote:
What excel version are you using? Just tested on Excel 16 on my college computer and UTF-8 was default encoding.
__________________
JD-Dev & Server-Admin |
#2368
|
||||
|
||||
Quote:
I run Excel 2019. So, how did you test it: Did you open a csv or tsv file with UTF-8 encoding by doubleclicking on it and Excel displayed 'special' characters like this one '↓ At the bottom' correctly? I'm not talking about importing such a file, as I don't want to do that: Too many clicks:
PS Notes: answers.microsoft.com/en-us/msoffice/forum/all/how-to-set-excel-to-default-to-utf-8-when-opening/c05ac760-b9e8-4cad-b188-6c0b4d3d2926 superuser.com/questions/911369/excel-change-default-encoding-file-origin-of-text-import-wizard-to-utf-8-650 And also this is only about text import as explained in those 7 steps (click marathon) I tried to explain. Last edited by StefanM; 21.06.2022 at 21:22. Reason: PS Notes |
#2369
|
||||
|
||||
Quote:
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 22.06.2022 at 10:48. |
#2370
|
||||
|
||||
Quote:
I was looking for a solution in general, not only for JD issues. But never mind, I've been searching for ages and could not find solutions. But thanks for trying! I really appreciate this! |
#2371
|
|||
|
|||
Hello mgpai,
when I click "Toggle sound notification" the selected items are sent to history ("Move to history") suddenly Is there any way to correct that?
__________________
Aktuelles Windows |
#2372
|
||||
|
||||
Have you tried LibeOffice/other SpreadSheet Tools? Even maybe Online Services/Tools?
__________________
JD-Dev & Server-Admin |
#2373
|
||||
|
||||
Check your scripts in Eventscripter! They must check on action name!
__________________
JD-Dev & Server-Admin |
#2374
|
|||
|
|||
Sorry, what does that mean, what action name? Where is it? What do I have to do exactly?
__________________
Aktuelles Windows |
#2375
|
||||
|
||||
@Dockel: those are scripts in your Eventscripter. You have to check Settings->Eventscripter and search the script and make sure that it only runs on correct action name.
__________________
JD-Dev & Server-Admin |
#2376
|
|||
|
|||
Sorry, do not understand what / where the action is.
__________________
Aktuelles Windows |
#2377
|
||||
|
||||
@Dockel: those rightclick context menu items are scripts in your Settings->Eventscripter.
There you must have setup those on Tigger/Event "Downloadlist Contextmenu Button Pressed" then click on edit and make sure that the script does check for correct name, something like Quote:
__________________
JD-Dev & Server-Admin |
#2378
|
|||
|
|||
OK, I will try it. Thank you!
__________________
Aktuelles Windows |
#2379
|
|||
|
|||
Quote:
Code:
/* Export settings Trigger : none */ var rows = []; var keys = []; var file = JD_HOME + "/settings.tsv"; var settings = callAPI("config", "list", ".+", true, true, true, true); settings.forEach(function(item) { var itemKeys = Object.keys(item); itemKeys.length > keys.length && (keys = itemKeys); }) keys = keys.concat(["modified", "comment"]); rows.push(keys.join("\t")); settings.forEach(function(item) { var obj = {}; var row = []; keys.forEach(function(key) { obj[key] = JSON.stringify(item[key]); }) obj.modified = obj.value == obj.defaultValue ? "\"Default\"" : "\"Custom\""; for (key in obj) { if (key == "value" || key == "defaultValue") { row.push(JSON.stringify(obj[key])); } else { row.push(obj[key]); } } rows.push(row.join("\t")) }) writeFile(file, rows.join("\n"), false); Code:
/* Import Settings Trigger: None */ var file = JD_HOME + "/settings.tsv"; var text = readFile(file).trim().split("\n"); var keys = text.shift().split("\t"); var settings = []; text.forEach(function(row) { var obj = {}; row.split("\t").forEach(function(item, index) { try { obj[keys[index]] = JSON.parse(item); } catch (e) { obj[keys[index]] = null; } }) settings.push(obj); }) settings.forEach(function(item) { item.value != null && callAPI("config", "set", item.interfaceName, item.storage, item.key, item.value); }) |
#2380
|
||||
|
||||
Hey, you really created a script to import settings!
And you also added the the CUSTOM/DEFAULT column! Thank you so much for all the hard work! Both scripts will really be very useful for me (and not only for me, I guess...)! Will test later and let you know about the result. You probably already read this!? One working way to use Excel for the job of viewing/editing settings.tsv without corruption. If you know a better way, please let me know. Last edited by StefanM; 26.06.2022 at 15:41. |
#2381
|
||||
|
||||
I'm sorry, but import doesn't seem to work for me.
But maybe I'm doing something wrong. Summary: Starting the import did the same, as if I would have installed 7 extension modules, one after the other, without restarting until all 7 were installed. The I restarted, and all those 7 modules were there. But none of my settings had been imported. Details: This is how I tested: I used a test installation with many custom settings, filters, ... From this installation I created a tsv export. Then I closed my test-JD and renamed cfg folder to force JD to create a new clean cfg folder, which it did after restarting JD. In this clean installation I installed your import script and then I tried to import settings.csv. I confirmed the security prompt. What happened you can see in the attached screenshot collection: More than 10 windows popped up. The last one (the one on top) asked me, if I really wanted to install shutdown extension module. Please note that I never installed that module in my life. I clicked on Yes, anyway. This provoked another pop up: 'New update available' I clicked on later The next popup said: Please restart JDownloader to finish... I clicked on later The next popup asked me about installing infobar. Please note that I never installed that module in my life. I clicked on Yes, anyway. Again the update info... Again I clicked on later Again 'Please restart...' Again I clicked on later Please see the screenshot collection for the next popups. When I was through, I restarted JD. Nothing had been imported But all those modules had been installed. Any ideas what went wrong, when trying to import settings.tsv? |
#2382
|
|||
|
|||
Script Event help - Connection problems
Hello guys,
I need help for a event script : Action : Restart the download when the status is "Connection Problems" I have a timer about 5min to wait for a retry and I want a event scrip to avoid this. Or someone can tell me how reduce the 5min to 30 sec. Thanks all. Sorphee |
#2383
|
||||
|
||||
Merged EventScripter threads.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2384
|
||||
|
||||
@StefanM: Please know that importing settings from extensions will only work when the extension is installed and enabled. JDownloader doesn't know anything of those settings when the extension is not loaded. As the cfg folder doesn't know about the installed extensions, JDownloader recognizes the installed extensions in libs folder and aks to install/finalize their installation. This *could* be optimized by showing a dialog with checkboxes instead, but that's more a "beauty optimization"
__________________
JD-Dev & Server-Admin |
#2385
|
||||
|
||||
@Jiaz, @mgpai
Quote:
Apart from Event Scripter I had not extensions installed. But when I tried to import the exported settings.tsv file to a clean JD with only default settings, the only thing that happened was: What you can see in my screenshots collection. I did not want to install any of those extensions, but starting the import script from mgpai obviously started the download/installation process for one extension after the other. I was confronted with all those 'Are you sure...' popups. So I said yes to each of those prompts. But that was all that happened. Not a single setting had been imported in the end. Instead only all those extension had been installed. Did that import script work for you? Have you tested it? |
#2386
|
||||
|
||||
@StefanM; I've tested but NOT with a complete empty cfg folder but just tried to restore some modified settings by importing them from file. Will check by tomorrow
__________________
JD-Dev & Server-Admin |
#2387
|
||||
|
||||
@Jiaz, @mgpai
Quote:
With cfg folder removed, JD created a new, empty cfg folder. However, if I remember correctly, Event Scripter was still installed!!! But without any scripts. So, I installed mgpai's import script and tried to import my settings.tsv with all those custom settings. The result was, what I told you... PS: I used settings.tsv with that special CUSTOM/DEFAULT column. Will have to verify if this could have caused the failure of the import script!?!? |
#2388
|
||||
|
||||
@SefanM: Please check your tsv for following keyword InstallExtension
I just checked source and this can trigger the extension installation. and also check update/versioninfo/JD/extensions.installed.json and extensions.requestedinstalls.json
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 28.06.2022 at 18:37. |
#2389
|
||||
|
||||
Quote:
But this should be in any Advanced Settings export file. Code:
"Install Extension: Folder Watch" "BOOLEAN" "false" "Extension" "false" "InstallExtensionFOLDERWATCH" "Default" "Install Extension: Scheduler" "BOOLEAN" "false" "Extension" "false" "InstallExtensionSCHEDULER" "Default" "Install Extension: JD Shutdown" "BOOLEAN" "false" "Extension" "false" "InstallExtensionSHUTDOWN" "Default" "Install Extension: AntiStandBy" "BOOLEAN" "false" "Extension" "false" "InstallExtensionANTISHUTDOWN" "Default" "Install Extension: Info Bar" "BOOLEAN" "false" "Extension" "false" "InstallExtensionINFOBAR" "Default" "Install Extension: Support Chat" "BOOLEAN" "false" "Extension" "false" "InstallExtensionCHAT" "Default" "Install Extension: Translator" "BOOLEAN" "false" "Extension" "false" "InstallExtensionTRANSLATOR" "Default" "Enable/Disable Extension: Archive Extractor" "BOOLEAN" "false" "Extension" "true" "EnableExtractionExtension" "Custom" "Enable/Disable Extension: Event Scripter" "BOOLEAN" "false" "Extension" "true" "EnableEventScripterExtension" "Custom" Last edited by StefanM; 28.06.2022 at 18:47. |
#2390
|
||||
|
||||
@StefanM: Thanks for the feedback. This is the cause as the import results in installation of the extensions. I will check by tomorrow. Most likely value conversion issue. Either an issue within JDownloader or something that needs to be fixed with export/import script.
__________________
JD-Dev & Server-Admin |
#2391
|
|||
|
|||
Hi,
I'm looking for a script to add the download URL to the comments of a video file. I see a thread with a similar request here: https://board.jdownloader.org/showthread.php?t=83361 but the script itself is not included. Any help is appreciated. Thanks |
#2392
|
||||
|
||||
Quote:
__________________
JD-Dev & Server-Admin |
#2393
|
||||
|
||||
Quote:
E.g. if you were downloading images/videos from twitter: content URL = twitter post URL direct URL = direct URL to image inside twitter post -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2394
|
|||
|
|||
Ah, thanks for clarifying. I mean the content URL.
|
#2395
|
||||
|
||||
Thanks for the info.
But, will this core update fix both problems? Problem 1: Running the import script results in prompting for installation of all available extensions, which have not been installed already. Problem 2: Running the import script does not import any customized settings from settings.tsv. Advanced Settings are the same as they were before running the script... ... apart from those extensions (Problem 1) |
#2396
|
||||
|
||||
Okay.
Please keep in mind that I simply wanted to help clarify this. I do not write EventScripter scripts for users so please wait for mgpai or another user to help with this. Another question: Do you want to simply have that URL in the "Comment" field in JD or somewhere in the metadata of the downloaded files?
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 29.06.2022 at 14:23. Reason: Added quote for context |
#2397
|
||||
|
||||
Quote:
I was not able to reproduce any issues, would be good to know which settings in particular failed to restore? an example? In my tests with 2 custom values it worked fine
__________________
JD-Dev & Server-Admin |
#2398
|
||||
|
||||
Quote:
Here are some examples, where I had quite a few custom settings:
|
#2399
|
||||
|
||||
Quote:
And at the moment there are no plans to make them available via advanced settings. In headless mode there are no gui menus. And either you are using the full default menu or a full customized one.
__________________
JD-Dev & Server-Admin |
#2400
|
||||
|
||||
Wasn't aware of this. That explains it.
Just had in mind that (almost) all settings are (also) available in Advanced Settings. Any other settings, which are not available there? Quote:
|
Thread Tools | |
Display Modes | |
|
|