Old 11-04-2019, 08:18 AM   #1
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default Project Manager

https://forum.cockos.com/showthread.php?t=259165
NOW NATIVE!!


Projekt Manager

Features:
  • Read out the names of the project folder (no subfolders yet)
  • Rating
  • Author from ProjectSettings "Notes"
  • Style (can be changed)
  • Tempo
  • Time signature
  • Date
  • Length
  • Project Counter Time (how long did I work on the song (in d: h: m)
    for this the "Counter time project.lua" from Archie has to be installed.
  • DEADLINE (just counts down and clears at zero) joke (goes to -1 the next day)
  • Comments
  • ** each column can be sorted **

After 4 weeks the script was mainly completed by LB0 (donation) (https://forum.cockos.com/member.php?u=90399)
. Thank you again. Thanks for the help to nofish,solger, eugen2777 and the others from the community


https://www.dropbox.com/sh/yhyw7x9li...FCg7eS-Wa?dl=0



Installation

1. Copy the folder with the 3 files into Reapers "Scripts" folder. (Reaper Menu : Options/Show REAPER resource path in Explorer/Finder

2. Open and Run "spk77_Save table to file and load table from file_functions.lua" (you can not see anything) (Reaper Menue: Actions/Show action list/New action../Load ReaScript

3. Open and "Edit action" ProjectManager.lua to set the path of your project folder Save with Ctrl+S
(It looks like this to me local projfol = " C:\\ReaperProjects\\ "

4. To add a shortcut for Example "P" Reaper Menu : Actions/Show action list
Filter : "ProjectManager" then click "ProjectManager" and "Shortcuts for selected action"

5. Installing the font for the asterisks(*****) with the right mouse button select "install"

6. Install counter timer von archie via ReaPack
https://forum.cockos.com/showthread....ghlight=archie


Last edited by Dragonetti; 11-16-2021 at 01:28 AM.
Dragonetti is offline   Reply With Quote
Old 11-04-2019, 10:47 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Yes it is, but we need some more info on that. AND: you will not be able to see it in Explorer or something, only within Reaper.

What do you need the Project Manager for? For which usecase?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 11-05-2019, 05:07 AM   #3
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Only within Reaper is fine.
I would like to be able to open a Reaper project from this script.
Then I would like to create categories(Name,Composer etc) and be able to sort the files by those categories.

Composer (several musicians are working on this computer).
Date created
Date modified
Rating
*DEADLINE* (x days)
Status (unfinished, finished)
Tempo
Time Signature
Length
Comments1,2,
etc

The question is, what information could the script read from the project file?
(Name,Date,Tempo , Time Signature, Length,)

Thank you

Last edited by Dragonetti; 02-11-2020 at 04:39 AM.
Dragonetti is offline   Reply With Quote
Old 01-10-2020, 01:47 PM   #4
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

bump
I will donate!!
Please

Or someone would have to explain (joke) to me how to create a table and read out the project name, tempo, length and time signature.
Script: edgemeal_Save project plugin info to text file.lua can do quite a bit.



Last edited by Dragonetti; 01-10-2020 at 01:54 PM.
Dragonetti is offline   Reply With Quote
Old 01-10-2020, 02:02 PM   #5
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

I've been wanting to do a script for this for a long time... but not having the time. I did one that is half way there, for my internal usage, which is not ready to be published in general. But yes this is certainly possible to do. In my case I want also to group REAPER project files in Projects Sets. Like managing groups of RPP files for each project.
heda is offline   Reply With Quote
Old 01-10-2020, 02:58 PM   #6
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Yes, I've already thought of you.
The track template script has little resemblance.
Dragonetti is offline   Reply With Quote
Old 01-10-2020, 05:56 PM   #7
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

There is some indows explorer alternative which allows to tag files, you should look into these.


https://www.xyplorer.com/tour.php?page=tags



https://www.tagspaces.org/
X-Raym is offline   Reply With Quote
Old 01-11-2020, 04:00 PM   #8
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Thank you X-Raym.
I will test this possibility
Dragonetti is offline   Reply With Quote
Old 01-11-2020, 04:32 PM   #9
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

I can't start the alternative explorer from Reaper (Ctrl + O)
Does anyone have a hint?
Dragonetti is offline   Reply With Quote
Old 01-27-2020, 02:46 PM   #10
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Does none of the programmers have time?

I will donate.

Can you recommend a Lua course for beginners?(german)
Thank you
Dragonetti is offline   Reply With Quote
Old 02-07-2020, 07:48 AM   #11
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

I found this little script. With this you can read out the project folder (REAPER Media). The lua script is in the same directory as the project folder.
All this would then have to be in a kind of tableGUI and only * .rpp files (without file extension) should be read out. Can someone help me there?
Thank you very much
Code:
function msg(m)
  return reaper.ShowConsoleMsg(tostring(m) .. "\n")
end

--p = reaper.GetExePath()
function get_script_path()
  local info = debug.getinfo(1,'S');
  local script_path = info.source:match[[^@?(.*[\/])[^\/]-$]]
  --msg(script_path)
  return script_path
end

-- get "script path"
script_path = get_script_path()
grooves_path = script_path .. "\\REAPER Media"

-- Lua implementation of PHP scandir function
function scandir(directory)
    local i, t, popen = 0, {}, io.popen
    for filename in popen('dir "'..directory..'" /b'):lines() do
        msg(filename)
        i = i + 1
        t[i] = filename
    end
    return t
end

--file_table = scandir(script_path)
file_table = scandir(grooves_path)
So far it still looks like this
Dragonetti is offline   Reply With Quote
Old 02-07-2020, 05:34 PM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Code:
scandir(directory)
REAPER as dedicated API for that, EnummerateFiles function, this would be a prefered method I think.
X-Raym is offline   Reply With Quote
Old 02-08-2020, 06:59 AM   #13
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Can you give me an example with this path?
C:\Users\m\Documents\REAPER Media
Dragonetti is offline   Reply With Quote
Old 02-08-2020, 03:41 PM   #14
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Maybe you could modify ReaLauncher
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 02-09-2020, 12:02 PM   #15
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

I can't do it myself
I just asked Solger if he could add a tagging and sorting function in ReaLauncher.

Last edited by Dragonetti; 02-14-2020 at 05:59 AM.
Dragonetti is offline   Reply With Quote
Old 02-14-2020, 07:56 AM   #16
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

1.How do I get the names of the project files that I read with EnumerateFiles (path) into the GUI text buttons.

2.How can I sort the entries alphabetically(forward backward) using the Projectname button.
Thank you
https://stash.reaper.fm/38298/Simple...ectManager.lua

Dragonetti is offline   Reply With Quote
Old 02-23-2020, 05:17 PM   #17
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

I have a new idea for a special project manager
I can't program it myself
Dragonetti is offline   Reply With Quote
Old 03-16-2020, 11:01 AM   #18
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

The Project Manager is finished
https://forum.cockos.com/showthread....38#post2198938
https://forum.cockos.com/showthread.php?t=230840
Dragonetti is offline   Reply With Quote
Old 03-17-2020, 12:51 AM   #19
HoJo
Human being with feelings
 
Join Date: Dec 2007
Location: Germany
Posts: 253
Default Great first project

Hi Dragonetti.

Thanks! Wow, great first project with a nice result.
Will try it out later.

BR,
HoJo
HoJo is offline   Reply With Quote
Old 03-18-2020, 11:13 AM   #20
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

With tempo, style and date created everything is fine.
The only problem is how you can automatically reduce the DEADLINE input every day by one day
Thanks

https://stash.reaper.fm/38595/ProjectManager.lua
Dragonetti is offline   Reply With Quote
Old 03-18-2020, 12:55 PM   #21
HoJo
Human being with feelings
 
Join Date: Dec 2007
Location: Germany
Posts: 253
Default

Hi Dragonetti.

That looks really wicked, but unfortunately I am OSX.
I always end up with the message:

cannot open /Users/diejopps/Library/Application Support/REAPER/Scripts/ProjectManager/spk77_Save table to file and load table from file_functions.lua: No such file or directory

being shown.
Can you help me with that?

BR
HoJo is offline   Reply With Quote
Old 03-18-2020, 01:34 PM   #22
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by HoJo View Post
I always end up with the message:

cannot open /Users/diejopps/Library/Application Support/REAPER/Scripts/ProjectManager/spk77_Save table to file and load table from file_functions.lua: No such file or directory
Hi Holger,

Besides the ProjectManager.lua, did you already download and place the other two files from the Dropbox-Link into the same directory, as well?: https://forum.cockos.com/showpost.ph...15&postcount=7
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 03-18-2020, 03:00 PM   #23
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default




This is the new version.
Deadline does not work yet.
function
For example, the input would be "60 days".
Now the script should subtract one day every day.


The buttons above to insert the current project file data do not work either.
Maybe someone can help me there.
This code (edgemeal) would have to be adjusted.

Thank you

Code:
function Main()
  local proj, projfn = reaper.EnumProjects(-1, "")
  if projfn ~= "" then
    t[#t+1]=""..reaper.GetProjectName(proj, "")
    t[#t+1]=""..reaper.GetProjectPath("")
    local line = get_line(projfn, 1)-- project time stamp, Unix format, last word in 1st line of project file.
    local unixTS = (GetLastWord(line))
    t[#t+1]='' ..(os.date("%Y-%m-%d, ")) -- convert to "month day, year  time"
    t[#t+1]='' .. reaper.format_timestr(reaper.GetProjectLength(proj), "")
  else
    t[#t+1]="Unknown project (not saved)"
  end
 
end
https://www.dropbox.com/sh/mkk741yvo...F7DTTTfOa?dl=0
Dragonetti is offline   Reply With Quote
Old 03-26-2020, 05:53 AM   #24
HoJo
Human being with feelings
 
Join Date: Dec 2007
Location: Germany
Posts: 253
Default

Hi All.

Thanks for your pointers and advices so far.
I did that even before, but still facing that error.

Maybe something else is missing on OSX 10.13??

BR,
Holger
HoJo is offline   Reply With Quote
Old 03-26-2020, 06:06 AM   #25
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by HoJo View Post
Thanks for your pointers and advices so far. I did that even before, but still facing that error.
Maybe something else is missing on OSX 10.13??
The ProjectManager.lua script expects the necessary files to be in the .../Scripts/ProjectManager subfolder of the Reaper resource path (Options > Show REAPER resource path in explorer/finder), as shown in the Windows screenshot in post #23.
So in your example, on macOS this would be:
Quote:
/Users/diejopps/Library/Application Support/REAPER/Scripts/ProjectManager/ProjectManager.lua
/Users/diejopps/Library/Application Support/REAPER/Scripts/ProjectManager/spk77_Save table to file and load table from file_functions.lua **
...

** If you're still getting the 'No such file or directory' error message, then the spk77_Save table to file and load table from file_functions.lua is most likely still not present in the expected folder location (highlighted in bold):
Quote:
cannot open /Users/diejopps/Library/Application Support/REAPER/Scripts/ProjectManager/spk77_Save table to file and load table from file_functions.lua: No such file or directory

-----------------

EDIT:

As a side note: in case you can launch the ProjectManager.lua script, but are getting a ... attempt to call nil value (field 'CF_LocateInExplorer') error when clicking on a row in the 'Song' column: make sure that the SWS Extensions are installed (which this function requires)
__________________
ReaLauncher

Last edited by solger; 03-26-2020 at 07:21 AM.
solger is offline   Reply With Quote
Old 03-26-2020, 03:47 PM   #26
HoJo
Human being with feelings
 
Join Date: Dec 2007
Location: Germany
Posts: 253
Default

Hi solger.

Thx a lot. Working now.

BR,
HoJo
HoJo is offline   Reply With Quote
Old 03-26-2020, 03:48 PM   #27
HoJo
Human being with feelings
 
Join Date: Dec 2007
Location: Germany
Posts: 253
Default

Hi Dragonetti.

Looking great!
Thanks.

BR,
HOlger
HoJo is offline   Reply With Quote
Old 03-30-2020, 03:46 PM   #28
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

hi
I need help with coding again.
"TIME_SEC_AFK_SESSION" worked with the code(nofish) below

Now I need "PROJECT_STARTED" only "26.03.2020"

if someone had time it would be nice.
Dragonetti


Code:
function restore_time() 
  local ret, saved_time_sec = reaper.GetProjExtState(0, "ARC_COUNTER_TIMER_IN_PROJ_WIN", "TIME_SEC_AFK_SESSION")
  if saved_time_sec ~= "" then
    return saved_time_sec
  else
    return 0
  end
end

-- convert restored time from sec. to dd:hh:mm
function sec_to_ddhhmm(time_sec)
  local days = math.floor(time_sec/(60*60*24))
  local hours = math.floor(time_sec/(60*60)%24)
  local minutes = math.floor(time_sec/60%60) 
  return string.format("%02d:%02d:%02d",days,hours,minutes)
end

restored_time_sec = restore_time()
restored_time_ddhhmm =  sec_to_ddhhmm(restored_time_sec)
Dragonetti is offline   Reply With Quote
Old 03-30-2020, 05:07 PM   #29
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Can't test currently but I think something like this should work:

Code:
function restore_proj_started() 
  local ret, proj_started = reaper.GetProjExtState(0, "ARC_COUNTER_TIMER_IN_PROJ_WIN", "PROJECT_STARTED")
  return proj_started
end

proj_started = restore_proj_started()
if proj_started ~= "" then -- if not empty string
  -- only store date, discard the rest
  proj_started = string.sub(proj_started, 1, 10)) 
end
That would only work if the date substring is always in the form DD.MM.YYYY, otherwise a string match function should be used I think but that's not my field.

Last edited by nofish; 03-30-2020 at 05:14 PM.
nofish is offline   Reply With Quote
Old 03-31-2020, 12:52 AM   #30
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Küsschen
Dragonetti is offline   Reply With Quote
Old 04-02-2020, 11:17 PM   #31
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

I have a funny GUI problem.

My label entries disappear when I wipe with the mouse.
Does anyone have a solution?



Last edited by Dragonetti; 04-10-2020 at 12:53 AM.
Dragonetti is offline   Reply With Quote
Old 04-11-2020, 05:00 AM   #32
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

hi Guys

The ProjectManager works quite well so far.
What still needs to be improved:
1. Date modified
The current data is not read in, but only the data saved in the PM after the last saving of the current project. The PM would have to read in all date modified from all projects at the start.
2. Read out data
No subfolders are searched.
3. Deadline
actually works, but a bit awkward
4. Current project
If you get the current project in row 1, make changes, you must not scroll, but save first.

I would be grateful for further help
dragonetti

Last edited by Dragonetti; 04-29-2020 at 07:33 AM.
Dragonetti is offline   Reply With Quote
Old 04-16-2021, 09:06 AM   #33
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Hello scripters,
could you help again?
Thank you

I also want to search subfolders for project files.
At the moment the script only look into the folder:

(Line 14)
local projfol = "C: \\ ReaperProjects\\ "

The script should search this folder plus subfolder.

here is an excerpt from the script
otherwise the whole script is here:
https://www.dropbox.com/s/7dm7b3xr4e...nager.lua?dl=0

Code:
function EnumerateFiles(path)
  local files = {}
  local i = 0
  repeat
    local retval =  reaper.EnumerateFiles( path, i )
    local fn = string.match(retval or '', '(.-)%.rpp$') or string.match(retval or '', '(.-)%.RPP$')
    if fn then
      table.insert(files, fn)
    end
    i = i + 1
  until not retval
  return files
end

------------------------------------------------
--------------------------------------------------
---------------------------------------------------
function ReadProjects()
  local projects
  local projectData = {}
  local fn = projfol
  projects = EnumerateFiles(fn)  
  for p = 1, #projects do
  
    projectData[string.lower(projects[p])] = {proj = projects[p],
                                rating = 1, rating_val = rating[1],
                                author_val = '',
                                tempo_val = '',
                                time_val = '',
                                style_val = '',
                                datemod_val = '',
                                datecr_val = '',
                                length_val = '',
                                counter_val = '',
                                deadline_val = '',
                                notes_val = '', 
                                comment3_val = '', comment3_val2 = '', comment3_val3 = ''}
  
  end
  return projectData
  
end
Dragonetti is offline   Reply With Quote
Old 04-17-2021, 01:46 AM   #34
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Plug the reaper.EnumerateSubdirectories( path, subdirindex ) function in your Enum file function and make it recusrive (it should call itself for each subdir found to also add files of this sub dir and recheck the subfolders of this subfolder)


https://somedudesays.com/2019/05/bas...and-recursion/
X-Raym is offline   Reply With Quote
Old 04-18-2021, 12:15 AM   #35
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Thank you for the information.
Unfortunately I can't do it myself.
It actually works that way for me, but I've already received inquiries as to where some users would have liked to browse the subfolders.
Dragonetti is offline   Reply With Quote
Old 10-18-2021, 06:43 AM   #36
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

A lot is possible with the Prerelease v6.37 + dev1015.

+ Media explorer: display .rpp metadata
and edit

You can create a user column and access the metafiles of the project.
Author, Bpm, length, Date modified, descrption (for rating) etc.


Last edited by Dragonetti; 11-25-2021 at 05:01 AM.
Dragonetti is offline   Reply With Quote
Old 11-02-2021, 07:44 AM   #37
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

New video
https://www.youtube.com/watch?v=KfIdgAP0IRA

Last edited by Dragonetti; 03-02-2022 at 02:42 PM.
Dragonetti is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.