
#2321
|
|||
|
|||
![]()
@mgpai
REQ Clipboard Observer catch links only from sites(.)com Pretty much clear. 1. Turn on Clipboard Observer 2. Add to Link Grabber tab only if the clipboard contains sites from asd(.)com, zyx(.).com only Last edited by xefeg; 16.06.2022 at 15:19. |
#2322
|
|||
|
|||
![]()
Script not required. You can create/use linkgrabber filter rule:
Code:
if > sourceurl(s) > contains not > mysite.com link origin > is > Clipboard |
#2323
|
|||
|
|||
![]() Quote:
But how to add multiple URLs? adding 3 rules does not work. But 1 rule is working with 1 url Last edited by xefeg; 16.06.2022 at 17:35. |
#2324
|
|||
|
|||
![]()
Use regex (enable regex checbox fo the field):
Code:
(one\.com|two\.com|three\.com) |
#2325
|
|||
|
|||
![]()
Perfect and Thank you.
|
#2326
|
||||
|
||||
![]()
@mgpai: thanks for your quick help
__________________
JD-Dev & Server-Admin |
#2327
|
|||
|
|||
![]()
Hi There.
I have been experimenting with event scripter and have run into some complications in trying to get it to do what I want. Ultimately my goal is to make a script that when a downloaded finishes & extracts the script will check if an .iso file was extracted. If an .iso file is detected then the script should run a Unix Executable against this .iso file. This executable (called "extract-xiso") is designed to further extract the contents of the .iso into a folder of the same name as the .iso. Lastly the script should move the final extracted contents to a new directory. At the moment however I am unable to get event scripter to run my unix executable. Here is the basic test script I have at the moment with the Unix executable located in the /output folder for simplicity. For reference I am using the Jdownloader docker container: var extract = "/output/extract-xiso"; var file = "/output/test.iso"; callSync(extract, file); When I test run this script I get the following error: "java.io.IOException: Cannot run program "/output/extract-xiso": error=2, No such file or directory" Can you please advise what I am doing wrong? I am able to run this executable successfully from command line as follows: extract-xiso test.iso For reference this unix executable has been compiled to run on a 64-bit linux OS. It does not have a file extension. Any help would be much appreciated. Thanks in advance. |
#2328
|
||||
|
||||
![]()
Sure the path to the executable is correct and it is executable? (flag is set? chmod +x /output/extract-xiso)
__________________
JD-Dev & Server-Admin |
#2329
|
|||
|
|||
![]()
File paths seem to be correct. I confirmed that extract-xiso is executable. It is also showing as bright green in the docker console. I have this docker container installed on my Unraid system so as a test I executed the file from Unraid terminal. Running "file extract-xiso" from Unraid terminal gives me the following: "extract-xiso: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=7857e5a9ca7d61be7223fba2d6918be2a3fcc6af, not stripped"
For reference this is executable I am trying to use although I had to build from source: **External links are only visible to Support Staff**... I am not an expert on any of this stuff so maybe there is something basic that I am missing here... |
#2330
|
||||
|
||||
![]()
Request: Script for exporting Adcanced Settings
@mpgai Hi again! You already helped me before. So, maybe you can/will help once again. I discussed with Jiaz a feature request to export Advanced Settings to a file. And he told me that this could be done by using a script. I would like to export all lines and all 4 (5) columns in TSV format - if possible: Code:
Key Description Value Actions (parts 1 and 2) My suggestion: (Contents of that TSV file)
Details for Columns Value, the most complicated part, I guess I don't want to write any too specific requirements, because I don't know, what is possible. Examples: Of course it would be great, to have that what you see here in example 1 in a column:
Spoiler:
![]() In below case, example 2, the word checked or unchecked would describe it best, I guess
Spoiler:
![]() And in the following two cases, examples 3 and 4, just writing SYSTEM_DEFAULT or When the actual Download starts would be just fine.
Spoiler:
![]()
Spoiler:
![]() Do you think, you could write such a script? Thanks for any efforts taken in advance! PS: What do I need that TSV file for? I frequently modify many of those Advanced Settings and I would like to comment, why I made this or that setting. At the moment I have to create a single document for every setting. And I cannot even copy everything from Advanced Settings list. :( Last edited by pspzockerscene; 17.06.2022 at 17:14. Reason: Put images into SPOILER tags to prevent ugly forum layout |
#2331
|
||||
|
||||
![]()
@mgpai: I recommend to store the (default)values JSON encoded as strings for easier storage as key/value will be strings then.
__________________
JD-Dev & Server-Admin |
#2332
|
||||
|
||||
![]() Quote:
It sounds that there really is a (not too complicated) way to export those data. ![]() Hope that mgpai will see it the same way... ![]() |
#2333
|
|||
|
|||
![]() Quote:
Code:
/* Remove links Trigger : JDownloader Started */ getAllFilePackages().forEach(function(package) { package.finished && package.downloadLinks.forEach(function(link) { !getPath(link.downloadPath).exists() && link.remove(); }) }) |
#2334
|
|||
|
|||
![]()
The script will export the settings in JSON format. You can use excel to import/format it.
Code:
/* Export settings Trigger: None */ var file = JD_HOME + "/settings.json"; var settings = callAPI("config", "list", ".+", true, true, true, true); writeFile(file, JSON.stringify(settings, null, 2), false); |
#2335
|
||||
|
||||
![]() Quote:
![]() After Excel import I get this (example) ![]() which is this line in Advanced Settings: ![]() Question 1: Is there any way, to create something like a tab separated file instead? This would solve almost all below problems/questions. Question 2: How do I search for a specific key in Excel? I consider myself quite experienced with Excel, but never let Excel handle any *.json files for me. Question 3: I notice that the key name is shown in two parts: In my example, I will find part 1 (GeneralSettings) in InterfaceName and I will find the rest of the key in (key): DeleteEmptySub... The key, however, in Advanced Settings is: GeneralSettings: Delete Empty Sub Folders... So, even the naming is different: DeleteEmptySubFolders... (in Excel import) vs. GeneralSettings: Delete Empty Sub Folders... (in Advanced Settings) Question 4: Any chance to show the key as it is displayed the same way as in Advanced Settings (green instead of red)? Question 5: How do I sort those keys in Excel? How can I display the key names? At the moment each and every line is just called 'Record'. Question 6: I would also like to be able to use Excel filters, e.g. just showing me all keys where there is a custom value. Question 7: I want to use the exported file (in Excel) to write comments for some of those keys. How do I do that in this format? This was/is my main intention EDIT In the meantime I found a tutorial here: howtogeek.com/775651/how-to-convert-a-json-file-to-microsoft-excel/ Anyway, is it possible to create a tab separated file directly? Last edited by StefanM; 18.06.2022 at 18:29. |
#2336
|
||||
|
||||
![]() Quote:
the information in CSV format, make sure to JSON.stringify the value Quote:
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 19.06.2022 at 09:52. |
#2337
|
||||
|
||||
![]()
@mgpai, @Jiaz:
Quote:
Quote:
I follow Jiaz's recommendation here. So, please disregard my requests as per Q3 and Q4. It sounds really good, that there even might be a chance to import/restore those exported settings later. @mgpai, @Jiaz: Thanks to both of you for all your efforts! |
#2338
|
||||
|
||||
![]()
@mgpai:
Just found out, that when using Excel, the limit is 1,000 rows. Message from Excel 2019 Code:
Limit of 1000scanned rows reached That's why I would need a TSV file, please! |
#2339
|
||||
|
||||
![]() Quote:
![]()
__________________
JD-Dev & Server-Admin |
#2340
|
||||
|
||||
![]() Quote:
As this was completely new to me: limitations of only 1,000 rows, while on the other hand Excel can handle sheets with 1,048,576 rows and 16,384 columns... Guess, the 'json-module' in Excel is pretty old, as it is also extremely slow... |
![]() |
Thread Tools | |
Display Modes | |
|
|