Search Results for 'script'
-
Search Results
-
I have posted this 5 minutes ago, but it was marked as spam and is gone… Sorry if it pos up twice later.
Im am subscribed to Sams youtube channel on which he is explaining things within tapforms, I wouldn’t have thought of before. (If you don’t know the channel, check it out, it is called pasamio.)
Watching this channel, tought me, that much more things are possible. So I wonder, if it is possible to automate the things I am doing over and over again.
If so, I would be happy to pay someone, helping me with that project, because I can’t code in Java Script (or any other language than a bit html and css).The task:
Filling tapforms with audiobook metadata.The status quo:
A simple database with one picture and some other fields. No links or anything fancy.
Files on a Mac. In a directory called “x” All in this format:
Directory named: “title [author]” or just “title”
in there:
one or more or rarely none “.m4b” files
one or none “info.txt” file
one or more “.jpg” fileWhat goes where in tapforms:
The part of the directory name “title” goes to a text field.
The part of the directory name “author” goes to a text field.
The length of all combined m4b files goes to a time field with hours / minutes
The content of “info.txt” goes to a notes field
The “.jpg” file goes to a photo fieldWhat is “automated” now:
I do a copy and paste of the content of the whole directory “x” in a text file. Then I replace all ” [” with a “;” and all “]” with nothing.
Then I import the text file into tapforms, so the “title” and “author” fields are filled.What would be the goal:
Getting all mentioned above automatically into tapforms.
– title: always there, so it should be inserted into the field in tapforms
– author: could be empty. So not even the brackets are there. Not “title []”, but “title”. If so, the field in tapforms should be empty too
– jpg: If one jpg is in the directory, it should be in the field. If more are in the directory, non should go to tapforms (I have to choose by hand)
– length: the length of all m4b files should be added and put into the corresponding field. If no m4b file is in the directory, the field should be empty
– info.txt: The content of this file should go into the notes field. If there is no info.txt, it should be empty.Importing title and author by hand is no problem at all. Getting the time in the field is the most work. Then info.txt and lastly the jpg.
If these three things could be automated -or all five – it would be fantastic.Is it possible with not so much effort?
Here’s an example of a script that will cause this:
https://raw.githubusercontent.com/cfilipov/tfscripts/master/cheerio.js
You can try copy-pasting the contents of that script directly in the TapForms script editor and it will beach ball forever. It’s possible if I waited long enough whatever was blocking the main thread would finish but after waiting a long time I just killed tap forms (which of course does not save the script). If I had to guess it’s the syntax parsing of the js causing the hang.
As a workaround I used Sam’s script manager to download the script and add it without using the editor UI. This works for getting the script in tap forms and it’s runnable, however, if you try to open the script to edit/view it will also hang just like before.