Coder Social home page Coder Social logo

bids-collaborative / brainspell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from r03ert0/brainspell

2.0 2.0 6.0 75.83 MB

brainspell is a web platform to facilitate the creation of an open, human-curated, classification of the neuroimaging literature

Home Page: https://gitter.im/BIDS-collaborative/brainspell

ApacheConf 0.01% PHP 98.33% CSS 0.08% JavaScript 0.82% Batchfile 0.01% PowerShell 0.01% HTML 0.43% Jupyter Notebook 0.32% Shell 0.01%

brainspell's People

Contributors

ayoon avatar davclark avatar emilyvam avatar jbpoline avatar r03ert0 avatar stefanv avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brainspell's Issues

best format for data download at brainspell.org/download?

The download link in brainspell.org/download provides an xml file with all articles and tags. What would be the best way of organising that data to make it reusable and interoperable? a json file? a csv file? what data to include? Would it be possible to have a script to automatise a monthly creation of this file?

Javascript SQL Data

As we discussed, the SQL data was added to the variable "Test" in the Brainspell.php document using the Str_replace function. All of the code is within lines 1543 and 1610. The dictionaries in the variable can be used, but the location data itself is still nested as a string and needs to be parsed.

Here's my branch with I believe the most updated code
https://github.com/Sharabesh/brainspell/tree/Sharabesh_updated

Here's where I set the HTML Variable to an array containing the Database to be parsed in the Javascript
https://github.com/BIDS-collaborative/brainspell/compare/BIDS-collaborative...Sharabesh:Sharabesh_updated#diff-256f7777bc064f9f85c8ecb005d3c8abR1596

And here is the variable declaration in Search.html;

https://github.com/BIDS-collaborative/brainspell/compare/BIDS-collaborative...Sharabesh:Sharabesh_updated#diff-4bc774c1cdab1ae9d323d6c298e20ed6R93

Notes from the meeting with JB

From today's morning meeting with JB, I wrote down some notes. Here they are:

From brainspell-search.js:
configureTemplateImage() //change the size of the window to fit the size of the brain
drawTemplateImage: There are various channels for colors in viewing the brain.
tmpl_px.data[ i ] =val; //red
tmpl_px.data[ i+1 ]=val; //green
tmpl_px.data[ i+2 ]=val; // blue channel
tmpl_px.data[ i+3 ]=255; //alpha channel (transparancy)

loadLocations() : load the locations. Since we don't want to load all of them, when 3 are loaded we just display them.

$(".paper-stuff [href]").each(function(){var arr=$(this).attr('href').split("/");refs.push(arr[arr.length-1])});
//.paper-stuff is where papers/articles are stored.

The loop in brainspell.php:
$str='

    ';
    foreach($hits as $hit):
    $str.="
  • <div class="paper-stuff">\n";
    $str.="

    <a href="".$rootdir."article/".$hit->PMID."">";
    $str.=$hit->Title."

    \n";
    $str.="<p class="info">".$hit->Reference." (".sprintf("%.0f",$hit->score*100)."%)

    \n";
    $str.="
  • \n";
    endforeach;
    $str=$str."
\n";
list article references that respond to query

10/29 Meeting Notes & Next Steps

Notes

  • Variable vs. Comment: Clarified the code regarding to the <!-- Bla Bla Bla --> symbol, more detail explanations in the Documentation.md file.
  • Text Search: To find the filename with certain text using command line: grep -lr "any text" *

Next Steps

  • Modify all the code to follow the Variable vs. Comment convention.
  • Continue to implement the article title snapshot with the button feature indicated in issue #12 .
  • Attend the code structure meeting on Tuesday Nov. 3rd at 5pm in the BIDS

P.S. Please feel free to add more notes @anokhikastia. To avoid redundant work, please comment below if you complete any of them. @anokhikastia @SydneyHuang

Look into user analytics

@r03ert0 you mentioned anyone could download this information, but it is not obvious. Can you provide a pointer? Once you've done that, you can un-assign yourself (potentially assigning to another member of the team).

Configuring apache

While configuring apache, when we type in the 1st command, we get:
ln: failed to create symbol link ' ./headers.load' : Read only file system

How do we fix this?

Super user password

I tried to modify the /etc/php5/apache2/php.ini file, and couldn’t save the changes — there was a pop-up window requires the super user password, where can I get that password? @jbpoline @davclark @r03ert0

Assemble contents for CSV

This will involve (relatively) simple jQuery to grab info from the DOM and put into a table.

A first step is to get the titles with jQuery:

$('.paper-stuff a')

Iterate through that and turn it into one string with a title on each line.

Use the jQuery docs.

Consider shift to postgresql

@r03ert0 (and possibly @jbpoline) can you let me know if there's a better way to access the database than via the CSV dump? If it's a hassle, don't worry - it shouldn't be TOO much trouble to parse the CDATA blocks, just a minor nuisance.

List of SQL query locations in brainspell.php. Please put your name next to a function if you're updating it. Maybe we should also prioritize the functions that are part of the "core" functionality - querying and constructing maps:

  • user_register
  • user_login
  • ... add remaining functions here!

11/03 Meeting Notes & Next Steps

Notes

  • Display all existing branches:
git branch -vaa

If you want to checkout any remote branch:

git checkout remotes/origin/SomeBranch
  • Training Wheels:

After you pull, you should see there is a new branch called remotes/origin/training-wheels

git checkout training-wheels

Link the configurations:

cd /etc/apache2/
sudo ln -s ~/brainspell/conf/apache-site-training.conf sites-enabled/
sudo ln -s ~/brainspell/conf/base-apache-training.conf conf-enabled/

Then the sites should be linked, to check:

ls -l sites-enabled/
ls -l conf-enabled/

All the *.conf file should be in blue.

Then, restart the apache by running:

sudo service apache2 reload

Then if you open localhost:8000 on the Firefox, you should be able to see the simplified version of brainspell. By clicking on the button, you should see the alert "Yo!"

Next Steps:

  • Modify the templates/base.html file to make the button works for download.

P.S. More details in Issue #12, and more notes in Issue #15

12/03 Meeting Note

Notes:

Need to add the article ID (and other info) into the download csv file as another column

Next Steps:

  • Add article ID
  • Prepare for the Presentation

Presentation: 12/08 from 4pm - 6pm. Present around 10 mins.

  1. Give a demo of the website
  2. How & why implemented the download feature
  3. Future perspectives

@anokhikastia @SydneyHuang

Issue with Blog

When trying to click on Blog, I get the following error:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/oski/brainspell/site/php/brainspell.php on line 330
Warning: file_get_contents(http://brainspell.org/php/blog.php): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/oski/brainspell/site/php/brainspell.php on line 330

Line 330:
$blog=file_get_contents("http://brainspell.org/php/blog.php");

I haven't modified anything. When I switch to someone else's branch, I still get that error. Is something wrong with just my computer or there is an actual error in accessing this file?

Formatting Search Result Data

For my search by location function (which seems to work on keyword inputs as well), I am not sure how to format the String I get into polished HTML that we see on the page. The code is between lines 1590 and 1610 in Brainspell.php

Right now outputs look something like this:
image

I know that Search_lucene uses a similar method to yield outputs given a query, but I am not seeing quite where that happens.

Enable students to install and run existing app

@jbpoline is likely in the lead on this as of "right now," though I've talked about making a simple ansible script, given the lack of provisioning scripts at the moment.

As it stands, we think we have reasonable instructions in the Wiki for getting apache configured. MySql still needs to be set up, and the stock Ubuntu instructions don't seem to work for setting the root password, which is a pre-req for other things working (like phpmyadmin).

I very much prefers to use ansible in situations like this. I expect there to be a lot of errors that take time to track down as beginners go about setting up the project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.