make_geany_tag_file.ex
- Posted by K_D_R Apr 19, 2013
- 1061 views
I have finally decided to quit including tag files with EuGeany. This simple program
automates the creation and installation of a tag file from any file(s) in the current directory:
-- -- make_geany_tag_file.ex -- -- creates and installs Geany tags file -- from euphoria.e file(s) found in -- the current directory. Compile this -- file and place the binary in ~/euphoria/bin/ -- and you are ready to go -- -- usage: eui make_geany_tag_file.ex -- -- include std/filesys.e include std/console.e sequence GEANY_USER_CONFIG = getenv( "HOME") & SLASH & ".config" & SLASH & "geany" ifdef WINDOWS then GEANY_USER_CONFIG = getenv( "APPDATA" ) & SLASH & "geany" end ifdef GEANY_USER_CONFIG = GEANY_USER_CONFIG & SLASH & "tags" sequence tag_file = prompt_string( "Name the tag file you are about to create. \n Use the format: \"library.e.tags\" : " ) integer status = system_exec("geany -g " & tag_file & " *.e", 0) if status = -1 then printf(1, "\n Could not create %s", {tag_file}) elsif status = 0 then printf(1, "\n tag file, \"%s\", created! \n", {tag_file} ) else printf(1, "\n failed to create %s with code %d\n", {tag_file,status}) end if any_key() if copy_file( tag_file, GEANY_USER_CONFIG, 1) then -- 1 = overwrite printf(1, "\n%s copied to %s\n", {tag_file, GEANY_USER_CONFIG}) else printf(1, "\nFAILED to copy %s to %s\n", {tag_file, GEANY_USER_CONFIG}) end if any_key()