Skip to content

Commit

Permalink
relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
arnodelorme committed Jul 18, 2024
1 parent ff916b4 commit 9e1d8ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions code/plugins/reformat_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# open a text file ending with .md and append a paragraph to it
def reformat_plugin(dirpath, plugin_name):
plugins_dir = '/Users/dtyoung/Documents/EEGLAB/sccn.github.io/plugins'
plugins_dir = '../../plugins'
index_file = os.path.join(plugins_dir, 'index.md')
shutil.copyfile(os.path.join(dirpath, 'README.md'), index_file)
with open(index_file) as f:
Expand Down Expand Up @@ -39,7 +39,7 @@ def append_to_file(filepath, filename, parent, output_file):

def reformat_plugin_dir(plugin_input_dir, plugin_name, order, plugin_type='wiki'):
# plugins_output_dir = '/Users/dtyoung/Documents/EEGLAB/sccn.github.io/plugins'
plugin_output_dir = os.path.join('/Users/dtyoung/Documents/EEGLAB/sccn.github.io/plugins', plugin_name)
plugin_output_dir = os.path.join('../../plugins', plugin_name)
if not os.path.exists(plugin_output_dir):
os.makedirs(plugin_output_dir)
# copy image directory from input to output dir
Expand Down Expand Up @@ -101,4 +101,4 @@ def main():
reformat_plugin_dir(dirpath, plugin_name, order, plugin_type)

if __name__ == "__main__":
main()
main()
8 changes: 5 additions & 3 deletions replace_file_links.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ function replace_file_links(fileName)
allStrs = {};
count = 1;
while ~feof(fid)
allStrs{count} = fgetl(fid);

replace_txt(allStrs{count}, pattern1, pattern2);
strTmp = fgetl(fid);
expression1 = '[A-Za-z0-9]+\(\)';
expression2 = '[A-Za-z0-9]\(\)';



if count > 1
[twoLines,content] = replace_txt([ allStrs{count-1} allStrs{count} ], pattern1, pattern2);
Expand Down
4 changes: 2 additions & 2 deletions tutorials/ConceptsGuide/Data_Structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ line output:
group: ''
condition: ''
session: []
comments: [9×769 char]
comments: [9x769 charater]
nbchan: 32
trials: 80
pnts: 384
Expand All @@ -81,7 +81,7 @@ line output:
icasphere: [32×32 double]
icaweights: [32×32 double]
icachansind: [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32]
chanlocs: [1×32 struct]
chanlocs: [1x32 struct]
urchanlocs: [1×32 struct]
chaninfo: [1×1 struct]
ref: 'common'
Expand Down

0 comments on commit 9e1d8ce

Please sign in to comment.