last day (15 days later) » 

2:23 AM
-7
Q: how can json help me be lazy? Need to link 2k files in html

OmegamanSo I'm working on a project which requires a large amount of file links(2000) basically need to be hand coded in the tag and a co-working in another department mention I should look into json for doing this easier. I didn't really understand how it would work and she really couldn't explain it v...

 
ok, how would i be able to do that?
Cant you guys just point me in the right direction and be helpful, instead of down voting to stack-overflow hell?
 
How does the html obtain 'Study Sheet Unit One' etc.. ?? Are you trying to replace the # in the links with actual url's? People are probably down-voting because your question is really unclear and smells like XY problem. So, what are you really trying to do, and from where do you get what? Also, I've seen your demo running on PHP, so most probably you should be using that as charlietfl's comment pointed out.
 
i would have to link each of the 5 links in each panel tab to a specific file in a directory on the server. It is locally stored and I would just need to provide the path eg. <a href="/math/algebra2cc/studysheets/studysheetunit1.pdf"
 
Ok, that comment is clear. Now from where did you get the strings 'Study Sheet Unit One/Two' etc? Or did you already hardcode each and every one of those 2000 title/descriptions.
 
I used emmett to create the templates with incrementing ids and hard coded the text for the links. One problem is that someone already created a site before and it really sucked, and I am re-doing it. But all the files are named already and dont even follow a consistent syntax, so im not even sure its possible to do this easier.
 
2:23 AM
I don't know emmett. Did emmet get the titles out of the PDF files? Did you point emmet to some directory and it started crunching it's files/subdirectories ?
 
no emmitt is just a dev too to help you write html and it can create a template of 100 of the same html and increment variable in the id which is what I did to create the template. Emmett cannot get the path or titles or anything like that it is just a plug in for code editor.
 
How did you get the 2000 titles? Is there any link/relation/logic between the titles and their url's?
 
hi
 
Hi
How did you get the 2000 titles? Is there any link/relation/logic between the titles and their url's?
 
the titles right now are all the same
or you mean the file names
 
2:29 AM
Ok, let's agree on 2 things: <a href=**URL**>**TITLE**</a> (or anything else you prefer, as long as we are talking about the same things :)
 
Ok
so the titles were generated with my html emmitt abbreviation
they are all the same for all classes
thats just the link they click on
there is no relation to that and the url right now
well there is by category
so the titles of study sheets are study sheets
the titles of study sheets w/ answer are study sheets with the answer keys
 
Ok, now I understand that.
Ok, is there any logic to be found in the URL's?
 
its kind of a mess...
not really
they are just nested in folders
so like maths are in maths folder
but they go a few levels deep
so they are categorized
 
you gave example: /math/algebra2cc/studysheets/studysheetunit1.pdf
 
yeah
broadly speaking
 
2:32 AM
all math is in math? all studysheeds are in /studysheets/
 
for the most part
 
every studysheet is called 'studysheetunit*.pdf' ? (where * is 1 to 5)?
 
thats the problem
 
(see where I'm trying to go with this..?)
 
there is not consistent syntax with that
sometime they are consistent within that class
but other classes might have a slightly different file name like algebra1SS.pdf
 
2:34 AM
You either need to use the file-names/and file paths (of your URL) as a logical DB, or setup your own db..
Something must link your 'courses' with your files.
 
yeah im not a back end programmer mostly just front end, thats the problem
 
can file-names and optionally path be changed into something predictable?
 
sure file names could be changed but would that have to be manual?
 
at the very least the path (and any order in the file-names).
 
i am free to restruture the file layout
and file names, but there are a lot of those
so it might take just as long to rename the files and folders as it would to manually add the links
 
2:37 AM
Somewere there is going to be work, sorry.. (at least, to the best of my knowledge).
 
right, but if it takes just as much work and is more complicated to try to do it maybe it is not worth it>?
 
If we'd find some tool to automatically rip the title's from your pdf-files then most probably that would become the next problem (the tool not finding correct titles).
think about scalability and the fact you are already really hoping to find an automated solution for those 2000 files..
 
yah , it would be a good learning expeirence at least
that is really the main plus i can see
 
let's say for example, every final folder (/path/another path/final folder/file) has 5 pdf-files.
 
I actually have to go right now bcause its my grandmas birthday. Can we chat or communicate later, you seem nice and helpful.
is that possible?
 
2:40 AM
Their filenames somehow increase in sorted order (that being the only sure thing).
 
ya
thats true
the file names increase. unit1 unit2 ect mostly...
 
Chatting another time meens we need to schedule something. Anyway.
I'll be quick
 
if u have sykpe maybe i can add u there?
if u leave me your skype name
 
nope, sorry, msn = dead.
will not sell soul
 
but i really gotta go. lol
ok well ill try and find you again later
 
2:41 AM
Ok, good luck.
 
thanks
 
 
18 hours later…
8:23 PM
hey are you still around/
 

last day (15 days later) »