Larry
unread,May 10, 2012, 10:57:22 AM5/10/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to GoogleSemWare TSE, tse...@freelists.org
/*** jigtubeuplist.s - make a list of a youtube upload page
My question is: how come YouTube insists that my Windows Internet
Explorer 9 browser is IE 7 and offers to "upgrade" it? Anyone else had
this notice on YouTube? Has anyone clicked on the "update your browser
now" link? Does it try to get you to use Chrome? :( Any other music
video sites as good as YouTube?
My "pay for" :) for these questions is to offer the following alteration
for the jigtube.s macro. This macro will make text list of the videos
found on a youtube user's upload page when that page is made up of a
grid view of the uploaded videos (not the vertical listing).
To use, simply open an upload page and copy it to the Windows ClipBoard.
Open an empty file in TSE and paste the page to TSE. (NOTE: if there are
more than one page of uploaded videos, go through them one by one, copy
to the clipboard, and paste to the TSE file which jigtube.mac should be
able to handle.)
Once you have the page(s) pasted to the TSE file, execute the compiled
macro jigtubeuplist.mac and the videos times and titles will be
transformed into columns. The macro will attempt to get the uploaders
name from the pasted information, but will offer a prompt to select it
or a name of your choice. This name will appear in the first column.
Enjoy. :)
***/
//jigtubeuplist.s - make list of youtube playlist songs
<ctrlshift j><u> execmacro("jigtubeuplist")
proc main()
string xs[100]=splitpath(currfilename(),_name_)+":"
string a[255]="" // uploader name
integer i=0
integer cp=0
integer lcp=0
//integer nl=100//numlines()
set(insert,on)
// get the youtube user's name
pushblock()
if lfind("'s ","ig")
left()
markcolumn()
wordleft()
a=getmarkedtext()
elseif lfind("close","igb")
down()
lfind("[~ ]","cgx")
markcolumn()
endword()
a=trim(getmarkedtext())
endif
popblock()
// strip out unnecessary text and format
begfile()
repeat
if lfind("[0-9]watch","ic+x")
// add creturn
if lfind(" ","bc")
right()
creturn()
lfind("views","ic")
up()
endif
else
begline()
endif
i=i+1
message(str(i))
if keypressed() goto ending endif
until (not down()) //or i>nl
//goto ending
// strip out non-song lines
i=0
endfile()
repeat
if lfind("[0-9]watch","icgx")==0
delline()
endif
i=i+1
message(str(i))
if keypressed() goto ending endif
until not up() //or i>nl
// strip out non-song text in each line
lreplace("watch "+"later error","-----","ing")
lreplace("watch "+"ed","-----","ing")
// align times
begfile()
repeat
if lfind("--"+"---","cg")
cp=currpos()
if cp>lcp
lcp=cp
endif
endif
until not down()
begfile()
repeat
if lfind("--"+"---","cg")
cp=currpos()
begline()
inserttext(format(" ":lcp-cp+1:" "))
endif
until not down()
// remove other non-song text
i=0
begfile()
repeat
if lfind("[0-9] vie"+"ws","icgx")
lfind(" ","cb")
deltoeol()
i=i+1
if keypressed() goto ending endif
endif
until not down() //or i>nl
lreplace("---"+"--","","ing")
// get the playlist name to use in the chart
if a<>""
xs=a+":"
endif
if ask("Playlist Name",xs,_edit_history_) and length(xs)
else
xs=splitpath(currfilename(),_name_)
endif
// add playlist name to each line in chart
begfile()
repeat
begline()
inserttext(format("":3-length(str(val(gettext(1,3)))):" "),_insert_)
begline()
inserttext(xs,_insert_)
until not down()
goto ending
ending:
sound(9000,30)
end